[reportlab-users] Loading PDF image out of zip file fails in KFD

Robin Becker robin at reportlab.com
Tue Nov 27 06:33:28 EST 2007


Andy Robinson wrote:

> I'm stumped. Can you have a look and see if I am missing anything?

>

> I added a line to kfdserver/text/individual_template.rml on the

> maintenance branch which uses

> <image file="text/keyfacts_black.pdf" .../>

>

> Works fine locally. On the server installed (try the test menu on

> release.reportlab.com), it fails with

> IOError...Cannot open resource "text/keyfacts_black.pdf"

>

> Inspection of the code shows that it goes through open-and-read

> properly (eventually called from pdfImageFormDetails in

> pageCatcher.py).

OK it's there now. Originally we used only .data files from text/ even though
the .pdfs were also kept there. The bld_zipapp.py in webeforms explicitly
excluded .pdf files as we only wanted .data. I added an explicit include for
this file and it now seems to work properly.

It seems silly to use pdf if the .data is more efficient so perhaps we should
create the .data and use that.
--
Robin Becker


More information about the reportlab-users mailing list