As of right now, Obsidian doesn't have a built-in way of generating PDFs from multiple notes at the same time without plugins, and this plugin aims to provide a solution for that problem.
- Install the plugin, either from GitHub or from Obsidian's registry.
- Enable the plugin.
- Click on the book icon in the ribbon: a view named
Preview PDF
should open. - (Optionally) Open the sidebar so that it's easier to use, using the
…
menu. - Add files.
- (Optionally) Remove files.
- Click on the save button.
- Profit! 🎉
Most of the PDF rendering code is in PdfRenderer.ts, but basically it:
- generates a
div.print
with the rendered Markdown - prints that with electron's
WebContents.printToPDF()
- renders the resulting PDF with PDF.js!
- no Table of Contents generation
- no page header/footer
- no "each file on own page"