Skip to content

Does PyMuPDF support TOC creation from a pdf document? #2015

Answered by JorjMcKie
tikitong asked this question in Q&A
Discussion options

You must be logged in to vote

Talking about TOC in PDF can easily become confusing:

  1. A PDF may have a special internal structure of interrelated objects, with forward, backward, downward, upward pointers. PDF viewers show this structure on the left in a separate detail windows, where you can click on single items for fast access of the respective page.
  2. Then there may also (or only) exist pages in the PDF's content, showing a "printed" version of that structure. In most cases, the single lines in this area are PDF internal links. So clicking on them will also jump to the respective page.

A PDF technically can have both of the above things, or just one, or neither. If neither exists or just number 2 above, then doc.get…

Replies: 4 comments 14 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
11 replies
@bsdcpp
Comment options

@JorjMcKie
Comment options

@bsdcpp
Comment options

@JorjMcKie
Comment options

@bsdcpp
Comment options

Answer selected by tikitong
Comment options

You must be logged in to vote
2 replies
@JorjMcKie
Comment options

@tikitong
Comment options

Comment options

You must be logged in to vote
1 reply
@tikitong
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants
Converted from issue

This discussion was converted from issue #2012 on November 02, 2022 08:54.