pdf-htmllisted
Install: claude install-skill slogsdon/skills-design
# Skill: pdf-html
Targeted per-canvas PDF export via headless Chromium. Strips preview-backdrop styles (dark
page background, padding, gap) before rendering so the PDF contains only the canvas itself.
## When to use
- After any `design-*` skill that produces a document-style HTML artifact — audit reports,
deliverables, spec sheets, long-form cards — and a PDF is the desired leave-behind format.
- When the user says "export as PDF", "capture as PDF", "PDF version of this", etc.
Skip if:
- The artifact is a social-media graphic (LinkedIn, Instagram, YouTube thumbnail, Twitter
card). Use `screenshot-html` for those — PDFs don't add value and print media mode may
alter the styling.
- The artifact is a stream overlay or OBS scene pack. Use `screenshot-html`.
## What it targets
Same canvas conventions as `screenshot-html`:
- `.canvas` — primary fixed-size artifact wrapper.
- `[class*="canvas-"]` — modifier variants: `canvas-front` / `canvas-back`, `canvas-audit`,
`canvas-og` / `canvas-hero`, etc.
- `.scene` — hash-routed scenes (captured at their hash-navigated state).
Nested matches are deduped — only top-level containers generate PDFs.
If a file has no matches, falls back to a full-page PDF. `--full-page` forces this for
every file.
## How to run
```bash
node skills/pdf-html/scripts/pdf-html.mjs <dir> [--output <dir>] [--width <px>] [--full-page]
```
Flags:
- `<dir>` (positional, default `.`): directory to scan recursively for `*.html`. The
`screenshots/`