Pixel-perfect HTML to PDF conversion with automatic RTL and Hebrew language support.
Works with
Renders using Chrome headless engine with full CSS3/HTML5 support, including Flexbox, Grid, custom fonts, and JavaScript execution
Automatic right-to-left direction detection for Hebrew, Arabic, and other RTL languages; includes --rtl flag for forced RTL mode
Configurable page formats (A4, Letter, Legal, A3, A5), orientation, margins, scale, and optional headers/footers
Requires one-time npm setup
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionhtml-to-pdfExecute the skills CLI command in your project's root directory to begin installation:
Fetches html-to-pdf from aviz85/claude-skills-library and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate html-to-pdf. Access via /html-to-pdf in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
43
total installs
43
this week
26
GitHub stars
0
upvotes
Run in your terminal
43
installs
43
this week
26
stars
Pixel-perfect HTML to PDF conversion using Puppeteer (Chrome headless). Provides excellent support for Hebrew, Arabic, and other RTL languages with automatic direction detection.
The script automatically handles content overflow:
This runs automatically on every PDF generation. No flags needed.
Backgrounds on html or body cause extra pages! Put backgrounds on a container element instead:
@page { size: A4; margin: 0; }
html, body {
width: 210mm;
height: 297mm;
margin: 0;
padding: 0;
overflow: hidden;
/* NO background here! */
}
.container {
width: 100%;
height: 100%;
padding: 20mm;
box-sizing: border-box;
background: linear-gradient(...); /* Background goes HERE */
}
Common causes of extra pages:
.container insteadoverflow: hiddenTips:
--scale=0.75 --margin=0 if content still overflows--landscapeBefore first use, install dependencies:
cd ~/.claude/skills/html-to-pdf && npm install
node ~/.claude/skills/html-to-pdf/scripts/html-to-pdf.js input.html output.pdf
node ~/.claude/skills/html-to-pdf/scripts/html-to-pdf.js https://example.com page.pdf
node ~/.claude/skills/html-to-pdf/scripts/html-to-pdf.js hebrew.html hebrew.pdf --rtl
echo "<h1>ืฉืืื ืขืืื</h1>" | node ~/.claude/skills/html-to-pdf/scripts/html-to-pdf.js - output.pdf --rtl
| Option | Description | Default |
|---|---|---|
--format=<format> |
Page format: A4, Letter, Legal, A3, A5 | A4 |
--landscape |
Use landscape orientation | false |
--margin=<value> |
Set all margins (e.g., "20mm", "1in") | 20mm |
--margin-top=<value> |
Top margin | 20mm |
--margin-right=<value> |
Right margin | 20mm |
--margin-bottom=<value> |
Bottom margin | 20mm |
--margin-left=<value> |
Left margin | 20mm |
--scale=<number> |
Scale factor 0.1-2.0 | 1 |
--background |
Print background graphics | true |
--no-background |
Don't print backgrounds | - |
--header=<html> |
Header HTML template | - |
--footer=<html> |
Footer HTML template | - |
--wait=<ms> |
Wait time for fonts/JS | 1000 |
--rtl |
Force RTL direction | auto-detect |
--expect-pages=<N> |
Expected page count (warns if different) | 1 |
--no-page-check |
Disable page count warning | - |
The script automatically checks page count after generating the PDF. By default, it expects 1 page and warns if the output has more:
โ ๏ธ WARNING: PAGE OVERFLOW DETECTED!
Expected: 1 page(s)
Actual: 2 page(s)
Fix: Reduce content, margins, or font sizes in HTML
Use --no-page-check to disable this warning
Usage:
--expect-pages=3: expects 3 pages (for multi-page documents)--no-page-check: disables the check entirelyNote: Requires pdfinfo to be installed (part of poppler-utils). If not available, the check is silently skipped.
node ~/.claude/skills/html-to-pdf/scripts/html-to-pdf.js report.html report.pdf
node ~/.claude/skills/html-to-pdf/scripts/html-to-pdf.js doc.html doc.pdf --format=Letter --margin=1in
node ~/.claude/skills/html-to-pdf/scripts/html-to-pdf.js invoice-he.html invoice.pdf --rtl
node ~/.claude/skills/html-to-pdf/scripts/html-to-pdf.js slides.html slides.pdf --landscape --format=A4
node ~/.claude/skills/html-to-pdf/scripts/html-to-pdf.js poster.html poster.pdf --margin=0
For best Hebrew rendering in your HTML:
<html lang="he" dir="rtl"><meta charset="UTF-8">direction: rtl; text-align: right; to body<!DOCTYPE html>
<html lang="he" dir="rtl">
<head>
<meta charset="UTF-8">
<link href="https://fonts.googleapis.com/css2?family=Heebo:wght@400;700&display=swap" rel="stylesheet">
<style>
@page { size: A4; margin: 0; }
html, body {
width: 210mm;
height: 297mm;
margin: 0;
padding: 0;
overflow: hidden;
}
.container {
width: 100%;
height: 100%;
padding: 20mm;
box-sizing: border-box;
font-family: 'Heebo', sans-serif;
direction: rtl;
text-align: right;
background: #f5f5f5; /* Background on container, NOT body */
}
</style>
</head>
<body>
<div class="container">
<h1>ืฉืืื ืขืืื</h1>
<p>ืืื ืืกืื ืืขืืจืืช</p>
</div>
</body>
</html>
NEVER use --scale < 1.0 for multi-page documents. It causes:
Instead: reduce CSS font sizes and spacing to fit content at scale=1.0.
.page {
width: 210mm; /* Matches A4 exactly at scale=1.0 */
height: 297mm; /* Matches A4 exactly at scale=1.0 */
padding: 8mm 10mm 12mm;
page-break-after: always;
position: relative;
background: #f7f8fa;
Implementation Guide
Prerequisites
- โบClaude Desktop or compatible AI client with skill support
- โบClear understanding of task or problem to solve
- โบWillingness to iterate and refine outputs
Time Estimate
15-45 minutes depending on use case complexity
Steps
- 1Install skill using provided installation command
- 2Test with simple use case relevant to your work
- 3Evaluate output quality and relevance
- 4Iterate on prompts to improve results
- 5Integrate into regular workflow if valuable
Common Pitfalls
- โ Expecting perfect results without iteration
- โ Not providing enough context in prompts
- โ Using skill for tasks outside its intended scope
- โ Accepting outputs without review and validation
Best Practices
โ Do
- +Start with clear, specific prompts
- +Provide relevant context and constraints
- +Review and refine all outputs before using
- +Iterate to improve output quality
- +Document successful prompt patterns
โ Don't
- โDon't use without understanding skill limitations
- โDon't skip validation of outputs
- โDon't share sensitive information in prompts
- โDon't expect skill to replace human judgment
๐ก Pro Tips
- โ
Be specific about desired format and style
- โ
Ask for multiple options to choose from
- โ
Request explanations to understand reasoning
- โ
Combine AI efficiency with human expertise
When to Use This
โ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
โ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
Learning Path
- 1Familiarize yourself with skill capabilities and limitations
- 2Start with low-risk, non-critical tasks
- 3Progress to more complex and valuable use cases
- 4Build expertise through regular use and experimentation
Related Skills
frontend-design
552anthropics/claude-code
Frontendsame categorypremium-frontend-ui
209github/awesome-copilot
Frontendsame categoryui-animation
197mblode/agent-skills
Frontendsame categoryhigh-end-visual-design
156leonxlnx/taste-skill
Frontendsame categoryantigravity-design-expert
123sickn33/antigravity-awesome-skills
Frontendsame categoryinterior-design-expert
96erichowens/some_claude_skills
Frontendsame categoryReviews
4.6โ
โ
โ
โ
โ
27 reviews- DDhruvi Jainโ
โ
โ
โ
โ
Dec 12, 2024
Useful defaults in html-to-pdf โ fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- NNikhil Jacksonโ
โ
โ
โ
โ
Dec 12, 2024
I recommend html-to-pdf for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- HHana Thompsonโ
โ
โ
โ
โ
Dec 8, 2024
Keeps context tight: html-to-pdf is the kind of skill you can hand to a new teammate without a long onboarding doc.
- AAnika Thompsonโ
โ
โ
โ
โ
Nov 27, 2024
Registry listing for html-to-pdf matched our evaluation โ installs cleanly and behaves as described in the markdown.
- OOshnikdeepโ
โ
โ
โ
โ
Nov 3, 2024
html-to-pdf has been reliable in day-to-day use. Documentation quality is above average for community skills.
- HHana Okaforโ
โ
โ
โ
โ
Nov 3, 2024
Solid pick for teams standardizing on skills: html-to-pdf is focused, and the summary matches what you get after install.
- GGanesh Mohaneโ
โ
โ
โ
โ
Oct 22, 2024
Solid pick for teams standardizing on skills: html-to-pdf is focused, and the summary matches what you get after install.
- HHana Sanchezโ
โ
โ
โ
โ
Oct 22, 2024
html-to-pdf has been reliable in day-to-day use. Documentation quality is above average for community skills.
- AAnika Tandonโ
โ
โ
โ
โ
Oct 18, 2024
html-to-pdf reduced setup friction for our internal harness; good balance of opinion and flexibility.
- RRahul Santraโ
โ
โ
โ
โ
Sep 13, 2024
We added html-to-pdf from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
showing 1-10 of 27
1 / 3Discussion
Comments โ not star reviews- No comments yet โ start the thread.