Re: SVG for canvas.drawInlineImage
Arkadi Colson <[email protected]> Thu, 13 Jan 2022 13:46:32 +0100
| Newsgroups | gmane.comp.python.reportlab.user |
|---|---|
| Organization | Smartbit bvba |
| Message-ID | <[email protected]> |
Hi Thanks for the answer! I'm using this already for svg images inside Flowables and that is working perfectly but inside the canvas method it trows an error: File "/usr/local/lib/python2.7/dist-packages/reportlab/pdfgen/canvas.py", line 852, in drawInlineImage img_obj = PDFImage(image, x,y, width, height) File "/usr/local/lib/python2.7/dist-packages/reportlab/pdfgen/pdfimages.py", line 40, in __init__ self.getImageData() File "/usr/local/lib/python2.7/dist-packages/reportlab/pdfgen/pdfimages.py", line 165, in getImageData imagedata, imgwidth, imgheight = self.PIL_imagedata() File "/usr/local/lib/python2.7/dist-packages/reportlab/pdfgen/pdfimages.py", line 91, in PIL_imagedata if image.format=='JPEG': AttributeError: Drawing instance has no attribute 'format' Best regards Arkadi Colson On 13/01/2022 13:38, Dinu Gherman wrote: > WAARSCHUWING: Deze mail is afkomstig van buiten Smartbit. Klik niet op links en open geen bijlagen, tenzij je deze mail verwacht en hij afkomstig is van een betrouwbare bron. > > Maybe https://github.com/deeplook/svglib is an option for you? > > Cheers, > Dinu > > 13.01.2022 13:16:58 Arkadi Colson <[email protected]>: > >> Hi >> >> Is there a way to use an svg-image for canvas.drawInlineImage? >> >> Thx >> Arkadi >> >> _______________________________________________ >> reportlab-users mailing list >> [email protected] >> https://pairlist2.pair.net/mailman/listinfo/reportlab-users _______________________________________________ reportlab-users mailing list [email protected] https://pairlist2.pair.net/mailman/listinfo/reportlab-users