Pipe from stdin
Run `cat notes.md | npx mdtopdf-cli -t report -o notes.pdf` right in any shell pipeline.
Developer Workflow · Zero Local Chromium
Generate styled PDFs from your terminal, build scripts, or GitHub Actions in one command — with Mermaid, KaTeX, TOC, and 10 templates out of the box.
npx mdtopdf-cli README.md \
-t github \
--toc \
--page-numbers \
--footer "Acme Engineering" \
-o output.pdfRun `cat notes.md | npx mdtopdf-cli -t report -o notes.pdf` right in any shell pipeline.
Skip local Puppeteer, Chrome binaries, and 4 GB TeX Live installs in CI containers.
Attach fresh PDF releases of your README, changelog, or API spec on every git push.
Every conversion runs in memory with zero persistence and no-store headers.
| Field | Type / Values | Default |
|---|---|---|
| markdown | string (required, max 2 MB) | — |
| template | default | executiveBrief | report | academic | modern | github | resume | compact | manuscript | darkPrint | default |
| paperSize | a4 | letter | legal | a4 |
| orientation | portrait | landscape | portrait |
| marginPreset | narrow | normal | wide | normal |
| density | compact | normal | roomy | normal |
| includeToc / includeCover | boolean | false |
| showPageNumbers / showLinkUrls | boolean | false |
| headerText / footerText | string (optional) | "" |
No. mdtopdf-cli is a lightweight zero-dependency Node script that streams your Markdown to our stateless rendering API and writes the resulting PDF directly to disk.
No API key is required for normal usage. The public POST /api/convert endpoint is free and rate-limited fairly per IP to prevent abuse.
Yes. Pass template, paperSize ('a4' | 'letter' | 'legal'), orientation ('portrait' | 'landscape'), includeToc, includeCover, showPageNumbers, headerText, and footerText in the JSON body.
No. Documents are rendered in a short-lived worker, streamed back with Cache-Control: no-store, and discarded immediately.