Jump to content

PDF TOC Navigator - Jump to PDF page via searching TOC & Edit TOC in a PDF

Recommended Posts

PDF TOC Navigator


Frustrated by the lack of tools to quickly locate entries in PDF dictionaries, I developed PDF TOC Navigator. This tool indexes multiple PDFs, allowing you to search their tables of contents and instantly jump to the corresponding pages. To enhance usability, I've added features for editing and exporting table of contents, making it easier to manage and navigate your PDFs.


Download it here: https://github.com/HF706/My_Alfred_workflow



Install PDFtk via Homebrew


brew install pdftk-java


  • PDF Reader, enter the application name in the input box, and you can use PDF readers such as "Preview," "Skim," and "PDF Expert" to open PDF documents. It is recommended to use "Skim" because it supports URL schemes, allowing for quick page navigation.





Index PDF files via the Universal Action.

First, index the PDF document using the universal action 'Indexing' to extract the table of contents information and store it in index files. You can also select multiple files and add them to a buffer, and then index all of these at once.




Search TOC in multiple PDF files.


def keyword1 keyword2 ...




Search TOC in in a specific PDF file.


indexin PDF_Name





Export PDF Table of Contents

Use the universal action 'Export PDF Table of Contents'. It will show the TOC of the PDF in text view, adhering to the following format:


"content"\t"logical page number"
\t"content"\t"logical page number"






  • "content" represents the name of the entry in the table of contents.
  • "Logical page number" refers to the page number as it would appear on the printed document, whereas “Physical page number” refers to the actual number of pages from the beginning of the PDF document. Page numbers before logical page 1 are represented using negative numbers.
  • Use a tab ("\t") to separate the content from the page number, and add tabs at the beginning of each entry to indicate its level in the table of contents hierarchy. For instance, no tabs before a first-level entry, one tab before a second-level entry, and so forth.





Add Table of Contents to PDF

  • Edit the table of contents for your book in a text editor (using the format described above).
  • Copy the edited text, and remember the physical page number that corresponds to logical page 1.
  • Use the universal action 'Add Table of Contents to PDF', which parses the copied text. Then, enter the physical page number corresponding to logical page 1 in the input box. Wait a few seconds, and the table of contents will be successfully added to the PDF document.


Edited by toru777
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...