Merging pdf documents with Python
Kyler Laird
Kyler at news.Lairds.org
Thu Aug 19 23:09:10 EDT 2004
"Daryl Middleton" <dmidd at chartermi.net> writes:
>Can python be used to merge pdf documents into a single pdf file so that I
>do not have to manually insert each one. Thanks
I was using a free version of PageCatcher (ReportLab) for awhile
(after using PJscript and Ghostscript). My projects manipulate
PDF submitted by hundreds of people so any incompatibility is
likely to be a problem. ReportLab couldn't handle everything we
got last year so I started searching again.
I ended up with iText.
http://itext.sourceforge.net/
It has been very solid. There was a problem once but it was
quickly fixed.
http://groups.google.com/groups?q=itext+kyler&hl=en&lr=&ie=UTF-8&selm=v8vqk1-0k5.ln1%40snout.lairds.org&rnum=3
I usually hate using Java but I don't mind using iText through
Jython. When I use it from Zope I use os.system like this.
command = 'java -cp /var/lib/zope/instance/default/Extensions/itext-paulo-130.jar com.lowagie.tools.concat_pdf ' + string.join(piece_names) + ' ' + result_name
I'm quite happy with iText. I like that it's Free and well-
maintained. Being usable from Jython is a real bonus.
--kyler
More information about the Python-list
mailing list