How to automatically add bookmarks to a PDF?
Source: Dev.to
Overview
Tocify is a web‑based utility designed to automate the creation of bookmarks / tables of contents for PDF documents. It resolves issues regarding missing directory structures in scanned or electronic files. The tool operates entirely within the browser, utilizing AI to parse structure from images or raw text without requiring software installation. A desktop client is also available for macOS and Windows.
Features
- Visual contents page conversion – For PDFs containing a visual contents page (e.g., scanned images that are non‑interactive), Tocify provides a selection tool to convert these images into functional bookmarks.
- External text data – When the source PDF lacks a visual directory, users can supply external TOC text (e.g., copied from library databases or online bookstores). The generated structure is synchronized with the PDF’s internal bookmark system.
- Page offset adjustment – Page offsets can be manually adjusted in the TOC settings to align digital page numbers with physical print numbers.
- Physical TOC page generation – Unlike standard PDF editors that modify only metadata bookmarks, Tocify can generate a physical Table of Contents page, which is essential for printing or viewing on limited hardware.
Privacy and Security
All core file‑manipulation logic, including bookmark insertion and page rendering, is executed locally within the user’s browser. PDF files are not uploaded to cloud storage servers during the editing process.
The application includes a default API key for immediate evaluation. Due to token limitations on public keys, it is recommended to configure a custom API key for high‑volume usage or enhanced privacy.
Open Source
The project is open‑source and the repository can be found at:
https://github.com/anig1scur/tocify
Developers or users requiring offline functionality may clone the repository for local deployment.