PDF Export the entire vault with backlinks

Does anyone know how to export your entire vault as a PDF? I looked around the forums and found vague posts stating you should use pandoc. I did, but it’s the same as using Export to PDF function.

Tried the link below but -d option isn’t available for pandoc on Windows

I even tried the long form version of the command where you do

pandoc -f markdown *.md -o output.pdf

The final pdf was everything smushed together. Is there a specific tutorial that you use to export your notes for sharing w/ non-technical folks?

2 Likes

Pandoc is a powerful tool but it is not Obsidian-specific. You may have better luck looking for more general resources elsewhere on the web. Edit: Your request may sound simple, but I think there’s a lot of inherent complexity. How do you decide where to start and end? What about recognizing embedded content, especially notes embedded in other notes? What if you have an embed loop? Point is: this is not a trivial task, in my opinion.

Otherwise, Obsidian does not have an “Export all as PDF” feature at the moment. You may want to submit one to #feature-requests.

In order to reduce complexity, you can probably start by supporting a subset of the key features of Obsidain (excluding embedding dynamic content, since it might lead to more complexity). As for where to start, it’s a fair point, I would imagine a dialog asking for the starting point. From there you can build a tree through the links and pull in those specific documents/pages. For embedded content, you can cut support for types of content by choosing file types that are fairly static (pdf/images). That might help mitigate the embedded loop altogether.

Obsidian isn’t open sourced, so I cannot look and make suggestions. Therefore, I am not sure how hard it would be to design an export to PDF function that builds a tree of links/documents based on a “start” page.

Although, I think that carefully crafting a subset of features that is supported and types of content that is supported for pdf export would probably help make the task relatively more possible vs not.

I found a similar request as mines already floating in the #feature-requests section so I will piggyback there.

Thanks for the information.

1 Like

This is likely possible via the API, since Obsidian is based on a plugin architecture: GitHub - obsidianmd/obsidian-api

Sweet! I see they also have a demo plugin example. Off the top of my head I think one can use this to find links and reference file paths to be added to the pandoc inline command.

Thanks for the link!

1 Like

I’m completly lost with pandoc and I’m searching for this option to print everything since nearly one year now…
I didn’t get it to work and am just sitting here and waiting for someone to write a plugin for it, because I am unable to do it even with tutorials :frowning:

1 Like

Yeah I noticed that some of the tutorials use a YAML file to specific some funky options. I looked at their documentation and couldn’t exactly figure out what those options do.

For me, I literally forked and tried to replicate their work with their commands, and somehow the version of Pandoc on Windows is different enough that it doesn’t work. I even tried to do it in Ubuntu VM, still didn’t work.

Even with the API provided, I will probably have to do a deep dive of the Pandoc documentation in order to figure out the basics.

1 Like