Hello,
I am currently using a folder level Javascript to set the bookmark using this command: this.pageNum = 3;
This works just fine, however when the user adds pages to the document, the page I wanted it to go to is no longer page 3 but the bookmark still goes to page 3.
Is there a way to make this more dynamic so it will be linked to the original page?
Any help would be appreciated.
Thanks,
Dan
But you are in luck, sort of, next months new JavaScript Corner article is on this exact topic. It'll be posted in a couple of weeks:( It's explains the process and all the gotchas you have to watch out for. And it provides sample code.
For now you should experiment with running this code from the console window.
app.execMenuItem("NewBookmark");
It will create a new bookmark that uses the current view of the page as the destination. So the page view should be setup a head of time. The unfortunate part is that there is no way to control, from JavaScript, where the new bookmark is created. So this has to be a slightly user directed process.
Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]
The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/]http://www.adobe.com/devnet/acrobat/[/url]
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script