Images not Showing Up

77 views
Skip to first unread message

Jonathan

unread,
Dec 22, 2009, 2:24:25 AM12/22/09
to Pisa XHTML2PDF Support
Hello -

I used the following code:

pdf = pisa.CreatePDF(message, f, link_callback=fetch_resources,
default_css=pdf_options)

to generate a pdf file. The HTML is generated programatically, and
the images are on the local server. Everything works, except that the
images don't show up. I have both .jpg and .gif images. When I tried
a simple create (w/o the callback and the default_css), I had the same
problem. I'm thinking I might need to define the "path" argument, but
I don't really understand how to use it based on the documentation.
So my questions are:

1. How do you use the "path" argument, and
2. Am I on the right track? Is there something obvious that I'm
missing?

Thanks,

Jonathan

Jonathan

unread,
Dec 28, 2009, 4:19:49 PM12/28/09
to Pisa XHTML2PDF Support
Okay -

I figured out that I need to recompile the Python Image Library
(PIL). Even recompiled, it doesn't support interlaced .png's until
the new 1.1.7 release, which should be coming out in 2010. And the
callback is not needed if URL's are used.

Regards,

Jonathan

Reply all
Reply to author
Forward
0 new messages