web-to-pdf

Convert a web page to PDF, especially web-based slide decks and presentations (reveal.js, impress.js, custom JS slideshows, scroll-based decks). Use when the user wants to save a website as PDF, capture slides to PDF, convert an online presentation to PDF, export a web deck, or screenshot a web page into a document. Also use when the user pastes a URL and says "turn this into a PDF", "save as PDF", "export this", or "make a PDF of this".

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "web-to-pdf" with this command: npx skills add pearyj/webpage-to-pdf

Web to PDF

Capture any web page — especially slide-based presentations — as a multi-page PDF using a headless browser.

How it works

A bundled Playwright script screenshots each slide (or the full page) as PNG, then assembles them into a PDF via Pillow. It auto-detects the navigation model:

ModelDetectionExamples
reveal.js.reveal element + Reveal JS APIreveal.js decks
Vertical scrollPage height > 1.5× viewport, multiple slide elementsCustom JS slide decks with stacked sections
KeyboardMultiple slide elements, not scrollableimpress.js, deck.js, arrow-key decks
Single pageNo slide structure detectedRegular web pages, articles

Prerequisites

The script bundles its own package.json. On first use (or if node_modules is missing), install dependencies:

cd ${CLAUDE_SKILL_DIR}/scripts && npm install && npx playwright install chromium

Pillow (Python) is also required for PNG-to-PDF assembly:

pip install Pillow

Usage

Run the capture script:

node ${CLAUDE_SKILL_DIR}/scripts/capture.mjs <url> <output.pdf> [options]

Options

FlagDefaultDescription
--width N1920Viewport width in pixels
--height N1080Viewport height in pixels
--wait N1000Milliseconds to wait per slide for animations
--max-slides N50Safety cap on number of slides

Examples

# Presentation deck at 1080p
node ${CLAUDE_SKILL_DIR}/scripts/capture.mjs https://example.com/pitch output.pdf

# Narrow viewport for mobile-style capture
node ${CLAUDE_SKILL_DIR}/scripts/capture.mjs https://example.com/page doc.pdf --width 1280 --height 720

# Slow animations, give extra time
node ${CLAUDE_SKILL_DIR}/scripts/capture.mjs https://example.com/deck slides.pdf --wait 2000

Workflow

  1. Check that playwright and Pillow are installed; install if missing
  2. Run the capture script with the user's URL and desired output path
  3. Verify the output — check page count and spot-check a few pages by reading the PDF or individual screenshots
  4. Report the result to the user (page count, file size, output path)

Troubleshooting

  • Slides all identical: The navigation detection may have picked the wrong model. Try adding --wait 2000 for slower transitions, or check if the site requires interaction (cookie banners, login) before slides are accessible.
  • Missing content / animations not rendered: Increase --wait to give JS more time to render.
  • Blank pages: Some sites lazy-load content; the scroll-based capture handles this by scrolling to each slide. If keyboard navigation produces blanks, the site may actually be scroll-based.
  • Too few / too many pages: Check --max-slides and verify the slide selector detected is correct by inspecting the script's console output.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Gamma Presentation Generator

Generate professional presentations with Gamma AI. Just describe what you want — topic, outline, or full content — and get a polished deck. No Gamma account...

Registry Source
2880Profile unavailable
Coding

ZeeLin Auto-PPT

自动生成精美 PPT 演示文稿 — 通过 Google NotebookLM 生成图文并茂、设计感十足的 AI 幻灯片,导出 PDF 到桌面。用户需自行登录 NotebookLM 网页版。标题微软雅黑 40 号加粗,排版震撼,逻辑图清晰,内容有深度有创新,引用权威数据。配合 desearch skill 使用效果...

Registry SourceRecently Updated
1.1K1Profile unavailable
Automation

Auto Ppt

自动生成精美 PPT 演示文稿 — 通过 Google NotebookLM 生成图文并茂、设计感十足的 AI 幻灯片,导出 PDF 到桌面。用户需自行登录 NotebookLM 网页版。标题微软雅黑 40 号加粗,排版震撼,逻辑图清晰,内容有深度有创新,引用权威数据。配合 desearch skill 使用效果...

Registry SourceRecently Updated
1K1Profile unavailable
General

Markdown To Ppt

Convert Markdown to beautiful presentations and slides. 一键将Markdown文档转换为精美PPT幻灯片,支持多种主题风格,适合商务汇报、教学课件、会议演讲。Markdown to PPT, presentation generator, slides ma...

Registry SourceRecently Updated
501Profile unavailable