Re: Acrobat
Re: Acrobat
- Subject: Re: Acrobat
- From: Shane Stanley <email@hidden>
- Date: Wed, 27 Dec 2000 08:10:31 +1100
On 26/12/00 11:31 PM +1000, Rick Plummer, email@hidden, wrote:
>
Does anyone know of any guides, or resources for scripting Acrobat.
It's documented at Adobe's Web site; look for the Acrobat SDK. But it's no
fun to script.
>
I am having alot of trouble writing a script that will merge several PDF files
>
into one.
Try this:
on open fileList
set newFile to new file with prompt "Save in:"
tell application "Finder"
set fileList to (sort fileList by name) as alias list
set doc1 to name of item 1 of fileList
end tell
tell application "Acrobat 4.0"
open (item 1 of fileList) with invisible
set fileList to rest of fileList
repeat with aFile in fileList
tell application "Finder"
set doc2 to name of aFile
end tell
set pageCount to count each PDPage of document doc1
open aFile with invisible
set pageCount2 to count each PDPage of document doc2
insert pages document doc1 from document doc2 starting with 1 number of
pages pageCount2 after pageCount
close document doc2 saving no
end repeat
save document doc1 to newFile with linearize
beep
display dialog "Finished."
end tell
--close document doc1 saving no
end open
I've never tested it with a really large number of files.
--
Shane Stanley, email@hidden
References: | |
| >Acrobat (From: Rick Plummer <email@hidden>) |