Combine multiple pdfs into one pdf.
– The pdfs are in sequence. 01 - Filename.pdf, 02 - Filename.pdf, 03 - Filename.pdf
As an pdf is added a new bookmark is added to the first page of the document.
– ideally the bookmark name would be the title of the document
– secondly it can be the name of the file but the above would be preferred.
An ability to assure that all bookmark properties are identical for instance all are inherited zoom.
I have the ability to use acrobat 7. Any help would be greatly appreciated.
I have been trying almost the very same thing. Unfortunately getting hold of any guide for scripting in any thing other than java has proved fruitless. If I do make any headway I will post back. Acrobat appears to be one of those app’s where using dictonary terms as you would expect, offen does not work as expected. Good luck. I have java to strip files down to single pages but could find none to do the opposite.
Slashdot, well wouldn’t you just believe it having bashed my head against the desk for a whole day then spending 3 more days doing this manually I’ve just had a bit of a break through. This worked have your first page open in Acrobat then point the script to your folder of single pages. Don’t know how much milage you will get from this.
set inputFolder to choose folder
tell application "Finder"
set filesList to files in inputFolder
end tell
repeat with aFile in filesList
set fileIndex to 0
tell application "Finder"
set theFile to aFile as alias
end tell
tell application "Acrobat 6.0.2 Professional"
activate
set docRefA to the name of document 1
set PageCount to count of pages of document 1
open theFile without invisible
set docRefB to the name of document 2
insert pages document docRefA after PageCount from document docRefB starting with 1 number of pages 1 with insert bookmarks
close document 2 saving no
end tell
end repeat
tell application "Acrobat 6.0.2 Professional"
close document 1 saving yes
end tell
Well I never I think this is working too. Will have to put through some testing to check. Should now add all pages for each doc in list invisibly!!
set inputFolder to choose folder
tell application "Finder"
set filesList to files in inputFolder
end tell
repeat with aFile in filesList
set fileIndex to 0
tell application "Finder"
set theFile to aFile as alias
end tell
tell application "Acrobat 6.0.2 Professional"
activate
set docRefA to the name of document 1
set PageCount to count of pages of document docRefA
open theFile with invisible
set docRefB to the name of document 2
set AddPages to count of pages of document docRefB
insert pages document docRefA after PageCount from document docRefB starting with 1 number of pages AddPages with insert bookmarks
close document 2 saving no
end tell
end repeat
tell application "Acrobat 6.0.2 Professional"
close document 1 saving yes
end tell
thanks mark for the applescript. Gives me a starting point.
Does anyone know how to create bookmarks through applescript.
Go to page # (NOT NEEDED)
Add bookmark:
tell document 1
make new bookmark at end with properties ¬
{destination page number:{56}, fit type:fit page, name:"56"}
end tell
Thanks Mark for the code above.
if possible change properties to inherit zoom. Not dire but useful.
activate
set docRefA to the name of document 1
set PageCount to count of pages of document 1
open theFile without invisible
set docRefB to the name of document 2
insert pages document docRefA after PageCount from document docRefB starting with 1 number of pages 1 with insert bookmarks
close document 2 saving no
end tell
Slashdot, not 100% on what you wanted, this should import pages of docs with there bookmarks if they have any? and create a new bookmark at the first page of each imported doc with the docs file name. You could use TID’s on the PDF name if you wanted to remove the suffix. Hope this helps. Again not had much chance for a great deal of tests but appears to be working.
set inputFolder to choose folder
tell application "Finder"
set filesList to files in inputFolder
end tell
repeat with aFile in filesList
set fileIndex to 0
tell application "Finder"
set theFile to aFile as alias
end tell
tell application "Acrobat 6.0.2 Professional"
activate
set docRefA to the name of document 1
set bounds of document 1 to {42, 112, 1000, 1200} -- This was just so I could veiw my script and the doc working.
set view mode of document 1 to pages and bookmarks
set PageCount to count of pages of document docRefA
open theFile with invisible
set docRefB to the name of document 2
-- Use TID's here if you want?
set AddPages to count of pages of document docRefB
insert pages document docRefA after PageCount from document docRefB starting with 1 number of pages AddPages with insert bookmarks
tell document 1
make new bookmark at end with properties ¬
{destination page number:{(PageCount + 1)}, fit type:fit page, name:docRefB}
end tell
close document 2 saving no
end tell
end repeat
tell application "Acrobat 6.0.2 Professional"
create thumbs document 1
close document 1 saving yes
end tell