# simonhaenisch/md-to-pdf

Hackable CLI tool for converting Markdown files to PDF using Node.js and headless Chrome.

Repository: https://github.com/simonhaenisch/md-to-pdf
Canonical: https://ross.abutalabs.com/products/md-to-pdf
Homepage: https://www.npmjs.com/md-to-pdf
Language: TypeScript
License: MIT
License Family: permissive
Topics: markdown-to-pdf, pdf-generation, documentation, homework, assignments, markdown, pdf, headless-chrome, puppeteer, cli, md
Last push: 2025-12-03T09:43:53+00:00

## Health v2 (maintenance only)
Score: 54/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 55, release rhythm 27, longevity 100
- inputs: {"age_days": 3407, "days_push": 273, "days_rel": 273, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1950, forks 163 (observed 2026-08-28T04:05:58.164378+00:00)

## What it is
A hackable Node.js CLI tool that converts Markdown files to PDF using Marked for HTML conversion and Puppeteer (headless Chromium) for rendering. It supports watch mode, custom stylesheets, front-matter configuration, syntax highlighting, and a programmatic API.

## Use cases
- convert markdown files to pdf from the command line
- generate pdf documentation from markdown
- turn homework or assignments written in markdown into pdf
- batch convert multiple markdown files to pdf concurrently
- watch a markdown file and regenerate pdf on changes
- apply custom css styles when exporting markdown to pdf
- convert html to pdf via headless chrome

## When to choose
- you want a simple, hackable markdown-to-pdf converter with a small codebase you can customize
- you need styling control via CSS, front-matter config, headers/footers, and page breaks
- you want watch mode for iterative document editing
- you prefer a Node.js/npm-based workflow

## When to avoid
- you need a lightweight tool without a headless Chromium dependency
- you need LaTeX-quality typesetting for academic papers
- you need a GUI-based document converter
- you need conversion formats other than PDF

## Facets
- artifact type: cli-tool
- maturity: active
- function: pdf, markdown, cli, developer-tools
- domain: developer-tools, documentation, pdf, files
- platform: cli, cross-platform
- tags: markdown-to-pdf, puppeteer, headless-chrome, pdf-generation, syntax-highlighting, watch-mode, nodejs

## Member repositories
- simonhaenisch/md-to-pdf (main) score 54

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:58.164378+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:06:53.018786+00:00, confidence not recorded.
  - readme: https://github.com/simonhaenisch/md-to-pdf (fetched 2026-08-28T04:05:58.164378+00:00, sha 7457586240ca)
  - registry_npm: https://registry.npmjs.org/md-to-pdf (fetched 2026-08-29T10:46:49.907801+00:00, sha b8b344d89c51)
- Data as of 2026-08-30T08:39:29.467469+00:00.
