Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #64101
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <mail@timgolden.me.uk> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.005 |
| X-Spam-Evidence | '*H*': 0.99; '*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; 'from:addr:timgolden.me.uk': 0.16; 'from:name:tim golden': 0.16; 'iterating': 0.16; 'message- id:@timgolden.me.uk': 0.16; 'received:74.55.86': 0.16; 'received:74.55.86.74': 0.16; 'received:smtp.webfaction.com': 0.16; 'received:webfaction.com': 0.16; 'subject:Converting': 0.16; 'subject:folder': 0.16; 'tjg': 0.16; 'wrote:': 0.18; 'library': 0.18; 'appears': 0.22; 'header:User-Agent:1': 0.23; 'harry': 0.24; 'file.': 0.24; "haven't": 0.24; 'script': 0.25; 'asking': 0.27; 'certain': 0.27; 'header:In-Reply-To:1': 0.27; 'appreciated.': 0.29; "i'm": 0.30; 'code': 0.31; 'subject:per': 0.31; 'file': 0.32; 'quite': 0.32; 'problem': 0.35; 'convert': 0.35; 'hundreds': 0.35; 'usual': 0.35; 'but': 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; "you're": 0.61; 'save': 0.62; 'dear': 0.65; 'sample': 0.67; 'side': 0.67; 'internet': 0.71; 'from:addr:mail': 0.83; 'about?': 0.84; 'hundred': 0.95 |
| Date | Thu, 16 Jan 2014 19:41:04 +0000 |
| From | Tim Golden <mail@timgolden.me.uk> |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 |
| MIME-Version | 1.0 |
| To | python-list@python.org |
| Subject | Re: Converting folders of jpegs to single pdf per folder |
| References | <CAJ3b0o828ZOAYM8Gt0BsLcZ97beGAnQWT9C+_7yFE4HSjiiU3Q@mail.gmail.com> |
| In-Reply-To | <CAJ3b0o828ZOAYM8Gt0BsLcZ97beGAnQWT9C+_7yFE4HSjiiU3Q@mail.gmail.com> |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.5602.1389901256.18130.python-list@python.org> (permalink) |
| Lines | 28 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1389901256 news.xs4all.nl 2960 [2001:888:2000:d::a6]:39877 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:64101 |
Show key headers only | View raw
On 16/01/2014 19:11, Harry Spier wrote: > > 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. The usual go-to library for PDF generation is ReportLab. I haven't used it for a long while but I'm quite certain it would have no problem including images. Do I take it that it's the PDF-generation side of things you're asking about? Or do you need help iterating over hundreds of directories and files? TJG
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Re: Converting folders of jpegs to single pdf per folder Tim Golden <mail@timgolden.me.uk> - 2014-01-16 19:41 +0000
Re: Converting folders of jpegs to single pdf per folder vasishtha.spier@gmail.com - 2014-01-16 11:50 -0800
Re: Converting folders of jpegs to single pdf per folder Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-01-16 20:01 +0000
Re: Converting folders of jpegs to single pdf per folder Tim Golden <mail@timgolden.me.uk> - 2014-01-16 20:07 +0000
Re: Converting folders of jpegs to single pdf per folder vasishtha.spier@gmail.com - 2014-01-16 21:42 -0800
Re: Converting folders of jpegs to single pdf per folder Tim Golden <mail@timgolden.me.uk> - 2014-01-17 08:53 +0000
Re: Converting folders of jpegs to single pdf per folder Tim Golden <mail@timgolden.me.uk> - 2014-01-17 09:01 +0000
Re: Converting folders of jpegs to single pdf per folder Tim Golden <mail@timgolden.me.uk> - 2014-01-16 20:12 +0000
Re: Converting folders of jpegs to single pdf per folder vasishtha.spier@gmail.com - 2014-01-16 12:20 -0800
csiph-web