• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
14

How to automate adding In-document navigation to pdf documents.

New Here ,
Mar 20, 2024 Mar 20, 2024

Copy link to clipboard

Copied

The documents contain a table and some charts on page#2. This table contains a list of titles (similar to Chapters). I want a script to make these titles clickable. On clicking a title user should navigate to the respective page number assigned to it. Note: all the titles are standard and we can hardcode the mapping between Title and Page Number. I am open to insert some rectangles or other annotations to make this functionality work, provided they stay hidden.

TOPICS
Edit and convert PDFs , How to , JavaScript , Modern Acrobat , PDF

Views

142

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
community guidelines
Community Expert ,
Mar 20, 2024 Mar 20, 2024

Copy link to clipboard

Copied

There's no built-in functionality overlaying entries in a TOC with links. And there is no easy way to do it with a script. It can be done, but its non-trivial. I've actually done this before, so I know.  For this one you'll need to hire a developer. 

 

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

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
community guidelines
New Here ,
Mar 20, 2024 Mar 20, 2024

Copy link to clipboard

Copied

Thanks for yor reply. Since adobe acrobat pro provides the option to insert navigation links to text within the document, is it possible to automate this process somehow?

Votes

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
community guidelines
Community Expert ,
Mar 20, 2024 Mar 20, 2024

Copy link to clipboard

Copied

There are two issues with automating this process.

 

1. The location of each line in the TOC has to be identified. This means doing a text analysis of the TOC pages to determine what is a TOC line and what is not a TOC line. It helps if some location info is known up front. For example, if the user draws a rectangle around the TOC lines, the task is greatly simplified.  This same analysis would also identify the page numbers. 

 

2. A script cannot set a true link destination. It can only set a script on a link or button.  This is unfortunate since a true destination can be used by nearly any PDF viewer, even the really bad mobile and browser viewers. Whereas JavaScript is only useful to a small set of premium desktop viewers. 

There is only one way to fix this issue, and that is with a plug-in that converts JS link actions in to true destinations. 

 

   

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

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
community guidelines
Community Expert ,
Mar 20, 2024 Mar 20, 2024

Copy link to clipboard

Copied

LATEST

I've created a (paid-for) tool that allows you to convert the bookmarks of a PDF file into a TOC, with clickable links that take you to the location each bookmark points to. You can find it here: https://www.try67.com/tool/acrobat-create-a-table-of-contents-toc-in-a-pdf-file-from-bookmarks

 

Votes

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
community guidelines