Converting folders of jpegs to single pdf per folder

Harry Spier vasishtha.spier at gmail.com
Thu Jan 16 14:11:52 EST 2014


Dear list members,

I have a directory that contains about a hundred subdirectories named
J0001,J0002,J0003 . . . etc.
Each of these subdirectories contains about a hundred JPEGs named P001.jpg,
P002.jpg, P003.jpg etc.

I need to write a python script that will cycle thru each directory and
convert ALL JPEGs in each directory into a single PDF file and save these
PDF files (one per directory) to an output file.

Any pointers on how to do this with a Python script would be appreciated.
Reading on the internet it appears that using ImageMagick wouldn't work
because of using too much memory. Can this be done using the Python Image
Library or some other library? Any sample code would also be appreciated.

Thanks,
Harry Spier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20140116/9ce1ee9b/attachment.html>


More information about the Python-list mailing list