vite-plugin-pdf-preview
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

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.

Package Sidebar

Install

npm i vite-plugin-pdf-preview

Weekly Downloads

3

Version

0.2.0

License

MIT

Unpacked Size

360 kB

Total Files

6

Last publish

Collaborators

  • davidjbng