Convert Markdown to PDF with a self-contained Rust binary via CLI or Node.js.
- Convert Markdown to PDF using Typst
- Self-contained (no large external dependencies)
- Cross-platform support (x86_64 and aarch64)
- Node.js bindings via napi-rs
- Syntax highlighting for code blocks
mdpdf README.md -o README.pdfnpm install @mdpdf/mdpdf
# or
yarn add @mdpdf/mdpdf
# or
pnpm add @mdpdf/mdpdf
import { markdownToPdf } from "@mdpdf/mdpdf";
const pdfBytes = await markdownToPdf("# this is markdown");cargo build --release --features cli
cargo testnpm run build
npm run test