Html to pdf
Convert HTML to PDF using the fulgur CLI (npx @fulgur-rs/cli). Generates HTML from a description if no file is provided.From its SKILL.md
npx -y skills add fulgur-rs/agent-skills --skill html-to-pdfAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.0 KB, 500 tokens by cl100k_base, as published. Nobody here has run it
HTML to PDF
Use this skill when the user wants to convert an HTML file to PDF, or wants to create a PDF document from scratch.
Workflow
Step 1 — Determine the HTML source
- If the user provides an HTML file path, use it directly.
- If no HTML is provided, ask for the document's purpose and content, then generate the HTML and save it to a temporary file (e.g.
output.html).
When generating HTML, produce clean, print-ready markup:
- Use inline styles or a
<style>block — no external stylesheets unless the user provides one. - Set appropriate page dimensions via CSS (
@page { size: A4; margin: 20mm; }). - Use web-safe fonts or note that custom fonts can be bundled with
-f.
Step 2 — Determine conversion options
Infer from context or ask if unclear:
| Option | Flag | Default |
|---|---|---|
| Page size | -s A4 | Letter | A3 | A4 |
| Landscape | -l | portrait |
| Margin (mm) | --margin "top right bottom left" | browser default |
| Font file | -f path/to/font.ttf | none |
| Extra CSS | --css path/to/style.css | none |
| Image | -i name=path/to/image.png | none |
| JSON data | -d path/to/data.json | none |
Step 3 — Run the conversion
npx @fulgur-rs/cli render -o <output>.pdf [options] <input>.html
Examples:
# Basic
npx @fulgur-rs/cli render -o output.pdf input.html
# A4 landscape with custom margin
npx @fulgur-rs/cli render -o output.pdf -s A4 -l --margin "15 20" input.html
# Japanese font
npx @fulgur-rs/cli render -o output.pdf -f NotoSansJP.ttf input.html
# Template with JSON data
npx @fulgur-rs/cli render -o invoice.pdf -d data.json template.html
Step 4 — Report completion
Tell the user where the PDF was saved. If the conversion fails, show the error output and suggest fixes (missing font, malformed HTML, etc.).
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.