markdown-to-pdf-styled
v1.0.0使用 pandoc 和 wkhtmltopdf 将 Markdown 文件转换为样式化 PDF,支持内置或自定义 CSS 样式。
Installation
Please help me install the skill `markdown-to-pdf-styled` from SkillHub official store.
npx skills add mengwuzhi/markdown-to-pdf-styled
md-to-pdf
version: 1.0.0
author: 大总管
description: Convert Markdown (.md) files to styled PDF documents with pandoc + wkhtmltopdf
Use this skill to convert Markdown to PDF with consistent styles.
Quick Start
- Ensure dependencies exist:
pandoc --version
wkhtmltopdf --version
- Run conversion:
bash {baseDir}/scripts/md2pdf.sh /abs/path/doc.md
Style Options
Use built-in styles:
clean(default): simple business stylemodern: blue, presentation-friendlypaper: serif, reading-friendly
Examples:
bash {baseDir}/scripts/md2pdf.sh /abs/path/doc.md --style clean
bash {baseDir}/scripts/md2pdf.sh /abs/path/doc.md /abs/path/out.pdf --style modern
bash {baseDir}/scripts/md2pdf.sh /abs/path/doc.md --style paper
Custom CSS
Pass an absolute CSS path:
bash {baseDir}/scripts/md2pdf.sh /abs/path/doc.md /abs/path/doc.pdf --style /abs/path/custom.css
Notes
- Script enables local CSS loading via
--enable-local-file-access. - If output title warning appears, set Markdown metadata
title:. - For detailed usage and troubleshooting, read
{baseDir}/references/usage.md.