Skip to main content
10 votes

How to create clickable table of contents in a PDF?

k2pdfopt (free, open source) can also do this by supplying a text file. See the -toclist option. Use like so: k2pdfopt -mode copy -n -toclist my_chapter_list.txt srcfile.pdf -o outfile.pdf ......
willus's user avatar
  • 291
7 votes

How to create clickable table of contents in a PDF?

Jpdfbookmark can work for scanned books Prepare the TOC in .txt file Chapter 1. The Beginning/23 Para 1.1 Child of The Beginning/25,FitWidth,96 Para 1.1.1 Child of Child of The ...
Ooker's user avatar
  • 327
3 votes

How to create clickable table of contents in a PDF?

I wrote an open source command line toolset called pdf.tocgen just for doing this. It uses the embedded font attributes and position information of headings to generate a table of contents ...
Krasjet's user avatar
  • 31
3 votes

How to create clickable table of contents in a PDF?

THIS PART IS EDITED For 'software-generated' PDF-files, i.e. PDF's not created from scans, I recommend to use (and upvote the answer by Krasjet) pdf.tocgen. Using this package becomes even easier with ...
dalanicolai's user avatar
3 votes

How to create clickable table of contents in a PDF?

I am used to a simple and free tool that adds clickable bookmarks to PDF or DjVU files: http://handyoutlinerfo.sourceforge.net/. You first have to prepare (and import in the tool) bookmarks entered ...
Patrick Bourdon's user avatar
2 votes

How to create clickable table of contents in a PDF?

The best solution I found: https://wiki.gnome.org/Attic/PdfMod Extract: You can reorder, rotate, and remove pages, export images from a document, edit the title, subject, author, and keywords, and ...
Dieudo's user avatar
  • 21
2 votes
Accepted

What are "open" and "closed" settings in PDF bookmarks?

When you initially open your PDF file in your favorite PDF reader, the "open"/"closed" option determines whether the bookmark is by default expanded (open) or not (closed). For ...
xFioraMstr18's user avatar
2 votes
Accepted

How to OCR tables of contents to proper outputs?

Define what is: "fix it at the first place". If you want to fix wrong output from OCR analysis, a simple solution on an infinite set of TOCs you will never make. You will never apply all variations. ...
Stilgar Dragonclaw's user avatar
1 vote

Best practice for ebook with large number of chapters (e.g. in thousands)

A web post about epub expandable TOC was discussed at the following link (and there's an example epub too). The discussion there might yield a solution for you, or at least be worth reading (and view ...
granite's user avatar
  • 326
1 vote

Trying to repair unresolved hyperlinks in TOCs that crop up from time to time in conversions

I learned about Calibre's ability to edit and attempt to repair these types of issues. Bring it into Calibre's book editor w/ 'T' and do a repair check and allow it to repair what it can. This took ...
John IV's user avatar
  • 11
1 vote

Hash (#) in filename loses chapter information when converted with calibre

First, I don't have any insight into CLI calibre and you might get a better answer from Mobileread or by posting a bug, but my guess is that the # character must be reserved exclusively for fragment ...
idiotprogrammer's user avatar
1 vote

Nested menus in Mobi

The Amazon Publishing Guidelines has sample code for making a nested html TOC. It's on page 16 <div>Section 1</div> <div style="margin-left:2%;">Chapter 1</div> <div ...
idiotprogrammer's user avatar
1 vote

ePub 3: Finding the Navigation document

I'll post an answer which seems to be working for me. I found relevant documentation here: http://www.idpf.org/epub/30/spec/epub30-publications.html#sec-package-documents Using Ruby and Nokogiri, I ...
David Aldridge's user avatar
1 vote

Epub without a Table of Contents, is it possible?

I'm guessing that you are asking the question in the wrong way: you actually want to hide the HTML entries from the TOC so that the TOC doesn't spoil any surprises. I have good news. In epub3 you can ...
idiotprogrammer's user avatar
1 vote

My HTML toc is not showing up in Calbre MOBI output

Just a suggestion but you could try: Outputting your DOCX format to html from within MS-Word, Making sure that it all works including the ToC, when it is in HTML format, preferably using more than ...
Steve Barnes's user avatar
1 vote

Sub-chapters based on h2 tags in ePub file

Calibre editor has a graphical interface that lets you edit the ToC of a given ebook file (the ToC editor itself is accesible also from the default window, without the need to open the full editor). ...
Sekhemty's user avatar
  • 6,224
1 vote

How to create clickable table of contents in a PDF?

So in 2023, a better way to do this is to use cpdf and an LLM (large language model), like GPT4. To add bookmarks to a PDF using its Table of Contents (TOC) with cpdf, follow these steps: Extract the ...
HaoZeke's user avatar
  • 181
1 vote

How to create clickable table of contents in a PDF?

I understand most of you probably prefer an open source command line based solution but sometimes a good app can save you a lot of time. If you're on a Mac I can recommend: https://www.onekerato.com/...
Stofke's user avatar
  • 111
1 vote

How to create clickable table of contents in a PDF?

WPS office suite on Windows allows creating or editing pdf's TOC Be aware that it's a bit invasive though (shortcuts, default, runs in background...)
Arthur's user avatar
  • 11
1 vote

How to create clickable table of contents in a PDF?

Here is my repository that I plan to automate the procedure. https://github.com/aminya/tocPDF For now, it is the manual procedure (which is also inspired by other people answers).
Amin Ya's user avatar
  • 111

Only top scored, non community-wiki answers of a minimum length are eligible