Join many PDF into one
mkoob at rogers.com
Mon Dec 27 09:15:50 EST 2010
I found a page that explains how Automator actually joins PDFs and it
explains how to use the same method.
It used a python command.
# Joing pages from a a collection of PDF files into a single PDF file.
# join [--output <file>] [--append] [--shuffle] [--preview] [--verbose]"
# Take a page from each PDF input file in turn before taking another from
# If this option is not specified then all of the pages from a PDF file are
# to the output PDF file before the next input PDF file is processed.
# Write information about the doings of this tool to stderr.
The author used the following as a prototype for the command.
python '/System/Library/Automator/Combine PDF
Pages.action/Contents/Resources/join.py' -o '/path/to/output.pdf'
I tried this out by putting 2 PDFs (pg1.pdf & pg2.pdf in a directory) then
in terminal changed directory to that directory. And did the following
command in the terminal.
Martin-Koobs-MacBook-Pro:PDF joins MartinLdrive$ python
Pages.action/Contents/Resources/join.py' -o 'combined.pdf' 'pg1.pdf'
This successfully created a PDF combined.pdf in the working directory but
generated an error as you can see from the terminal output below.
Mon Dec 27 08:34:54 Martin-Koobs-MacBook-Pro.local Python <Error>: The
function `CGPDFDocumentGetMediaBox' is obsolete and will be removed in an
upcoming update. Unfortunately, this application, or a library it uses, is
using this obsolete function, and is thereby contributing to an overall
degradation of system performance. Please use `CGPDFPageGetBoxRect' instead.
Martin-Koobs-MacBook-Pro:PDF joins MartinLdrive$
This was done in Mac OS X 10.5.8 I don't know if they changed the python
command in 10.6 so if they did this may not work.
Any way I think you could use that as a shell command in LiveCode. I
haven't tried it though. You would have to construct the command using
variables to insert your file paths then do it as a shell command.
View this message in context: http://runtime-revolution.278305.n4.nabble.com/Join-many-PDF-into-one-tp3164964p3165030.html
Sent from the Revolution - User mailing list archive at Nabble.com.
More information about the Use-livecode