Python dependency

30 views
Skip to first unread message

Simon McNair

unread,
Jan 29, 2024, 8:15:46 AMJan 29
to reportlab-users

Hi,
I found that renderPM failed until I installed  libcairo2-dev.  I found the link to fix it here:

should libcairo2-dev be required for this to be compiled and if so, why is it not in the requirements please ?

from svglib.svglib import svg2rlg
from reportlab.graphics import renderPM

drawing = svg2rlg('input/ice.svg')
renderPM.drawToFile(drawing, 'output/ice.png', fmt='PNG')

Cheers
Simon
Reply all
Reply to author
Forward
0 new messages