Re: Merge PDFs
Re: Merge PDFs
- Subject: Re: Merge PDFs
- From: Rob Stott <email@hidden>
- Date: Wed, 6 Apr 2005 08:40:14 +0100
On 5 Apr 2005, at 23:03, Todd Geist wrote:
Is it possible to merge PDFs with Applescript.
Yes!
Do you need to have Acrobat installed? Any one have any hints?
Not necessarily (see Nigel Garvey's response).
Just for the record, if you have Acrobat installed you can do it like this;
set theFiles to choose file with prompt "Please choose the PDFs" with multiple selections allowed
tell application "Acrobat 6.0 CE Professional"
open item 1 of theFiles
set theToFile to document 1 as reference
repeat with i from 2 to (the count of the items of theFiles)
open item i of theFiles
set theSourceFile to last document as reference
set theNumberOfPagesInTheSourceFile to count of every PDPage of theSourceFile
set theAddAfterPage to count of every PDPage of theToFile
insert pages theToFile after theAddAfterPage from theSourceFile starting with 1 number of pages theNumberOfPagesInTheSourceFile
close theSourceFile saving no
end repeat
end tell
You might want to make this a it more robust (eg. so that only PDF files can be selected etc).
...I should point out that I 'recycled' some parts of this from someone else's script, I forget who's, so if you recognise some of it as yours then I apologise! ;-)
r.
---
Rob Stott
"...an interesting game - the only way to win is not to play" _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
References: | |
| >Merge PDFs (From: Todd Geist <email@hidden>) |