‘Export to PDF’: export should include a document-TOC

Feature request: Notes exported to PDF should have a fully-functioning Table of Contents for PDF readers

Note that I am not referring to an internal compiled table of contents within the document itself. But @Klaas (see comment #1) pointed out this would also be a handy feature. This particular feature could be a part of a larger “export to PDF options” menu. (What other export options would be helpful? Could there be two option menus, a default and a pop-up per-note menu - or even a piece of YAML?)

Use case

I navigate PDFs religiously via the Table of Contents pane in most readers. Not only does a TOC provide quick access to all sections of a document, it provides an at-a-glance overview of the whole document. Without a table of contents, a document is like a scroll: to find your passage and be where you want to be is a linear path downwards. An auto-generated table of contents would vastly increase the accessibility with logical jumping off points available in the side-bar of any reader application. Your notes would be easily digestible and quick to navigate.

I can think of use cases beyond the traditional use of a table of contents, for Obsidian-exported notes. For example, headings could be questions to elicit active recall. The TOC in this instance would be used to test your remembrance and comprehension of information.

Proposed solution

The ‘Export to PDF’ feature for a note would automatically recognise headings and hierarchically include them for the PDF reader. This element of PDFs is a standard, industry-wide practice recognised by even the most basic of PDF reader applications (eg. Preview).

Current workaround

My current solution has been to use PDF Expert (purchased at the hefty price of $79.99) to manually add a Table of Contents, heading by heading.

Related feature requests

Make footnotes inside exported PDFs

Include File Outline or Table of Contents in file produced by “Export PDF”


I would like to add to your proposed solution that a ToC is also created for a PDF Reader’s ToC pane, a feature you mentioned in your use case.

Like you, I use ToCs a lot, even in my Obs notes, and a PDF version without a ToC is incomplete.

That’s a feature I hadn’t intended to request. Since I typically generate my own embedded table of contents, this feature is of lower importance to me. Plus, since formatting of a TOC can vary based on personal preference, it could require additional formatting options or to recognise any CSS code. But I’ve edited the post to include a mention of this kind of TOC which, I agree, would be a pleasant addition to Obsidian’s export capabilities.

1 Like


1 Like

I took a dive into book formatting with markdown a bit ago, I can’t remember everything, and I didn’t take notes.
But something like bookdown might help?
Especially this page

I’m not 100% sure on the syntax of R Markdown but thought this might give you something to go on (And maybe the wider R markdown system?)
I’ll try and let you know if I come across anything else that might help
1 Like

This feature would be very useful.

I had also created a similar feature request, for having bookmarks to headings in the exported PDF.
Idea was that it should make it easier to navigate the pdf in a pdf viewer.