I have a simple script to change the zoom view of bookmarks of a PDF in Adobe Acrobat Pro DC.
However, it works when only one document is open, and it doesn’t work on the document that is active if more than one is open. If more than one document is open, then the script only works on the first document rather than the one in focus.
I have tried focus, front, and current document, but all of these fail to be recognized by Adobe Acrobat.
How can I call the active PDF to be the one to act upon?
Thanks.
//
tell application "Adobe Acrobat"
set docname to name of document 1
set theseMarks to bookmarks of document docname as list
repeat with n from 1 to count of theseMarks
set fit type of item n of theseMarks to fit page
end repeat
end tell
//