Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!ecngs!feeder2.ecngs.de!novso.com!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.015 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'output': 0.05; 'memory.': 0.07; 'library?': 0.09; 'pointers': 0.09; 'python': 0.11; "wouldn't": 0.14; 'directory)': 0.16; 'subject:Converting': 0.16; 'subject:folder': 0.16; 'thanks,': 0.17; 'library': 0.18; 'appears': 0.22; 'harry': 0.24; 'file.': 0.24; 'script': 0.25; 'appreciated.': 0.29; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; 'subject:per': 0.31; 'file': 0.32; 'convert': 0.35; 'received:google.com': 0.35; 'done': 0.36; 'too': 0.37; 'list': 0.37; 'to:addr:python-list': 0.38; 'files': 0.38; 'pdf': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'save': 0.62; 'dear': 0.65; 'sample': 0.67; 'internet': 0.71; 'hundred': 0.95 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=5WMqSTypfQbSuHTAg5K+cPi23cEgYRqtSAYEvktaUC0=; b=Qo914lxCU+RGBQSGI5ICXtimlNdY/IkHHgozXOee+SXeZVFCThBlVxZ5fzQlVqOGos YwGWqSGUUw+sK7Io2avdk3UR7mi6X0mfVU3UiFsJ+q2zmf5NNnlis61EOid+xURO8s94 TkCblqSFe4FszxANy0A3cxo8/jZn7Vi5mFWfDitD6yJLTfqb2b5sb7twpac55sup06zI cqPEh+xjfbAO0fIirPdsfMcpVzcBZqz2JEIbW3h6wIuEHO0lXwykfaMnV+UCyqolpzB6 d4LNalYlXEl4pC0hG+Eyj8Eq63cTm8yROSqgSEX7jirzjfmdyHlCykp3Kznb3CIidmp9 NUmQ== MIME-Version: 1.0 X-Received: by 10.182.246.39 with SMTP id xt7mr8657187obc.16.1389899512161; Thu, 16 Jan 2014 11:11:52 -0800 (PST) Date: Thu, 16 Jan 2014 11:11:52 -0800 Subject: Converting folders of jpegs to single pdf per folder From: Harry Spier To: python-list@python.org Content-Type: multipart/alternative; boundary=001a11c2e224b2345204f01b325d X-Mailman-Approved-At: Thu, 16 Jan 2014 20:24:43 +0100 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 40 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1389900284 news.xs4all.nl 2849 [2001:888:2000:d::a6]:58636 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:64100 --001a11c2e224b2345204f01b325d Content-Type: text/plain; charset=UTF-8 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 --001a11c2e224b2345204f01b325d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Dear list members,

I have a directory that cont= ains about a hundred subdirectories named J0001,J0002,J0003 . . . etc.
E= ach 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 inte= rnet it appears that using ImageMagick wouldn't work because of using t= oo much memory. Can this be done using the Python Image Library or some ot= her library? Any sample code would also be appreciated.

Thanks,
Harry Spier
--001a11c2e224b2345204f01b325d--