These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Get the target PDF from bookmarks

msstrend
Registered: Mar 15 2007
Posts: 53

I have number of PDFs which are linked by bookmarks. I want to find the filename of the PDF linked from each bookmark. Also i want to find the bookmarks entries which links to same PDF and to external PDF. Can you please help?

My Product Information:
Acrobat Pro 7.0.9, Windows
jbfreels
Registered: Feb 19 2008
Posts: 63
I imagine you could simply....

for (var i = 0; i < this.bookmarkRoot.children.length; i++)
{
var doc = this.bookmarkRoot.children[i].doc;
{..do doc stuff..ex: push 'doc.path' into an array..}
}

That's off the top of my head, you'd have to have it iterate through all of them if there is a subtree, so make a function that calls this loop and for every child of a child it will call the function.

That should get you started.
msstrend
Registered: Mar 15 2007
Posts: 53
I'm getting an error saying

SyntaxError: syntax error
4:Console:Exec
undefined

can you please explain what is wrong?
jbfreels
Registered: Feb 19 2008
Posts: 63
I would have to see the code you are using. You can't simply copy and paste what I posted and make what you want happen.

-jb
msstrend
Registered: Mar 15 2007
Posts: 53
I don't know a code for this requirement. So thought this piece of script does it. Can you please explain?