Export a Markdown document, spec, or research findings as a formatted PDF using md-to-pdf, pandoc, or markdown-pdf, saving the result to the session workspace. Use when the user wants to create or generate a PDF from a Markdown file.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Markdown To Pdf?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/erriccc-markdown-to-pdf)
---
name: markdown-to-pdf
description: Export a Markdown document, spec, or research findings as a formatted PDF using md-to-pdf, pandoc, or markdown-pdf, saving the result to the session workspace. Use when the user wants to create or generate a PDF from a Markdown file.
---
# Skill: Markdown to PDF
Export Markdown documents as formatted PDF files.
## When to use
When the user /wants to create a PDF from a Markdown file, spec, or research findings.
## How to execute
Option 1 — Using md-to-pdf (best quality):
```bash
npx --yes md-to-pdf "<MARKDOWN_PATH>"
```
This creates a PDF alongside the source file with the same name.
Option 2 — Using pandoc (if available):
```bash
pandoc "<MARKDOWN_PATH>" -o "<OUTPUT_PATH>.pdf" --pdf-engine=wkhtmltopdf
```
Option 3 — Using markdown-pdf:
```bash
npx --yes markdown-pdf "<MARKDOWN_PATH>" -o "<OUTPUT_PATH>.pdf"
```
## Output
- Save the PDF to the session workspace (e.g., `library/{name}.pdf`)
- Confirm the output path and file size to the user
- If the source is spec.md, name the output `spec-export.pdf`