# Md To PDF

> Convert Markdown files to PDF using a Node.js CLI script. Use when the user asks to export .md content into a .pdf file.

- Skill: `willseed/md-to-pdf` (Agent Skill, multi-file: 8 files)
- Install (CLI): `npx skillmds@latest add willseed/md-to-pdf`
- Raw SKILL.md: https://api.skillmd.com/api/skills/willseed/md-to-pdf/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Docs & Writing
- Author: willseed (https://skillmd.com/u/willseed)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/willseed/md-to-pdf

---


# Markdown to PDF (Node.js + TypeScript)

## Quick start

Use the included TypeScript script:

```bash
cd /Users/willseed/GitRepo/skill/md-to-pdf
npm install
npm run convert -- --input /path/to/file.md --output /path/to/file.pdf
```

## Notes

- Required argument: `--input` (or `-i`)
- Optional argument: `--output` (or `-o`)
- If `--output` is omitted, the script writes PDF next to the source markdown file.
- Supports basic markdown rendering: headings, lists, blockquotes, horizontal rules, and fenced code blocks.

