Pressmark

approved

by Bismarck

Export notes to PDF with portable theme packs: versionable formats you can share with your team. The same packs the Pressmark CLI uses, so terminal and vault produce identical documents. - This plugin has not been manually reviewed by Obsidian staff.

68 downloadsUpdated 19d agoMIT

Pressmark

Export Obsidian notes to PDF using portable theme packs — formats you can version in git, share with your team, and reuse from the command line.

The layout engine is Chromium in both cases. What changes is who drives it. What does not change is the theme pack.

The same theme pack produces the same PDF from your vault and from your terminal.

Why another PDF exporter

There are plenty of PDF exporters for Obsidian. None of them has a portable format: a folder with a stylesheet and a JSON file that you commit to a repo, review in a pull request, and hand to a colleague so their documents come out looking exactly like yours.

That format is the product. The plugin is how you use it inside Obsidian; the CLI is how you use it everywhere else.

Features

  • Export dialog with a live preview at the real paper proportion, with simulated margins and dashed marks where each page will break.
  • Six built-in formats, from a dense technical spec to an executive report.
  • Customization UI that builds itself from the theme pack's schema. Change colors, fonts, cover height and footer text without writing a line of CSS.
  • Mermaid diagrams rendered as vector graphics, using the format's palette.
  • Cover pages by convention — no special markup. Your first heading, the paragraph or table that follows it, and the first ---.
  • Multilingual: the interface and the document text follow Obsidian's language. English and Spanish included.
  • Your own theme packs, kept inside the vault at .obsidian/pressmark/themes/.

Built-in formats

FormatCoverMade for
reportfull pageFormal reports. The canonical one.
notenoneDiagnostics and lists. Starts right away.
executivefull pageLeadership and steering committees.
technicalhalf pageSpecs with a lot of code. Dense.
minimalfull pageNo color at all. Prints the same in black and white.
modernfull pageProposals and product documents.

Usage

Open a note and click the ribbon icon, or run Pressmark: Export to PDF from the command palette. Pick a format, check the preview, export — then choose where the PDF goes in the system save dialog.

About filesystem access

Pressmark writes the PDF to the location you pick in that dialog, which is usually outside your vault. Obsidian's Vault API cannot write outside the vault, so this is the one place the plugin touches the filesystem directly.

It writes exactly one file: the PDF, to the path you just chose. Nothing is read from outside the vault, and nothing is written anywhere you did not name.

Theme packs

A theme pack is a folder with theme.json and theme.css. There are three levels of customization, with very different costs:

LevelWhat you touchWho it is for
1tokens in theme.json — colors and fontsMost people. It is a form in the settings tab.
2page, cover, footerAnyone who needs their own margins and footer.
3Your own theme.css, with extendsAnyone who knows CSS.

Custom packs go in .obsidian/pressmark/themes/<id>/ inside your vault. A pack of your own can inherit from a built-in one: extends: "_base" works even though _base ships inside the plugin.

See docs/theme-format.md for the full format, and docs/format-rationale.md for why it is shaped the way it is — most of its rules exist because something broke first.

Command line

The CLI is a single static Go binary. Its only external dependency is an installed Chrome — no Node, no Puppeteer, no mmdc.

make build                                  # -> dist/pressmark

pressmark report.md                         # PDF next to the .md
pressmark report.md --theme technical       # another format
pressmark reports/ --theme note --letter    # a whole folder
pressmark --list                            # available formats

How both sides stay identical

Not by sharing code — the CLI parses with goldmark and the plugin uses Obsidian's own renderer, and it has to be that way: only Obsidian resolves wikilinks, embeds, callouts and Dataview blocks. Consistency comes from three things:

  1. The theme pack, which is literally the same file.
  2. An HTML structure contract: both wrap the document in <article class="pm-doc"> and guarantee top-level blocks are direct children. The cover CSS depends on it.
  3. Conformance fixtures in testdata/conformance/, run by both implementations. Inheritance, frontmatter and locale resolution are pinned down by shared JSON cases. If the two sides drift, the suite fails.

Development

npm install
make build      # validates theme packs, builds the CLI
make plugin     # builds the plugin -> main.js
make install    # installs into a vault (VAULT=... to pick one)
make test       # Go and TypeScript, conformance included

Requirements

Desktop only. The plugin uses Electron's printToPDF, which is not available on mobile.

License

MIT

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.