Thu, 05 Feb 2004 20:04:47 +0100
i CAN use PIL, but not in combination with reportlab
(canvas.drawInlineImage) to embed images in a pdf, because i get the
error that "sys is not defined".
with the shown patch it works.
Robin Becker wrote:
> In article <40227E87.firstname.lastname@example.org>, Ulrich Schreiner
> <email@example.com> writes
> Thanks for the patches I've added them into the CVS tree.
> I don't see why you can't use PIL?
> Can you not import PIL directly using Python to see if there's something
>>i upgraded to version 1.19 and now i cannot use PIL and images any more.
>>i have to patch "pdfgen/pdfimages.py" and add "import sys"
>>otherwise you get:
>>...\reportlab\pdfgen\pdfimages.py", line 137, in getImageData
>> if sys.platform[0:4] == 'java':
>>NameError: global name 'sys' is not defined
>>another bug: when using the "<u>" tag in a paragraph, you get an error.
>>change the line 342 in paragraph.py
>> text = join(tx.lines[i])
>> text = join(tx.XtraState.lines[i])
>>perhaps someone could patch the library sources ...
>>reportlab-users mailing list