html-to-pdf
Skill by aipoch
Converts HTML files, URLs, or piped HTML into PDFs using Puppeteer, with right-to-left support for Hebrew and Arabic. Built for users who need print-ready documents from web pages or reports.
Install html-to-pdf
Built from the published package, never by AI.
git clone --depth 1 https://github.com/aipoch/medical-research-skills /tmp/medical-research-skills && mkdir -p ~/.claude/skills && cp -r /tmp/medical-research-skills/scientific-skills/Other/html-to-pdf ~/.claude/skills/html-to-pdfRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/aipoch/medical-research-skills /tmp/medical-research-skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/medical-research-skills/scientific-skills/Other/html-to-pdf ~/.gemini/antigravity-cli/skills/html-to-pdfAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
html-to-pdf converts local HTML files, URLs, or HTML piped through stdin into PDF files. It uses Puppeteer to render pages with Chrome-accurate layout, including CSS Grid, Flexbox, backgrounds, and web fonts. Print options cover page format, orientation, margins, scale, background printing, and header and footer templates.
The tool waits for network idle and document.fonts.ready before printing, plus an extra wait set by --wait. It auto-detects Hebrew and Arabic content for right-to-left layout, and the --rtl flag forces it. The skill suits users producing print-ready reports, invoices, certificates, or single-page documents. The source also includes a visual verification workflow for blank pages and clipped text.
Written from the project's SKILL.md and checked against it.
What it can do
- File, URL and stdin inputConverts a local HTML file, a remote URL, or HTML piped through stdin to PDF.
- RTL handlingAuto-detects Hebrew or Arabic content and applies RTL, or forces it with --rtl.
- Print controlsSets page format, landscape, uniform or per-side margins, scale, and background printing.
- Header and footer templatesInjects custom HTML header and footer templates into the PDF.
- Font and resource waitingWaits for network idle and document.fonts.ready before printing, with a configurable extra wait.
- Single-page fittingDocuments page-fit rules and scale or margin adjustments for exact one-page output.
What you need
- Node.js 16 or later (recommended)
- npm 8 or later
- Puppeteer installed via npm install, with bundled Chromium
- Optional Google Chrome or Microsoft Edge if not using bundled Chromium
Try asking
- Convert this Hebrew HTML report to an A4 PDF with RTL layout.
- Turn https://example.com into a landscape PDF with 10mm margins.
- Make a one-page A4 PDF from this certificate HTML without extra pages.
Good to know
- Single-page output may need HTML or CSS fixes if overflow persists.
- The source recommends visually checking each PDF for blank pages and clipped text.
- Optional browser path is needed only if bundled Chromium is not used.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: scientific-skills/Other/html-to-pdf/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to html-to-pdf
All alternatives →Creates importable JSON templates for the Obsidian Web Clipper. It is for users who want to clip a site, understand the available variables, or format clipped content.
Harness Creator builds, audits, and improves the instruction and state files that help AI coding agents stay reliable across sessions. It is for developers whose agents forget context, drift out of scope, or claim work is done too early.
Guides an assistant through extracting text from scanned PDFs, photographed pages, and images with OCR. Covers backends, language packs, force-OCR, and performance tuning.
Edits a named local file in place to remove AI-writing patterns, using minimal targeted changes and post-edit verification. Built for users who explicitly ask to clean, rewrite, or humanize that specific file.
Polishes, translates, or tightens existing academic manuscript prose while preserving facts, terminology, and evidence boundaries. Made for researchers revising drafts, including Chinese-to-English translation and LaTeX layout fixes.
Adds PDF form analysis and filling, table extraction, OCR, validation and batch processing to an AI assistant. Aimed at developers who run complex or high-volume PDF workflows.
Compare with obsidian-clipper-template-creator, harness-creator or xberg-extracting-with-ocr
html-to-pdf: common questions
Does html-to-pdf support right-to-left text?
Yes. It auto-detects RTL content such as Hebrew or Arabic, and the --rtl flag forces RTL regardless of detection.
Can it render pages that need JavaScript?
The source says it can render dynamic HTML that requires JavaScript before printing, such as charts or client-side templates.
Can it use an installed Chrome or Edge instead of bundled Chromium?
Yes. The source says a browser path can be set with --executable-path or the PUPPETEER_EXECUTABLE_PATH environment variable.
How do I install html-to-pdf?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is html-to-pdf free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is html-to-pdf safe to use?
It scores 74 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to html-to-pdf?
Similar skills: obsidian-clipper-template-creator, harness-creator, xberg-extracting-with-ocr, file-edit-in-place.
