ObsidianPrintify is a command-line tool to convert Obsidian-flavored Markdown files into multi-column HTML files, which can then be easily saved as PDFs using the browser and printed.
This tool handles the following:
- Stripping YAML frontmatter and Dataview sections.
- Converting inlined Obsidian links to HTML.
- Embedding images as base64.
- Handling LaTeX math with MathJax.
- Creating a multi-column HTML layout.
- Saving the HTML file, which can be printed to PDF via the browser.
To install ObsidianPrintify, clone this repo and run the command:
pip install -e .
Use the obsprint
command to convert Markdown files:
obsprint input.md output.html --orientation portrait --columns columns-2
input_file
: Path to the input Markdown file.output_file
: Path to the output PDF file.--orientation
: Page orientation (portrait
orlandscape
). Default isportrait
.--columns
: Number of columns (columns-2
,columns-3
, orcolumns-4
). Default iscolumns-2
.
obsidian_printify/
├── obsidian_printify
│ ├── __init__.py
│ └── cli.py
└── setup.py