How to automatically generate bookmarks for PDF: one-click generation based on the directory
Explains several paths for automatically generating bookmarks from PDF: exporting from title style, generating based on the text version table of contents, performing OCR on the scanned document first, and giving methods to check the level and page number after generation.
Key points of this article
- When the text version PDF has a readable table of contents, you can generate bookmarks according to the table of contents, and then check the level and page number one by one.
- The source file uses a unified title style, and when exporting PDF, check the box to create bookmarks, levels and page numbers to save trouble.
- The table of contents of the scanned document is an image, and you need to use OCR to generate a text layer first, otherwise it cannot be read or matched.
- The table of contents page numbers are often inconsistent with the physical page numbers of the PDF, and the cover and preface pages will cause overall offset.
- Merging or splitting PDFs will change the page numbers. You should complete the page operations first and finally generate bookmarks in a unified manner.
If you have a report, paper or contract with dozens of pages in your hand, but you can't find the chapter entry after opening it, you need to bookmark it. Bookmarks are equivalent to PDF directory navigation. Click to jump to the corresponding page. How to automatically generate bookmarks for PDF files is the first question many people ask when searching. Manually adding chapter by chapter is time-consuming and it is easy to get the wrong level or page number.
This article talks about how to generate bookmarks from existing table of contents or title structures as much as possible instead of typing them from scratch. It should be noted first: The functions currently listed in the PDF editor of the OmniDoc desktop client include changing paragraph text, signing, filling out forms, blackening, page manipulation, OCR, comparison and export, and do not include automatic generation of bookmarks by directory. Therefore, some of the following methods rely on source files or common tools. OmniDoc is responsible for converting scanned documents into readable text, correcting text, and organizing pages.
After reading it, you will be able to judge which path your file should take, and you will also know what needs to be checked after it is generated.
How to automatically generate bookmarks for PDF files? One sentence conclusion
Direct answer: If the document has a uniform title style or a readable table of contents page, bookmarks can mostly be generated from the structure, and manual addition is only used to fill in a few missing chapters.
| your situation | Recommended practices | reason |
|---|---|---|
| The PDF has not been exported yet. The source file is a document such as Word. | Set a unified title style for chapter titles, and choose to create bookmarks in the settings when exporting PDF | The title level will directly become the bookmark level, and the page numbers will automatically correspond with the export. |
| There is a PDF, the main text can be selected, and there is a text version of the table of contents page. | Use general PDF tools to generate bookmarks by directory, and then manually check | Table of contents text is readable and tools can create hierarchies based on it |
| The existing PDF is a scanned copy and the catalog is a picture. | First use OCR to add the text layer, and then process it according to the previous line | Table of contents cannot be read and matched without text layer |
| Table of contents is missing or chapter naming is irregular | Manually add by chapter, or just bookmark key sections | Automatic generation is prone to errors when the structure is chaotic, but manual generation is more controllable. |
| Need to merge or split multiple PDFs | Complete page operations first, and finally generate bookmarks in a unified manner | Merging and splitting will change the page number, and the bookmarks generated first will easily become invalid. |
Before you start: Confirm these points first
- Whether the document is a text version or a scanned version. Use the mouse to select a section of text. If you can select it, it will be the text version; if you cannot select it, you can only select the whole page, which is mostly a scanned copy or picture. This step determines whether to do OCR first.
- Table of contents page numbers are printed page numbers or PDF page numbers. Bookmark jump is based on the physical page number of the PDF. If the table of contents is arranged according to printed page numbers, the front cover, table of contents, and preface will cause deviations and need to be uniformly corrected after generation.
- Whether the chapter hierarchy is clear. First straighten out the first-level chapters, second-level sections, and third-level subsections. When the hierarchy is chaotic, the generated bookmark tree will be flat or misaligned.
- Whether there will be a subsequent merger or split. Once the page changes, the page number will change accordingly. You should complete the page operation first and then generate bookmarks.
- Whether to keep the original file. Save a separate copy before processing. When the generated results are not satisfactory, you can go back to the original and start over.
Steps to use OCR to process scanned catalogs in OmniDoc
- Open download.omnidoc.top, download and install the desktop client, which supports Windows, macOS and Linux.
- Open the PDF file that needs to be bookmarked in the client.
- Perform OCR recognition on the scanned document to turn the text on the page into a selectable text layer.
- Check the table of contents and chapter titles page by page, and if any errors are found, use the paragraph text editing function to correct them directly. OCR results may be incorrect, especially numbers and punctuation in the table of contents.
- Use the mouse to select several chapter names in the table of contents and confirm that they can be selected and copied, indicating that the text layer has taken effect.
- Save as a new file without overwriting the original.
- Use this document with the text layer to continue with the next steps: use universal PDF tools to generate bookmarks by table of contents, or manually add them chapter by chapter.
Check each item after completion
After you get the bookmarked file, check the following points one by one. Problems usually focus on hierarchy and page numbers.
| Check items | How to see | What to do if there is a problem |
|---|---|---|
| Hierarchy | Open the bookmark panel and check whether the second-level section is correctly nested under the first-level chapter. | When the hierarchy is flat, go back to the title style or directory level and reset it. |
| page number | Randomly click on five to six bookmarks to see if they jump to the page with the corresponding title. | The overall offset is adjusted uniformly, and individual errors are manually corrected. |
| name | Is the bookmark text consistent with the text title? | Use the editing function to correct typos and pay attention to words misrecognized by OCR. |
| Omission | Check the table of contents item by item to see if there are any chapters without bookmarks. | Supplement manually added bookmarks |
| Post-merger changes | For merged or split files, focus on checking the connection between each paragraph. | Regenerate after the page number changes, or revise it paragraph by paragraph |
📊 Core comparison
Depending on the file situation, there are three common ways to generate bookmarks, each with different scopes of application.
| Way | suitable document | Main risks | Check the key points |
|---|---|---|---|
| Generated from header styles when exporting | The source file is a standardized document with a unified title style. | The hierarchy is confusing when title styles are mixed | Are the styles of first-level and second-level headings separate? |
| Generate according to text version directory | There is a PDF, the table of contents page is readable, and the page numbers basically correspond. | The directory page number is inconsistent with the physical page | Page offset |
| Manually add items one by one | Missing table of contents, few chapters or special structure | Time consuming and easy to miss chapters | Check chapter by chapter against the text |
❓ Frequently Asked Questions (FAQ)
1. What should I do if my bookmarks are lost after merging PDFs?
Merging will change the page number, and the original bookmark may point to the wrong page or be discarded. It is recommended to complete all page operations first, and then generate bookmarks in a unified manner; the merged files can be regenerated according to the directory.
2. The bookmark page number is always different by a few pages. Why?
The table of contents usually contains printed page numbers, while bookmark jumps are based on the PDF physical page numbers. The number of pages occupied by the cover, contents page, and preface will cause overall offset. It can be corrected by adding the offset uniformly.
3. Can bookmarks be automatically generated for PDFs without a table of contents page?
You can only judge based on the title style or text layer in the text. If the font size and format of the titles are the same, the results will be unreliable. It is recommended to manually add bookmarks of key chapters.
4. What should you look for when choosing a free online tool?
Does not review specific products. You can pay attention to the file size limit, whether the output is watermarked, whether the file will be uploaded to the server and whether the processing method is explained, and whether the bookmark level and page number can be retained after generation. For sensitive documents such as contracts or unpublished papers, local processing is preferred.
📝 Summary
The key to how to automatically generate bookmarks for PDF files is to first make the structure readable: unify the title style, add text layers, check the page number benchmark, and then generate bookmarks. After generation, check the level and page number one by one to make the bookmarks truly easy to read.
Open OmniDoc and use the PDF editor to work with your document


