Format Dead Bookmarks

New Here ,
Aug 11, 2017

Copy link to clipboard

Copied

Hello All,

I was wondering how difficult it would be to write a script that would go through all my bookmarks in the current PDF and mark those bookmarks that are dead and don't lead anywhere in a specific manner? Maybe bold and in red font?

We send PDF documents back and forth with clients and between our changes and their's, we often end up with dead bookmarks in the file and I'd like an easy way to identify and resolve those.

Any help would be greatly appreciated! THank you!

TOPICS
Acrobat SDK and JavaScript, Windows

Views

61

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Format Dead Bookmarks

New Here ,
Aug 11, 2017

Copy link to clipboard

Copied

Hello All,

I was wondering how difficult it would be to write a script that would go through all my bookmarks in the current PDF and mark those bookmarks that are dead and don't lead anywhere in a specific manner? Maybe bold and in red font?

We send PDF documents back and forth with clients and between our changes and their's, we often end up with dead bookmarks in the file and I'd like an easy way to identify and resolve those.

Any help would be greatly appreciated! THank you!

TOPICS
Acrobat SDK and JavaScript, Windows

Views

62

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Aug 11, 2017 0
Most Valuable Participant ,
Aug 11, 2017

Copy link to clipboard

Copied

Are these bookmarks only pointing to pages in the same file, or can they do other things as well? If the former then it might be possible to do it with a script, but it's quite tricky.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 11, 2017 0
New Here ,
Aug 11, 2017

Copy link to clipboard

Copied

All the bookmarks are just pointing to pages in the same file. Nothing outside.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 11, 2017 0
try67 LATEST
Most Valuable Participant ,
Aug 11, 2017

Copy link to clipboard

Copied

In that case it might be possible. You would need to write a recursive function to iterate over the entire bookmarks hierarchy, executing each one and checking whether it's causing the document to change page number. If you do that multiple times and it never changes, it's most likely a dead bookmark.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 11, 2017 0