Skip to content

1.0.0 - 2026-05-15

Choose a tag to compare

@github-actions github-actions released this 15 May 20:12
2d63af1

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 → an lopdf post-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 /Lang for accessibility; inline link tooltips.
  • Configuration system (styling/) — serde-derived deny_unknown_fields TOML schema with typo suggestions; cascade resolver (default theme → inherits chain → [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 under docs/.
  • Frontmatter — YAML / TOML parsed into document metadata.
  • Public APIparse_into_file, parse_into_bytes, and symmetric parse_into_file_with_style / parse_into_bytes_with_style; path args accept impl AsRef<Path>; ConfigSource (Default / Theme(&str) / File / Embedded); MdpError::ParseError carries structured line + 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.
  • Breakingpub mod pdf removed (rendering is internal behind parse_into_* / render_to_*); MdpError::ParseError raw byte position became structured line + column; the fetch feature no longer needs a separate TLS feature (rustls-tls / native-tls removed) and svg is now opt-in; crate modernised to edition 2024, MSRV 1.85.
  • Security — removing genpdfi (#31) drops encoding (RUSTSEC-2021-0153), lzw (RUSTSEC-2020-0144), rusttype (RUSTSEC-2021-0140) and stb_truetype (RUSTSEC-2020-0020) from the dep graph; font handling now uses ttf-parser. Downstream consumers can drop the corresponding cargo-deny exclusions.

Resolves #12, #13, and #31.

Install markdown2pdf 1.0.0

Install prebuilt binaries via Homebrew

brew install theiskaa/tap/markdown2pdf

Download 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