Get Started

Installation

Install vue-pdf-export with npm and add the package styles in Vue, TypeScript, Vite and Nuxt applications, with package-manager compatibility guidance.

To start using vue-pdf-export, you need to install the package. Run one of the following commands in your terminal:

The unversioned command installs the current npm release. For an app using direct header or footer props from an older release, see the migration guide. The v1 documentation remains available for installations through 1.1.1.

npm install vue-pdf-export

Import

TypeScript:

import {
  Html2Pdf,
  type PdfBase64Options,
  type PdfMetadataOptions,
  type PdfOutputFormat,
  type PdfProgressState,
  type PdfRenderMode,
  type PdfSecurityOptions,
  type PdfSerializedOutput,
  type PdfStylingOptions,
  type WatermarkOptions,
} from 'vue-pdf-export'

import 'vue-pdf-export/style.css'

JavaScript:

import { Html2Pdf } from 'vue-pdf-export'
import 'vue-pdf-export/style.css'

Package-manager compatibility

The packed package is validated as a consumer installation with:

  • npm
  • pnpm
  • Yarn
  • Yarn Plug'n'Play
  • Bun

The compatibility fixtures verify installation, TypeScript resolution, production builds, CSS imports, and browser-side PDF generation.

Nuxt

vue-pdf-export can be imported during SSR, while PDF generation itself remains browser-only.

See Nuxt 3 & Nuxt 4 SSR for <ClientOnly>, lazy-import, and client-event patterns.

Copyright © 2026