html-to-pdf

Convert scroll-snap HTML presentations into multi-page PDFs via screenshots.

Updated Mar 5, 2026
One-click install
npx skills add https://github.com/BobbyCats/cursor-skills --skill html-to-pdf-bobbycats
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: html-to-pdf
Source: https://github.com/BobbyCats/cursor-skills/tree/main/html-to-pdf
Command: npx skills add https://github.com/BobbyCats/cursor-skills --skill html-to-pdf-bobbycats

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires puppeteer-core, pdf-lib, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill converts HTML-based presentations, particularly those using scroll-snap for navigation, into high-quality, multi-page PDF documents, preserving the final state of animations.

Core Features & Use Cases

  • HTML to PDF Conversion: Exports scroll-snap HTML slides into a PDF format suitable for sharing or archiving.
  • High-Resolution Output: Generates PDFs with adjustable DPI for crisp, clear visuals.
  • Animation Preservation: Captures the final state of animations, ensuring a polished look in the PDF.
  • Use Case: You have a presentation built with HTML and CSS, and you need to share a static, high-fidelity version with stakeholders who cannot view the live HTML.

Quick Start

Use the html-to-pdf skill to convert the HTML presentation located at http://localhost:8766/my-slides.html into a PDF file named ./output.pdf.

Frequently Asked Questions about html-to-pdf

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert scroll-snap HTML slides to a high-resolution PDF?

To convert scroll-snap HTML slides to a high-resolution PDF, this Skill renders each slide as a high-DPI screenshot and composites them into a multi-page document. It requires Node.js with puppeteer-core and pdf-lib, plus a system Chrome or Chromium installation.

Why does browser-native PDF export not work for scroll-snap presentations?

Browser-native PDF export often fails for scroll-snap presentations because it cannot properly capture the scroll-snap navigation layout. This Skill addresses that limitation by rendering individual slide states and compositing them into a single PDF.

Can I preserve HTML CSS animations when exporting to PDF?

Yes, you can preserve HTML CSS animations when exporting to PDF. This Skill captures the final state of animations for each slide, ensuring a polished and static visual representation in the resulting document.

Do I need a system Chrome installation to export HTML presentations to PDF?

Yes, you need a system Chrome or Chromium installation to export HTML presentations. The Skill relies on puppeteer-core, which does not bundle a browser itself, to render the HTML slides at high DPI for PDF generation.

What is the best way to export a local HTML presentation to a PDF file?

The best way to export a local HTML presentation to a PDF file is using this Skill's script, which composites high-DPI screenshots of each slide. Simply provide the local URL of your HTML file and specify an output path for the generated PDF.

What are the limitations of using puppeteer-core for HTML to PDF conversion?

The main limitation of using puppeteer-core for HTML to PDF conversion is its dependency on an existing system Chrome or Chromium installation. The Skill cannot function without this external browser environment to render the scroll-snap HTML slides.