Installation
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-exportImport
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.
Introduction
Learn what vue-pdf-export provides for Vue applications, including Canvas and selectable-text PDF rendering, output formats, SSR safety and styling.
Quick Start
Generate your first PDF in Vue with the Html2Pdf component, package styles, a PDF content slot and a simple programmatic generate action.
