0

I recently found in this answer that it's fairly simple to edit the code in a PDF document, using a text editor, to alter how page numbers are displayed in a viewer. This solved a key problem for me.

Given that, I've been trying to find a way to similarly edit the bookmarks coded into a PDF document. Unfortunately, I can't find any promising object tags in a document with bookmarks, and I haven't been able to find information about that here or elsewhere online.

What is the format for bookmarks encoded in a PDF document?

Is it possible to edit them directly with a text editor, and if so, how?

Note that the question currently marked as a duplicate is not the same as the present question. This question is asking about the internal format and possibility of manually editing a PDF encoded file; none of the answers on that other question address this (all answers point to using outside automated tools).

  • See Also: [Understanding the PDF File Format](https://blog.idrsolutions.com/understanding-the-pdf-file-format/) – DavidPostill Jan 14 '23 at 17:59
  • @DavidPostill: Despite the title of that page, it doesn't look to me like it actually explains internal format structure. The sub-pages seem to be explaining usage of the JPedal Swing Viewer tool. – Daniel R. Collins Jan 14 '23 at 20:26
  • A question is a duplicate if the **answer** to the duplicate answers the question. I would agree that the accepted answer to the duplicate answers this question. The answers have a link to Python code that can edit the bookmarks of a pdf file. – Ramhound Jan 14 '23 at 23:48

0 Answers0