| name | markdown-pdf-export |
| description | Export Markdown files to polished, print-ready PDFs and set up reusable local export scripts. Use this skill whenever the user wants Markdown converted to PDF, asks for one-click export automation, needs reusable styling presets, or wants to tune margins, fonts, images, or page layout for resumes, reports, manuals, proposals, or summaries. Default to a script-based workflow instead of a one-off manual conversion. |
Markdown PDF Export
Use this skill to turn markdown deliverables into repeatable PDF outputs. Default to leaving behind a reusable script + config setup instead of a one-off command.
Compatibility
Works best on Windows with PowerShell, Node.js 22+, Pandoc, and Microsoft Edge or Chrome. The PowerShell wrapper stays thin; scripts/export_markdown_pdf.ts validates config, runs Pandoc, and prints stable PDFs through a headless browser.
Runtime layout
| File | Role |
|---|
scripts/export_markdown_pdf.ps1 | Windows entrypoint |
scripts/export_markdown_pdf.cmd | double-clickable wrapper |
scripts/export_markdown_pdf.ts | config validation, Pandoc HTML build, browser PDF print |
assets/*.css | built-in print presets |
assets/export-config.example.json | starter config |
references/preset-selection.md | preset selection rules |
Default workflow
- Identify the markdown source files and target PDF names.
- Choose a preset:
resume for resumes and profile sheets
compact for one-page handouts or summaries
default for general reports and notes
- If the user wants repeatability, copy the script, wrapper, CSS preset, and example config into the workspace.
- Fill the config and run
scripts/export_markdown_pdf.ps1.
- Verify the PDF exists and is non-empty.
Config shape
Use assets/export-config.example.json as the template.
Supported document fields:
input
output
title
preset
css
resourcePath
virtualTimeBudget
Use preset for built-in styles. Use css only when the user explicitly wants a custom stylesheet.
Output rules
- Prefer PDFs next to the source files unless the user asked for another location.
- Keep styles print-safe and boring.
- Surface Pandoc, browser, or missing-file errors directly.