- Home
- Skills
- Alchaincyf
- Huashu Skills
- Markdown To Pdf
markdown-to-pdf_skill
- Python
3
GitHub Stars
3
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill alchaincyf/huashu-skills --skill markdown-to-pdf- EXAMPLES.md3.7 KB
- README.md2.1 KB
- SKILL.md4.0 KB
Overview
This skill converts Markdown documents into professional, Apple-style PDF whitepapers with book-grade typography and automatic layout features. It preserves full Markdown syntax (code blocks, tables, blockquotes, lists) and produces a ready-to-distribute PDF with cover, table of contents, headers, and footers. The result targets technical docs, whitepapers, tutorials, and reports that need polished, readable output.
How this skill works
The tool parses Markdown into HTML using a robust Markdown engine, applies a CSS-driven Apple-inspired design (SF fonts, spacing, color palette), and renders the final PDF via an HTML-to-PDF converter. It extracts heading structure to build a clickable, two-column table of contents and applies pagination rules to control widows/orphans, table headers, code block breaks, and image placement. Configuration options allow changing theme colors, font sizes, title/author metadata, and output filename.
When to use it
- Produce polished whitepapers or product reports from Markdown
- Export technical guides, tutorials, or manuals with consistent typography
- Create PDFs from documentation that include code samples and tables
- Deliver client-facing PDFs that must follow a clean, modern Apple-like aesthetic
- Generate printable documents with automatic TOC and professional pagination
Best practices
- Structure Markdown headings with numeric chapter/subchapter format (e.g., '## 1. Chapter', '### 1.1 Section') so the TOC extracts correctly
- Wrap code blocks with triple backticks and specify language for proper styling
- Use standard Markdown table syntax and place long tables in logical sections to preserve table headers across pages
- Optimize or compress large images before embedding to keep PDF size reasonable
- Adjust CSS variables in the script for brand colors, font sizes, or minor layout changes rather than altering core templates
Example use cases
- Convert a technical guide (tech-guide.md) into a branded PDF manual for distribution
- Produce an investor-ready whitepaper with cover, author metadata, and clickable TOC
- Create a tutorial or course handout that preserves code formatting and table headers across pages
- Turn internal reports written in Markdown into printable PDFs with consistent headers/footers and page numbers
FAQ
Ensure headings follow the numeric format required for TOC extraction (e.g., '## 1. Title' and '### 1.1 Subtitle'); plain headings without numbering may be ignored.
Code blocks or tables render incorrectly in the PDF — what should I check?
Confirm you use standard Markdown syntax: triple backticks for code blocks and pipe-based tables. Also verify the Markdown parser extensions are enabled and the converter supports the used features.
How can I customize fonts, colors, or sizes?
Edit the CSS variables embedded in the conversion script (primary color, font-family, and font-size variables) to match your branding before running the conversion.