Skip to content

Add PDF index when exporting PDF #3238

Closed

Description

@71GA

Describe your feature request

When "Marktext" exports PDF it doesn't create a PDF index¹. It would be really nice if you could enable users to toggle whether PDF index is added to the PDF.

¹ PDF index is what most people refer to as "table of contents".

What problem does this feature solve?

It is extremely hard to navigate large PDF files if there is no PDF index. Therefore for exporting large PDF files I still have to resolve to e.g. "Typora", which exports PDF index.

Activity

  1. YalandHong commented on May 3, 2022

    @YalandHong

    Duplicate of #2695 and #80 (comment)

  2. added
    🦄 feature request
    🕊️ export/pdf
    on May 16, 2026
  3. Jocs commented on Sep 22, 2026

    @Jocs
    Member

    This is implemented now.

    Exported PDFs now carry a bookmark/outline tree built from the document's headings, so the reader's navigation pane is populated — the export passes generateTaggedPDF + generateDocumentOutline to printToPDF, producing /Outlines and /StructTreeRoot from h1–h6.

    Shipped in v0.20.0-beta.5 (51b039b3); not in stable 0.19.1.

    One note on the "and a toggle for it" half: there is no setting — the outline is always generated. If you would specifically like it to be switchable, please open a separate issue for that.

    Closing as completed. (See also #2695, the older thread for the same feature.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    🕊️ export/pdf🦄 feature request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions