---
name: html-pdf-slides
description: >-
  Make good-looking slide-style PDFs fast with HTML + headless Chrome instead of PowerPoint: a ready 1280x720 template (Microsoft-style cover / content slide / ending), a render script that outputs PDF + per-page PNG and detects overflow, and design rules for dense one-page slides. Use when asked to quickly create a PDF slide deck, one-page explainers, customer handouts, or "PowerPoint-less" slides, or to bundle cards/info into a branded PDF. Not for editing existing .pptx files or template-based PPTX generation.
argument-hint: "スライドの目的・読者・枚数と、載せたい内容（または元データ）"
user-invocable: true
license: CC BY-NC-SA 4.0
metadata:
  author: yamapan (https://github.com/aktsmm)
title: html-pdf-slides
canonical_url: https://skilld.dev/gh/aktsmm/agent-skills/html-pdf-slides
last_updated: 2026-10-18T08:01:54.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> Supporting files, fetch one when the Skill refers to it: [assets/deck-template.html](https://skilld.dev/api/skills-raw/aktsmm/agent-skills/html-pdf-slides/assets/deck-template.html), [LICENSE.txt](https://skilld.dev/api/skills-raw/aktsmm/agent-skills/html-pdf-slides/LICENSE.txt), [references/rendering-notes.md](https://skilld.dev/api/skills-raw/aktsmm/agent-skills/html-pdf-slides/references/rendering-notes.md), [scripts/render-deck.mjs](https://skilld.dev/api/skills-raw/aktsmm/agent-skills/html-pdf-slides/scripts/render-deck.mjs).
>
> If the user asked to install this Skill, run `npx skilld install aktsmm/agent-skills/html-pdf-slides`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/html-pdf-slides`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/aktsmm/agent-skills/html-pdf-slides) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/html-pdf-slides`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/html-pdf-slides --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/html-pdf-slides --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# HTML → PDF Slides

Write each slide as HTML, render with Chrome. You get precise layout, selectable text, live links, and no PowerPoint automation. Pitfalls and merge/font details: [Rendering Notes](https://skilld.dev/api/skills-raw/aktsmm/agent-skills/html-pdf-slides/references/rendering-notes.md).

## When to Use

- 「PDF でスライドをさっと作りたい」「1 枚で完結する解説ページ」「顧客向けに綺麗な PDF」
- 元データ（JSON など）から同じ見た目のページを大量に作りたい
- PPTX の編集は不要で、配布物は PDF（＋任意で PNG）でよい

## Quick Start

1. Copy [assets/deck-template.html](https://skilld.dev/api/skills-raw/aktsmm/agent-skills/html-pdf-slides/assets/deck-template.html); keep one `<section class="page">` per page (1280×720 px). Page kinds: cover, content (`page slide`), ending.
2. Fill content. Content slides need `data-key` (for reports), a `.ft` footer, and use `.card` blocks so overflow can be measured.
3. Render: `node scripts/render-deck.mjs deck.html out` (needs `playwright-core` + a Chrome/Edge; set `CHROME_PATH` if not auto-found). Output: `out/<name>.pdf`, `out/<name>-pN.png`, `out/<name>-report.json`. Exit code 1 = a slide overflows.
4. **Look at the PNGs** (cover, a dense slide, ending) before reporting done.

## Design Rules

- One slide = one question and one takeaway; title states the claim, a one-line subtitle supports it.
- Fixed 3-box info strip under the title for explainers: 誰に関係するか (bold the target) / 嬉しい点 / 対応の要否.
- Fill the page with useful content in cards (what changes, how it works, limits, glossary); avoid empty bands. Keep body ≥ 12.5 px, preferably 14–16 px; when it does not fit, cut wording or split to a continuation page rather than shrinking further.
- Palette: white field, brand blue accents, navy footer band; one accent colour per meaning (green good, red caution). Do not make every card equally loud.
- Visible text is final copy: no internal-memo wording (未確認 / 記載なし / 要確認 / 推定). Confirmed → write; unconfirmable → omit.
- Put IDs, categories and links in the footer; per-page creation dates and credits only on cover/ending.
- Every link `https://`, escaped; cite official sources for facts.

## Done Criteria

- Render exits 0 with zero overflow, PNGs inspected, links clickable in the PDF, Japanese glyphs visible (view an image; text extraction alone can hide missing glyphs).
