morro-md2pdf
v0.2.0
Published
Convert Markdown files into polished PDFs with Playwright
Maintainers
Readme
morro-md2pdf
A Markdown-to-PDF CLI built on Playwright, with built-in themes, syntax highlighting, KaTeX rendering, and a built-in morro brand mark.
Install
Global install:
npm install -g morro-md2pdfLocal development:
npm install
npm run build
npm linkIf your machine does not already have a usable Chrome or Chromium executable, install the Playwright-managed browser once:
npx playwright install chromiumUsage
Basic conversion:
md2pdf README.md
md2pdf README.md -o docs/guide.pdf --theme minimalFrom source without global install:
npm run build
node dist/cli.js README.md -o docs/guide.pdfWith custom CSS:
md2pdf README.md --css ./print.cssWith explicit browser path:
md2pdf README.md --browser "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"Built-in Themes
github: modern technical documentminimal: editorial serif reportdark: graphite dark paper
List them from the CLI:
md2pdf --list-themesFeatures
- Native PDF outline support through Playwright and Chromium
- Built-in
github,minimal, anddarkprint themes - Server-side syntax highlighting with
highlight.js - Offline KaTeX auto-rendering
- Optional CSS override layer with
--css - Built-in morro logo branding in the PDF output
Publish Checklist
Before publishing:
npm test
npm run pack:check
npm publishThis package is published as morro-md2pdf because md2pdf is already taken on npm.
