
Html To Pdf
Turn landing pages, reports, or RTL/Hebrew HTML into print-ready PDFs from the agent without a separate design tool.
Install
npx skills add https://github.com/aviz85/claude-skills-library --skill html-to-pdfWhat is this skill?
- Node CLI (`html-to-pdf.js`) with optional bin entry for repeatable agent-driven conversions
- Puppeteer rendering with A4/Letter/Legal/A3/A5, landscape, margins, scale 0.1–2.0, and optional header/footer HTML
- Inputs: local file, http(s) URL, or stdin pipe for generated HTML
- Hebrew and RTL layout support for pixel-faithful printable output
- Background graphics toggle and configurable wait time before capture
Adoption & trust: 899 installs on skills.sh; 40 GitHub stars; 2/3 security scanners passed (skills.sh audits); trending (+100% hot-view momentum).
Recommended Skills
Lark Drivelarksuite/cli
Lark Sharedlarksuite/cli
Lark Minuteslarksuite/cli
Tzstxixu-me/skills
Runcomfy Cliagentspace-so/runcomfy-agent-skills
Caveman Helpjuliusbrussee/caveman
Journey fit
Common Questions / FAQ
Is Html To Pdf safe to install?
skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Html To Pdf
{ "name": "html-to-pdf-skill", "version": "1.0.0", "description": "Pixel-perfect HTML to PDF converter with Hebrew/RTL support using Puppeteer", "main": "scripts/html-to-pdf.js", "bin": { "html-to-pdf": "./scripts/html-to-pdf.js" }, "scripts": { "convert": "node scripts/html-to-pdf.js" }, "dependencies": { "puppeteer": "^22.0.0" }, "keywords": [ "html", "pdf", "puppeteer", "hebrew", "rtl", "converter" ], "license": "MIT" } #!/usr/bin/env node /** * HTML to PDF Converter with Hebrew/RTL Support * Uses Puppeteer for pixel-perfect rendering * * Usage: * node html-to-pdf.js <input> <output> [options] * * Input can be: * - Local HTML file path * - URL (http:// or https://) * - "-" for stdin (pipe HTML content) * * Options: * --format=<format> Page format: A4, Letter, Legal, A3, A5 (default: A4) * --landscape Use landscape orientation * --margin=<value> Set all margins (e.g., "20mm" or "1in") * --margin-top=<value> Top margin * --margin-right=<value> Right margin * --margin-bottom=<value> Bottom margin * --margin-left=<value> Left margin * --scale=<number> Scale factor 0.1-2.0 (default: 1) * --background Print background graphics (default: true) * --no-background Don't print background graphics * --header=<html> Header HTML template * --footer=<html> Footer HTML template * --wait=<ms> Additional wait time for fonts/JS (default: 1000) * --rtl Force RTL direction * --font=<path> Load additional font file */ const puppeteer = require('puppeteer'); const fs = require('fs'); const path = require('path'); const { execSync } = require('child_process'); // Parse command line arguments function parseArgs(args) { const options = { input: null, output: null, format: 'A4', landscape: false, margin: { top: '20mm', right: '20mm', bottom: '20mm', left: '20mm' }, scale: 1, printBackground: true, headerTemplate: '', footerTemplate: '', displayHeaderFooter: false, waitTime: 1000, forceRtl: false, additionalFonts: [], expectPages: 1 // Expected page count (0 = no check) }; const positional = []; for (const arg of args) { if (arg.startsWith('--')) { const [key, value] = arg.slice(2).split('='); switch (key) { case 'format': options.format = value; break; case 'landscape': options.landscape = true; break; case 'margin': options.margin = { top: value, right: value, bottom: value, left: value }; break; case 'margin-top': options.margin.top = value; break; case 'margin-right': options.margin.right = value; break; case 'margin-bottom': options.margin.bottom = value; break; case 'margin-left': options.margin.left = value; break; case 'scale': options.scale = parseFloat(value); break; case 'background': options.printBackground = true; break; case 'no-background': options.printBackground = false; break; case 'header': options.headerTemplate = value; options.displayHeaderFooter = true; break; case 'footer': options.footerTemplate = value; options.displayHeaderFooter = true; break; case 'wait': options.waitTime = parseInt(value, 10); break; case 'rtl': options.forceRtl = true; break; case 'font': options.additionalFonts.push(value); break; case 'expect-pages': options.expectPages = parseInt(value, 10); break; case 'no-page-check': options.expectPages = 0;