[Image-SIG] Tif Images

Gary Lehan gary at instate.co.uk
Tue Dec 6 11:14:22 CET 2005



    I am currently trying to create PDF files using TIF or JPG files for my
input. I have written a routine 

that creates the PDF file correctly using PIL to retrieve my images. If I
run the py2exe to create my 

exe file and run the program I get an error as follows



ERROR: test (__main__.CITLPDF)


Traceback (most recent call last):

  File "pdfgen.py", line 51, in test

  File "Image.pyc", line 1745, in open

IOError: cannot identify image file



Ran 1 test in 0.000s


FAILED (errors=1)



I have added my pdfgen.py file for you to look at

I have a folder in my Python24 folder named Instate

To run my file from IDLE




Create folders





Create a text file in the input folder with "1" entered as the text

Name this file Pages.dat


Copy a JPG file to the input folder and name it Page1.jpg


The Pages.dat file is simply their to get the number of pages

The script reads this file then opens each page in turn and adds

The jpg to the PDF canvas


Please can you tell me why this works in the IDLE but not in runtime


Thank You

Gary Lehan

Software Development Manager

(Microsoft Sales Expert)


Instate Technology Ltd

Tel : 0113 244 5150

www : http://www.instate.co.uk <http://www.instate.co.uk/> 




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/image-sig/attachments/20051206/6fd992a4/attachment.html
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pdfgen.py
Url: http://mail.python.org/pipermail/image-sig/attachments/20051206/6fd992a4/pdfgen.pot

More information about the Image-SIG mailing list