‘Export to PDF’: export should include a document-TOC / use headings as bookmarks in the PDF / Table of content

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.

3 Likes

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

Thanks.

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.

1 Like

I’m missing this feature so much. A vote from me!

1 Like

Yes please!

2 Likes

I hope this function can be realized, which will help me a lot.

2 Likes

I need this feature!

1 Like

+1 here

1 Like

Use case or problem

When exporting large markdown files, it’s easier to navigated the PDF file with bookmarks.

Proposed solution

Use headings to properly create hierarchical bookmarks in the exported PDF file.

Current workaround (optional)

Using Typora to export to PDF which generates the bookmarks from headings. Downside is that images and block embeddings are not exported properly.

14 Likes

I don’t use the pdf export often, but +1.

1 Like

I use pdf export heavily. Tried using pandoc plugin, but it is not rendering pdf correctly. I generate pretty long notes with dataview plugin, and need bookmarks for headings to navigate the generate pdf easily.

I use PDFs a lot and I think this feature would be very helpful.

6 Likes

I use pdf heavily, strongly recommend add this function

5 Likes

This is a quite useful feature.

2 Likes

My work around is using pandoc.

cd BASE_DIR_OF_INPUT_OBSIDIAN_MD_PATH
pandoc --pdf-engine=xelatex -s -o OUTPUT_PATH INPUT_OBSIDIAN_MD_PATH

The syntax of image should use this format.

![](../assets/media/sceenshoot_20221115091617.png){ width=30% height=30%}
2 Likes

I hope this function can be implemented as soon as possible. I really need this function for pdf export.

3 Likes

I agree, it would be great to have headings in the PDF that correspond with the headings in the content.

1 Like

Hey there @HL.W have you found any way to preserve the Obsidian style when using pandoc? Like when I do a PDF export I get a great-looking PDF out of Obsidian, but the PDF is garbage b/c it lacks a ToC.

Using the pandoc command provided, I do get ToC but the styling isn’t nearly as nice. The code blocks in particular are less appealing vs. the Obsidian style PDF.