Skip to content
This repository was archived by the owner on Jul 31, 2026. It is now read-only.

About

Preview web pages as PDF using any framework or just plain HTML – powered by Vite and Puppeteer

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

23 Commits

Folders and files

Repository files navigation

vite-plugin-pdf-preview

Preview web pages as PDF using any framework or just plain HTML – powered by Vite and Puppeteer

Getting Started

npm i vite-plugin-pdf-preview puppeteer

Usage

import pdfPreview from "vite-plugin-pdf-preview";

export default defineConfig({
  plugins: [
    pdfPreview({
      pages: ["page.html"],
      watch: ["**/*.html", "**/*.css"],
    }),
  ],
});

Viewing PDF Files

Files in the browser do not reload when their content changes.

On Windows use Sumatra PDF to have file content update automatically.

Recommendations for other platforms welcome.

About

Preview web pages as PDF using any framework or just plain HTML – powered by Vite and Puppeteer

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages