
Html To Pdf
Convert HTML to PDF through headless Chrome, with automatic RTL detection and Hebrew-safe rendering.
- CCM score
- 59 of 100
- skills.sh installs
- 1.3K
- GitHub stars
- 51
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers HTML file, URL, and piped input conversion via
scripts/html-to-pdf.js, with format, margin, scale, header, and footer options - Includes automatic overflow handling that shrinks small overflow and applies page-break rules to larger content
- Enforces a single-page check by default, warning when output exceeds the expected
--expect-pagescount - Designed for generating Hebrew or other RTL documents where pixel-accurate CSS rendering and web fonts matter
Install
$ npx -y skills add aviz85/claude-skills-library --skill html-to-pdf -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
HTML to PDF Converter
Pixel-perfect HTML to PDF conversion using Puppeteer (Chrome headless). Provides excellent support for Hebrew, Arabic, and other RTL languages with automatic direction detection.
Why Puppeteer?
- Pixel-perfect rendering: Uses actual Chrome engine
- Full CSS3/HTML5 support: Flexbox, Grid, custom fonts, backgrounds
- JavaScript execution: Renders dynamic content
- Automatic RTL detection: Detects Hebrew/Arabic and sets direction
- Web font support: Loads custom fonts properly
Auto-Fit (Built-in, No Flag Needed)
The script automatically handles content overflow:
- Small overflow (up to ~18%) → auto-shrinks font size to fit the page
- Large content → flows cleanly across multiple pages with smart page-break rules (no cutting headers, table rows, or images in half)
- Fits perfectly → does nothing
This runs automatically on every PDF generation. No flags needed.
CRITICAL: Fit Content to Single Page
Backgrounds on html or body cause extra pages! Put backgrounds on a container element instead:
@page { size: A4; margin: 0; }
Details
- Repository
- github.com/aviz85/claude-skills-library
- Categories
- Office Files & Slides, Technical Documentation
More from aviz85/claude-skills-library
All 6Similar to Html To Pdf
More Office Files & Slides
react-pdfmolefrog/skills771 installsGenerate PDFs with @react-pdf/renderer, covering fonts, layout, SVG, images, and page numbering for reports and invoices.
hebrew-rtl-best-practicesskills-il/localization768 installsHebrew RTL layout guide covering logical CSS properties, :dir() selectors, bidi text, and Hebrew typography.
pdf-to-markdownandreadellacorte/groove293 installsNode.js converter that turns PDFs into Markdown, auto-detecting native text versus scanned pages with OCR still planned.
pdf-convertertanis90/pdf-converter-mineru9.7K installsPDF converter powered by MinerU that turns documents into Markdown, HTML, LaTeX, DOCX, or plain text.
pdfanthropics/skills231K installsComprehensive PDF toolkit covering text extraction, merging, splitting, creation, forms, and OCR with Python and CLI tools.
html-to-imagehtml2png/skills271 installsTurns HTML/CSS into PNG, WebP, or PDF images through the html2png.dev API, with pixel-precise typography and layout.