[Pythonmac-SIG] Concatenate PDFS's with python

Bob Ippolito bob at redivi.com
Wed Feb 18 13:35:26 EST 2004


On Feb 18, 2004, at 2:52 AM, Dinu Gherman wrote:

> Tim Conner:
>
>> I'm looking for some print house type solutions that use 
>> coregraphics/quartz and python to manipulate images, eps's, and pdfs. 
>> To get started on this quest it would be nice if someone could point 
>> me to examples or write a quick sub-routine that would take 2 pdfs 
>> and combine them into 1, 2-page pdf. I just need a stepping stone to 
>> get me rolling. I also need the same thing for jpegs, but once I see 
>> a pdf example, I should hope I can handle that on my own.
>
> I tried that on 10.2 using NSPDFView or something like that and
> it just did not have the right methods to accomplish that kind
> of task, i.e. picking/displaying single pages from a PDF would
> work, but not reassembling them in a new PDF file. I'd be grate-
> ful to know if that changed on 10.3...

You should use the lower level CoreGraphics framework to deal with 
these sorts of issues.  Apple distributes a closed source SWIG wrapper 
for this CoreFoundation based C API with their Python 2.3.0 on OS X 
10.3, but you could always use it from C (or Pyrex, etc.).  There is a 
partial bgen-created CoreGraphics wrapper in Python, but last I checked 
it doesn't wrap enough stuff to be very useful at all.

-bob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2357 bytes
Desc: not available
Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20040218/4bfc98d7/smime.bin


More information about the Pythonmac-SIG mailing list