Turn a folder of Obsidian notes into one polished PDF, with wiki links, embeds, callouts, Mermaid and community plugins. Make redline PDFs of the changes between two versions. Runs locally or in CI.
Documentation: https://spenhouet.com/obsidian-pdf-exporter/
ope turns a folder of an Obsidian vault into one PDF. Every folder becomes a numbered section with a table of contents, a running header and footer, and the Obsidian syntax in the notes is rendered: wiki links, embeds of notes, headings, blocks and images, callouts, highlights, tasks, footnotes, math, Mermaid and Bases. Community plugin syntax from Dataview, Meta Bind, Templater, Folder Notes, Block Link Plus, Excalidraw, draw.io and pandoc citations is rendered too. Templates control the look with CSS. It runs on the command line, without Obsidian, so it works in CI.
ope export ./MyVault/Handbook --title "Team handbook" --version 1.2.0
Each feature page of the docs shows the Markdown next to the rendered PDF.
Install
macOS / Linux
curl -LsSf uvx.sh/obsidian-pdf-exporter/install.sh | sh && ope setup --yes
Windows
powershell -ExecutionPolicy ByPass -c "irm https://uvx.sh/obsidian-pdf-exporter/install.ps1 | iex; ope setup --yes"
ope setup installs the native libraries WeasyPrint needs and pandoc. Mermaid diagrams are drawn inside ope, so Node.js and a browser are not needed. See Installation for every OS, uv, pip and CI. For CI, a container image is published with each release: ghcr.io/spenhouet/obsidian-pdf-exporter (CI integration).
Quick start
ope export ./MyVault/Handbook --title "Team handbook" --version 1.2.0
ope export ./MyVault/Handbook --template ./my-template/
ope redline ./MyVault/Handbook --from-commit v1.1.0 --to-commit HEAD
ope --help
Redline: see every change in the PDF
ope redline turns two git commits of a folder into a tracked-changes PDF: inserted text underlined in blue, removed text struck through in red, moved text in purple and a change bar in the margin, in the layout of the real document. A change summary lists every changed section. The side-by-side style shows the old and the new document in two aligned columns, -O redline.collapse=on shows only the changes, and --blame adds the author, date and commit message of every changed block next to the page. It is made for reviews, approvals, audits and release notes of documents kept in git.
ope redline ./Policy --from-commit v1.0.0 --to-commit v1.1.0