1.0.0 - 2026-05-15
Release Notes
First stable release — the genpdfi dependency is removed and the old pub mod pdf is replaced by a fully rewritten in-tree rendering engine built directly on printpdf 0.9. The library now owns the entire path from the lexer's token stream to PDF bytes, with a complete TOML configuration system, six themes, a redesigned public API, and frontmatter support.
- In-tree rendering engine (
src/lib/render/) — four-stage pipeline: token stream → block IR → positioned page op-streams →printpdf 0.9→ anlopdfpost-process pass for features printpdf doesn't expose (link tooltips, Catalog/Lang). - Markdown rendering — headings 1–6 with anchors and PDF bookmarks; glyph-accurate line wrapping; inline bold/italic/monospace/strikethrough/underline/superscript/subscript/small-caps/small; ordered/unordered/GFM-task lists with arbitrary nesting and loose-vs-tight spacing; GFM tables with per-column alignment and header repeat across pages; blockquotes with configurable borders and cross-page backgrounds; fenced and indented code blocks; images (local PNG/JPEG, URL fetch and SVG rasterization behind features, HTML
<img>, alignment, max-width, captions); GFM footnotes with bidirectional anchors and multi-line bodies; definition lists; cross-references ([text](#slug)); inline HTML mapped to run styles (<sup><sub><u><s><del><small><kbd>); hyphenation for overflow words; NBSP (U+00A0/U+202F/U+2007) respected by the wrapper. - Document features — configurable page size/orientation and manual page breaks; headers/footers with page-number substitution and per-piece gap control; auto-generated TOC with clickable entries and convergent page numbering; title page (title/subtitle/author/date); PDF metadata (title/author/subject/keywords/creator) and Catalog
/Langfor accessibility; inline link tooltips. - Configuration system (
styling/) — serde-deriveddeny_unknown_fieldsTOML schema with typo suggestions; cascade resolver (default theme →inheritschain →[defaults]→ per-block →--theme); six bundled themes (default,github,academic,minimal,compact,modern); every visual choice user-overridable. Prose configuration guide and annotated reference config ship underdocs/. - Frontmatter — YAML / TOML parsed into document metadata.
- Public API —
parse_into_file,parse_into_bytes, and symmetricparse_into_file_with_style/parse_into_bytes_with_style; path args acceptimpl AsRef<Path>;ConfigSource(Default/Theme(&str)/File/Embedded);MdpError::ParseErrorcarries structuredline+column. Page size configurable from TOML (#12); images embedded into the PDF (#13). - Robustness — hostile/mistaken numeric config (zero/negative/NaN font size, line height, margins, custom page size) is clamped; bounded parser recursion returns a typed error instead of overflowing; linear-time table-start scan; U+0000 normalised to U+FFFD per CommonMark; real line/column in config errors; frontmatter tolerates a leading UTF-8 BOM. List bullets and task checkboxes are font-independent vector paths; underline/strike decorations darkened for legibility.
- Breaking —
pub mod pdfremoved (rendering is internal behindparse_into_*/render_to_*);MdpError::ParseErrorraw bytepositionbecame structuredline+column; thefetchfeature no longer needs a separate TLS feature (rustls-tls/native-tlsremoved) andsvgis now opt-in; crate modernised to edition 2024, MSRV 1.85. - Security — removing
genpdfi(#31) dropsencoding(RUSTSEC-2021-0153),lzw(RUSTSEC-2020-0144),rusttype(RUSTSEC-2021-0140) andstb_truetype(RUSTSEC-2020-0020) from the dep graph; font handling now usesttf-parser. Downstream consumers can drop the correspondingcargo-denyexclusions.
Install markdown2pdf 1.0.0
Install prebuilt binaries via Homebrew
brew install theiskaa/tap/markdown2pdfDownload markdown2pdf 1.0.0
| File | Platform | Checksum |
|---|---|---|
| markdown2pdf-aarch64-apple-darwin.tar.xz | Apple Silicon macOS | checksum |
| markdown2pdf-x86_64-apple-darwin.tar.xz | Intel macOS | checksum |
| markdown2pdf-x86_64-pc-windows-msvc.zip | x64 Windows | checksum |
| markdown2pdf-aarch64-unknown-linux-gnu.tar.xz | ARM64 Linux | checksum |
| markdown2pdf-x86_64-unknown-linux-gnu.tar.xz | x64 Linux | checksum |