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

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.

would like to add a +1 to this request, it’s just fundamental usability

1 Like

yes, this feature is also strongly needed for Chinese Obsidian fans.

1 Like

Use case or problem

Exporting PDF works, however it would be best if the file outline (or Table of Contents) is included as part of the PDF for navigation ease.

Proposed solution

Current workaround (optional)

Related feature requests (optional)

10 Likes

The current ‘Export to PDF’ is really a print to PDF option, so TOC wouldn’t work as you intend.
Have to wait for a Convert to PDF option for digital use.

2 Likes

Yes.

Typora like TOC in the beginning of the file will be really handy.

Thanks for the heads-up on this! Currently finally getting into that pandoc rabbithole instead :joy:

I could see this coming in handy but I don’t think this is something I’d want all of the time.

Perhaps we could “Export to PDF” and there could be a drop-down menu that says “Outline Only”, “Note Only”, or “Outline then Note”.

Also, I’m curious on the formatting of the Outline of Table of Contents in a PDF. Some of my Outlines are heavily nested and would look silly as a TOC. Sometimes I might only want the H1, H2, H3, but I might want the PDF export to ignore the lower levels.

6 Likes

I figured I’d drop in here a workaround of sorts I threw together for those who are using Linux:
Shell script to generate pdf table of contents from headings

It uses a nice python project that could probably be adapted to work with powershell as well, but I main linux so I only wrote a shell script.

2 Likes

Definitely needs this!
Here’s a quick screenshot of the idea:
(and also +1 for giving the option of exporting H1 H2 H3 only)
image

1 Like

why Chinese specifically?

For PDFs with a large number of pages, it can be incredibly frustrating to navigate to the correct page if the PDF does not support hyperlinks. Could you add better navigation for the pdf viewer, and maybe even table of contents navigation? Pdf.js comes to mind as a useful library.

12 Likes

Bro, share this post in discord if possible, Obsidian is very hard to use for PDFs, you can’t even turn pages with arrow keys, or use other standard keys to move around in the PDF. I am forced to use another app for PDFs.

Another Request allow linking to a part of PDF using internal links. This can be worked out by, using linking with exact PDF search result…

2 Likes

I have implemented this feature, and it has not been publish on the community plugin market at present, many aspects need to be improved, welcome to try and give suggestions:

1 Like

which feature? tried your plugin, but TOC navigation is not working same as for standard plugin

This feature is a tremendous necessity for me; I migrated from Typora and had always assumed that all markdown document tools would offer this functionality. I’m quite surprised to find that Obsidian doesn’t have it, and the known plugins don’t seem to implement it well. I am looking forward to this basic feature being available soon. Thank you to all the community developers for your hard work.

试过了,似乎不太行呀

If you can right-click on Obsidian to export PDF with a directory navigation bar effect, the command line work of pandoc will be superfluous, because this is a very basic function but it still doesn’t exist.

This feature is much needed.

1 Like

The TOC inside the document?