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?

3 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: Type definitions for the latest 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

Do you mean there is no solution to export pdf with backlinks?

Not currently. Not by default. There could be a Community Plugin you’d install, but I think it has yet to be developed.

You can export single files as PDFs currently, probably with wkhtmltopdf.

Pandoc is a powerful tool, https://pandoc.org , however, you’d have to go into your vault directory, use Pandoc to convert the Markdown files to PDF with LaTeX, then combine them with pdftk, ghostscript, or imagemagick. All of which would require some scripting to make things easier to repeat later on, but for a normal user who doesn’t want to tinker, having a community plugin would be idea. It’s just not a reality yet.

The Pandoc plugin that others are referencing is probably this: Plugins - Obsidian, but it still only does one file at a time.

Do you know how to write a script like this? I’m sure many would be interested in a set of instructions for this… I know I would like to have my whole vault as an epub to view on my ereader…

1 Like

Use case or problem

Currently, Obsidian PDF export don’t do anything to wikilinks (ie, links are not active.)

Proposed solution

What if, obsidian could export whole vault into PDF like this
https://html.spec.whatwg.org/print.pdf of this website https://html.spec.whatwg.org/

Current workaround (optional)

none.

Related feature requests (optional)

none.

5 Likes

Yes, at least links within the same PDF should be functional, see this FR: PDF export: Make links within same document functional

2 Likes

Export entire vault to PDF with links would be an incredibly valuable feature.

5 Likes

Agreed, absolutely.

1 Like

Needed :slight_smile:
And it would be great first to make one transitional big md file, to be able to make some modifications before exportation. For example, I use some kind of headers in my notes with tags, creation date and update date. But I wouldn’t like to have that on the exported file, so I would need to delete some lines.

This feature is particularly important for the next decades as we may experience in some countries blackouts due to energy shortage. So it would be valuable to print at least some useful parte of our vaults.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Morbid thought, but something like this would be especially valuable for preserving research/journals after someone dies.

I was after the same kind of tool. Whole vault into single ePub.
I didn’t find anything and I’m thinking of writing some Python libraries to do it.
Perhaps someone would like to colloborate?

1 Like

Hi there, I think I’ve created a plugin that is at least similar to what you guys were talking about.

I haven’t published the plugin yet but here is the GitHub repo if you guys want to check it out.

As of now, I haven’t yet created a proper README file, but I’m working on it :muscle:

EDIT: this is my first ever plugin