pdf

Generates print-ready PDF documents from HTML using @page CSS and headless Chrome rendering.

39|14|Updated Mar 14, 2026
One-click install
npx skills add https://github.com/doable-me/Doable --skill pdf-doable-me
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: pdf
Source: https://github.com/doable-me/Doable/tree/main/mcp-servers/pdf-builder/skills
Command: npx skills add https://github.com/doable-me/Doable --skill pdf-doable-me

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Producing PDFs that look correct when printed requires print-specific CSS knowledge that most HTML authors lack, leading to broken page breaks, wrong paper sizes, and undefined viewport units in print output. ## Core Features & Use Cases - Print-correct styling rules: Enforces @page size and margins, mm/pt units, and a strict heading hierarchy so documents paginate correctly at A4 or Letter. - Page-break control: Provides break-after and break-inside hints for headings, tables, and figures, plus explicit page-break classes for covers and major sections. - Typography and layout guidance: Recommends font pairings, two-column CSS columns layouts, table styling, and cover-page patterns for long documents. - Use Case: Ask the assistant to generate a multi-page quarterly report as HTML, and it produces a styled document with a cover page, section headings, and tables that render cleanly to PDF through the pdf-builder MCP App. ## Quick Start Use the pdf skill to create a two-page A4 report with a cover page and styled tables summarizing this quarter's sales data.

Frequently Asked Questions about pdf

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a print-ready PDF from HTML?▼

Define paper size and margins with an @page CSS rule, use mm and pt units instead of vh or vw, and add page-break hints to headings and tables. The pdf-builder MCP App renders the HTML directly to PDF using headless Chrome.

How do I control page breaks in HTML to PDF conversion?▼

Apply break-after: avoid to headings and break-inside: avoid to tables, figures, and blockquotes so they are not split across pages. Insert an explicit page-break-before: always class only at major section boundaries or after a cover page.

What CSS units should I use for print stylesheets?▼

Use mm or cm for layout dimensions and pt for font sizes, since vh and vw are undefined in print contexts. Pixels are acceptable only for borders and small border radii.

Why does my PDF layout break when I set body width to 210mm?▼

Setting an explicit body width overrides the @page margin box and breaks automatic pagination. Let the @page margins define the content area and never constrain the body width in print stylesheets.

Can I add page numbers to a PDF generated from HTML?▼

Native CSS page numbers via @page @bottom-center with content: counter(page) work in Chrome when printBackground and @page rules are honored. The more reliable pattern is placing metadata inline at the end of the document body in a muted style.

Why are background colors missing from my printed PDF?▼

Browsers strip background colors in print by default. Add print-color-adjust: exact (and the -webkit- prefixed variant) to the body so colored backgrounds are preserved in the rendered PDF.