+1 please
Chromiumās Skia/PDF m113, the thing that gives āSave to PDFā in the print page dialog of the browser, exports HTML to PDF correctly, with functioning internal links.
In Obsidian v1.3.3 accessing process.versions
in the Dev Tools (Ctrl+Shift+I on Windows) shows Chrome at version 112.0.5615.183 and Electron 24.3.1 (latest stable)
So I guess itās not a question of the Obsidian team updating Electron.
This bug probably involves some post-processing of the noteās generated preview markup which must have some custom solution to internal links. That has to be turned back into real HTML anchor links, so that printToPDF can do the PDF conversion correctly.
Is this hard to do, would it introduce breaking changes or something?
+1, i would love to have this feature. But i wonder if there arenāt any workarounds for now? like a third party plugin for exporting maybe?
+1 (making it to 5 characters)
@Moonbase59
I fully support this request.
Is it already in the feature request list?
Have a nice day
I agree! It is one of my highly requested features for Obsidian.
But just a thought:
Perhaps it is not since it kind of reduces the need for the users to pay for the subscription that allows them to collaborate with each other.
If you can simply print the .pdf and the .pdf works almost exactly like the note and then you use that file for documentation for your co-workers, perhaps you wonāt need to pay for that subscription.
For workarounds thereās:
- Enhancing Export plugin. For me it doesnāt work well actually
- Incomplete: I wrote this script to convert Obsidian to Latex. It still needs a few improvements, but for simple cases it works. And yeah, it does maintain the internal links
+1 for a this feature request, I have a plethora of reasons to export .md docs to pdf and itās a bit disappointing that none of my tables of content function when I do so. Any one have a work-around for now?
thx, for any help, or the feature implementation, if itās possibleā¦
Great big +1 from me! Iāve just wasted a day trying to write a Python script to fix internal links in Obsidian exported PDF files. PDF is such a cursed format
Itās a strange problem. Footnotes in the exported PDF work - along with the link by a footnote to take you back to the main text where the footnote marker is - but # links made by hand donāt. I wonder whatās happening during the export process that means footnote links work, but # links donāt?
+1. Agreed to have internal links āactiveā in pdf export. That would really be a great improvement to the āexport to pdfā function.
It looks like this might be implemented in v1.3.6 according to @WhiteNoise
No, that is different feature request about the PDF reader in obsidian.
Oh fiddlesticks! You are correct. Bummer.
Iād assume that it is fairly popular.
I have shown Obsidian to my PhD friends, in order to be used for more than note-taking (like writing reports and guide-files).
One of the first things that people ask me is ādoes it export those notes in .pdf properly?ā
For me, properly requires internal links and outline on pdf.
For workarounds thereās:
- Enhancing Export plugin. For me it doesnāt work well actually
- wrote this python program to convert Obsidian to Latex. It does maintain the internal links, as well as the outline
would love to see this implemented in Obsidian, very useful feature, Iām surprised itās been years since this was requested and not yet implemented. I totally understand the complexities of a roadmap and the prioritization of other requests by the developers.
I would love to see this as well but I fear itās is not easy to implement, since obsidian seems to use the print function of the chromium browser it is built on and redirects the output into a pdf.
Currently pandoc with crossref seems the only option to generate a pdf with working links. Unfortunately pandoc doesnāt support obsidian wikilinks. But there is a plugin (I think it is called link converter) to convert obsidian links into standard markdown links that can be handled by pandoc.
There are two plugins as far as I know that integrate pandoc into obsidian. One of these is obsidian-enhancing-export. But its not easy to setup a working pandoc environment. In particular you need also e latex environment since pandoc cannot translate markdown directly to pdf but first convert it to latex which is then converted to pdf using pdflatex or xelatex.
For those who dare there is a tutorial how to setup obsidian for academic writing which also covers pandoc and additional plugins
https://betterhumans.pub/obsidian-tutorial-for-academic-writing-87b038060522
+1. Fiddling with pdf export as well (wanting to export a whole folder of notes as a single ebook in epub / pdf / html).
Iāve been thinking about this, and I think Iāve worked out a possible solution, based on the fact that external (http://) links work.
- Just before a PDF is exported, rewrite all in-document links to dummy external links, e.g a link to
[[#Some heading]]
gets rewritten to[Some heading](http://dummy.url/#Some%20heading)
- Export PDF using Obsidianās built-in PDF export
- Use PDF-LIB to rewrite the dummy links in the exported PDF back to in-document links
I think itād be possible to write an Obsidian plugin to do this, either by hooking up a notification to when PDFs get exported, or triggering PDF export from the plugin itself.
Based on my limited understanding of the PDF format, it might be quite hard to do 3), since I believe PDF internal links are based on actual locations in the document (e.g āa rectangle halfway down the page on page 23ā) rather than named headers (eg ā#Some headingā). Should be doable though, even if itās just by searching through the document looking for the location of āSome headingā in the correct style or something.
Anyway. My time for actual coding is very limited right now (Iām trying to finish a big writing project), but I might have a crack at it when that project is done.