Tool to add ToC (bookmarks) to existing PDF?
#1  Shohreh 12-29-2020, 08:06 PM

Some PDFs have no table of contents (bookmarks). Here's an example as shown in SumatraPDF.

Is there a software* to add one to an existing PDF file, ie. I don't have the original source?

Thank you.

* qpdf, cpdf, mutool, etc.

Edit: Should have checked the archives before asking

Just create a text file by copy/pasting the ToC (with a bit of regex, possibly), and run this command:

cpdf.exe -add-bookmarks bookmarks.txt input.pdf -o output.pdf

#2  Tex2002ans 01-09-2021, 04:29 AM
Quote Shohreh
Edit: Should have checked the archives before asking
I was just going to point you to that topic. Follow willus's advice with cpdf.

Another helpful thing you can do is search all of Mobileread for a specific question/answer.

Type this into your favorite search engine:

random problem
The key part being the "site:". This tells Google/Bing/[...] to only give you hits from this website.

So you could've used:

create pdf table of contents
I did that search on Google/Bing, and that topic popped up 3rd.

Today's Posts | Search this Thread | Login | Register