alexkucera1k downloadsExports a note or collection of notes to a pretty Typst PDF.
Export Obsidian notes to PDF using the Typst typesetting system. Supports customizable templates, batch processing, and advanced formatting options.
This plugin was born from frustration with Obsidian's native PDF export, which simply renders notes using the current Obsidian theme. While functional, this approach lacks the professional typesetting quality needed for serious documents.
The immediate catalyst came from a practical need: my wife required single-page PDFs – documents where the page grows to accommodate all content without pagination breaks. This format is ideal for digital preservation and viewing, keeping everything in one continuous, scrollable document. The native export couldn't provide this. By leveraging Typst's powerful typesetting engine, this plugin delivers:
This transforms Obsidian from a note-taking tool into a complete document preparation system, bridging the gap between quick notes and professional output.
Typst offers several advantages over standard PDF export:
⚠️ Important: This plugin requires template files to function. Always use the complete ZIP package.
typst-pdf-export.zip) - NOT just main.js{VaultFolder}/.obsidian/plugins/typst-pdf-export/templates/ directory is included with all .typ files:.obsidian/plugins/typst-pdf-export/
├── main.js
├── manifest.json
├── styles.css
└── templates/
├── default.typ
├── modern.typ
├── article.typ
├── report.typ
└── universal-wrapper.pandoc.typ
Ctrl/Cmd + R or restart)https://github.com/AlexKucera/obsidian-typst-pdf-exportFor development or the latest changes:
cd {VaultFolder}/.obsidian/plugins/
git clone https://github.com/AlexKucera/obsidian-typst-pdf-export.git typst-pdf-export
cd typst-pdf-export
npm install
npm run build
Plugin doesn't work after manual installation?
templates/ directory exists with all .typ filesMissing templates error?
Required:
Ctrl/Cmd + P → "Export to Typst PDF"Go to the plugin settings and click Check Dependencies to ensure all required tools are properly installed.
| Category | Options | Description |
|---|---|---|
| General | Template selection, paper size | Basic export configuration |
| Typography | Font family, size | Control document appearance |
| Page Setup | Margins, orientation | Layout customization |
| Tool | Minimum Version | Purpose | Installation |
|---|---|---|---|
| Pandoc | 3.7.0 | Markdown → Typst conversion | Download here or brew install pandoc |
| Typst | 0.13.0 | PDF generation | Download here or brew install typst |
| ImageMagick | 7.1.2 | Enhanced image processing (optional) | Download here or brew install imagemagick |
Note: The plugin will display warnings if your installed versions are below the minimum requirements. While older versions may work, they are not officially supported and may cause compatibility issues.
The plugin includes an automated dependency checker accessible through:
Default Template (default.typ)
Modern Template (modern.typ)
Article Template (article.typ)
Report Template (report.typ)
Create your own Typst templates by:
.typ files to the plugin's templates/ directoryExport multiple notes at once:
The plugin automatically processes:
Format them like this:
```email
to: [email protected]
subject: Hello World
---
Hi there,
this is my new body
Best!
JB
```
This plugin works by converting your Markdown notes to PDF through a static conversion pipeline (Markdown → Typst → PDF). Due to this design, certain Obsidian features that generate or modify content dynamically cannot be exported:
DataView Plugin: Queries and dynamically generated tables/lists from DataView will not appear in the exported PDF. DataView evaluates queries at runtime within Obsidian, but the plugin exports the raw Markdown source before this evaluation occurs.
Database/Query Plugins: Similar to DataView, any plugin that generates content through database queries or dynamic rendering will not be included in the export. This includes:
Plugin-Specific Syntax: Plugins that introduce custom Markdown syntax extensions will not translate to the PDF unless Pandoc explicitly supports that syntax. The conversion pipeline relies on Pandoc's understanding of Markdown, which may not recognize plugin-specific extensions.
Custom Styling: Visual styling applied by themes or plugins (such as callout styling, custom CSS classes, or plugin-specific formatting) will not be preserved. The PDF output uses Typst templates for styling, which are independent of Obsidian's rendering engine.
For content you need in the exported PDF:
| Problem | Solution |
|---|---|
| "Pandoc not found" | Install Pandoc and ensure it's in your system PATH |
| "Typst not found" | Install Typst CLI and verify PATH configuration |
| Outdated version warning | Update dependencies to meet minimum versions (Pandoc 3.7.0+, Typst 0.13.0+, ImageMagick 7.1.2+) |
| Export hangs | Check if files are locked by other applications |
| Images not showing | Verify image paths and file permissions |
| Template errors | Check template syntax and file integrity |
# Clone the repository
git clone https://github.com/akucera/obsidian-typst-pdf-export.git typst-pdf-export
cd typst-pdf-export
# Install dependencies
npm install
# Start development server
npm run dev
typst-pdf-export/
├── src/
│ ├── core/ # Core system components
│ ├── converters/ # Conversion pipeline
│ ├── ui/ # User interface components
│ ├── templates/ # Template management
│ └── utils/ # Utility functions
├── templates/ # Built-in Typst templates
├── main.ts # Plugin entry point
└── manifest.json # Plugin metadata
npm run dev # Development with file watching
npm run build # Production build with type checking
npm run version # Version bump and manifest update
The plugin follows a modular architecture with:
This plugin was developed using vibe coding techniques with AI assistance, but with crucial safeguards to prevent AI slop. Unlike typical vibe coding where code is generated without detailed review, this project employed strict quality control measures:
slopwatch and vibe-check to catch and prevent low-quality patternsThis approach allowed rapid development while maintaining the code quality expected of a production Obsidian plugin. The result is clean, maintainable code that leverages AI's productivity benefits without sacrificing quality or introducing the technical debt typically associated with pure vibe coding.
Contributions are welcome.
git checkout -b feature/amazing-featuregit commit -m 'feat: add amazing feature'git push origin feature/amazing-featureThis project is licensed under the GNU GPL v3.0 License - see the LICENSE file for details.
This plugin uses the following dependencies:
If you find this plugin helpful, consider supporting its development:
Author: Alexander Kucera
Website: alexanderkucera.com
GitHub: @AlexKucera
If this plugin helped you, please consider giving it a star on GitHub.