multi_convert
Python package for converting document formats between Markdown, HTML, and PDF.
Installation
pip install multi_convert
Requires Python 3.10 or newer.
Usage
Library
from multi_convert import convert
convert("notes.md", "notes.pdf")
convert("page.html", "page.md")
Both formats are inferred from the file extensions. convert returns the output
path and raises ConversionError if the input is missing or either extension is
not one of .md, .html, or .pdf.
Command line
multi-convert notes.md notes.pdf
Supported conversions
| Markdown | HTML, PDF |
| HTML | Markdown, PDF |
| PDF | Markdown, HTML |
Every conversion routes through Markdown as an intermediate representation.
Because PDF text extraction recovers plain text only, converting from PDF
loses headings, tables, and emphasis; the other five directions preserve
structure.
License
MIT