Thanks. Not a solution I am afraid. I want to send the PDF to someone else, and have it open showing the bookmarks. So needs to be set in the properties of the document. There is a setting for this, under file properties, but the question is how to I set it for an individual document using applescript.
There is nothing to save the document remains unmodified. This is just a method to can call on at run time it’s not setting any document properties that can be saved and passed on to other PDF viewers.
No, it’s not working, like much of Acrobat scripting. But view mode is a document property, so if it doesn’t work, it’s not because it’s a property of the application.
Shane, if it’s broken then it has always TMK been that way. Acrobat’s AppleScript access stinks at best. and they do goof stuff up as well. That said I can’t find this in the JavaScript documentation either only had a quick look though.
Thanks for replies. Have been travelling, hence my belated response. I suppose one might try a gui solution if it is not possible to operate directly on the document properties using applescript. I will look at doing that, faute de mieux…
Just reverting on this thread with the solution I have adopted. In the end, I have got a GUI solution, which while not ideal, seems to work reliably on my MacBook with SSD. For other machines, you may need to play with the timing.
on setView()
delay 1
tell application "System Events"
tell process "AdobeAcrobat"
tell menu bar 1
tell menu bar item "File"
tell menu "File"
tell menu item "Properties..."
click
end tell
end tell
end tell
end tell
tell item 1 of every tab group of window "Document Properties"
click radio button "Initial View"
tell group 1
tell pop up button 1
click
tell menu 1
click menu item "Bookmarks Panel and Page"
end tell
end tell
end tell
end tell
click button "OK" of window "Document Properties"
end tell
end tell
end setView