# alanshaw/markdown-pdf

:page_facing_up: Markdown to PDF converter

Repository: https://github.com/alanshaw/markdown-pdf
Canonical: https://ross.abutalabs.com/products/markdown-pdf
Homepage: https://npmjs.org/package/markdown-pdf
Language: JavaScript
License: MIT
License Family: permissive
Topics: markdown, md, pdf, pdf-generation, converter, template
Last push: 2023-10-19T06:34:40+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 4856, "days_push": 1049, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2876, forks 253 (observed 2026-08-28T04:07:27.380276+00:00)

## What it is
A Node.js module and CLI that converts Markdown files to PDFs by rendering them through HTML and PhantomJS. It supports custom CSS styling, paper formats, headers/footers, and pre-processing functions for templating.

## Use cases
- convert markdown files to pdf
- generate pdf documents from md files
- create pdf reports from markdown
- style markdown pdf output with custom css
- batch convert markdown documentation to pdf
- programmatically convert markdown to pdf in node

## When to choose
- you need simple markdown-to-pdf conversion in Node.js
- you want customizable PDF styling via CSS
- you need both a CLI and a programmatic API

## When to avoid
- you need actively maintained software with modern rendering (PhantomJS is deprecated)
- you need high-fidelity HTML/CSS rendering beyond PhantomJS capabilities
- you are not using Node.js

## Facets
- artifact type: library
- maturity: maintenance
- function: pdf, markdown, templating, cli
- domain: pdf, documentation, developer-tools, files
- platform: cli, cross-platform
- tags: markdown-to-pdf, phantomjs, pdf-generation, document-conversion, nodejs

## Member repositories
- alanshaw/markdown-pdf (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:27.380276+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-30T07:35:42.000284+00:00, confidence not recorded.
  - readme: https://github.com/alanshaw/markdown-pdf (fetched 2026-08-28T04:07:27.380276+00:00, sha 946bbe638126)
  - registry_npm: https://registry.npmjs.org/markdown-pdf (fetched 2026-08-29T09:51:55.409277+00:00, sha bccdf5e338c6)
- Data as of 2026-08-30T08:39:29.467469+00:00.
