Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

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.

  • Score 74
  • 2.1k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

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-pdf

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install html-to-pdf in Claude Code

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

A

No 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 →

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.

html-to-pdf Install

Add to stack

Loading.