Hosthtml pdf
Export host-html slide decks to PDF using PuppeteerFrom its SKILL.md
npx -y skills add phanosh/host-html --skill hosthtml-pdfAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 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.7 KB, as published. Nobody here has run it
host-pdf: Export HTML Slides to PDF
When the user runs /host-pdf, follow these steps:
Step 1: Find the HTML slide deck
Look for the HTML file to export. Check in this order:
- If the user specifies a file path (e.g.,
/host-pdf presentation.html), use that file - If there's a recently generated/modified
.htmlfile in the current project, use that - Ask the user which HTML file to export
The HTML file must contain slide elements with the class .slide — this is the standard format produced by host-html slide decks.
Step 2: Ensure Puppeteer is available
Check that Puppeteer and its Chrome browser are installed:
npm ls puppeteer 2>/dev/null || npm install puppeteer
npx puppeteer browsers install chrome 2>/dev/null
These commands are safe to run even if already installed.
Step 3: Run the export script
The export script is bundled with this skill. Run it:
node "${CLAUDE_PLUGIN_ROOT}/skills/hosthtml-pdf/export-pdf.mjs" "<INPUT_HTML>" "<OUTPUT_PDF>"
${CLAUDE_PLUGIN_ROOT}is the root directory where the plugin is installed (e.g.,~/.claude/plugins/cache/host-html)<INPUT_HTML>is the absolute path to the HTML file from Step 1<OUTPUT_PDF>(optional) defaults to the same name/location as the input but with a.pdfextension
Optional flags:
--slides N— override the auto-detected slide count (useful if slides don't use the.slideclass)
Example:
node "${CLAUDE_PLUGIN_ROOT}/skills/hosthtml-pdf/export-pdf.mjs" ./deck.html ./deck.pdf
Step 4: Present the result
Once the script finishes, show the user:
- PDF path: The absolute path to the generated PDF
- Slide count: How many slides were captured
- File size: The size of the generated PDF
Format the output clearly:
PDF exported!
File: /path/to/deck.pdf
Slides: 8
Size: 2.4 MB
Error Handling
- "No .slide elements found": The HTML doesn't use
.slideclass divs. Ask the user how many slides to capture and retry with--slides N - Puppeteer launch failure: Suggest running
npx puppeteer browsers install chrometo install the browser - Timeout or blank captures: The HTML may need more time to render — the script already waits 2s for initial load and 900ms per slide, which handles most cases
Tips
- The script captures at 2× device scale (retina quality) at 1280×720 — the PDF will be crisp
- Each slide is screenshot-based, so all CSS animations, custom fonts, and backgrounds are preserved exactly as rendered
- If the user wants to share the PDF online, suggest combining with
/host-htmlto also publish the live version