PDF export made easy for Vue Developers

A Vue + TypeScript browser PDF package with Canvas fidelity, selectable/searchable text, pagination, large-document rendering, cancellation, page-aware progress, headers, footers, watermarks, security, metadata, links and more.

Buy Me a Coffee
Powerful Features

Built for real browser PDF workflows.

Use one Vue-oriented API across visual Canvas exports and selectable-text PDFs, while keeping access to advanced html2pdf.js, html2canvas and jsPDF configuration.

T

Selectable & searchable text

Use real PDF text for reports, invoices and documents where selection, search, copy and crisp typography matter.

Page-by-page Canvas rendering

Paginated Canvas exports render one logical page at a time instead of depending on one giant document-height canvas.

Cancellation & page progress

Cancel long-running exports and expose stage, percentage, currentPage and totalPages to build useful progress UI.

H

Headers & footers

Plain text or trusted HTML, optional logos, page-aware header targeting and built-in Page {n} of {total} numbering.

W

Watermarks & page targeting

Text or image watermarks, foreground/background layers, repeat mode, opacity, rotation, positioning and selected pages.

S

Security & document options

User and owner passwords, permissions, password parts, metadata and jsPDF stream compression in both render modes.

Clickable PDF links

Preserve anchors as real PDF link annotations, including selectable link text in text rendering mode.

Repeated-image optimization

Per-generation image caching avoids re-encoding the same reusable image source across selectable-text documents.

Two rendering paths

Choose browser fidelity or real PDF text.

Both modes keep the same component flow for Blob output, preview, download, print and post-processing.

renderMode="canvas"

Maximum HTML/CSS fidelity

Best for highly visual layouts, gradients, shadows, transforms and browser-styled documents. Paginated documents can use the incremental page-by-page Canvas path.

Read Canvas guidance →
renderMode="text"

Selectable, searchable PDF text

Best for reports and text-heavy documents where selection, Ctrl/Cmd + F, copy and crisp text are important. Some advanced browser CSS can render differently.

Read text-mode guidance →
Large-document engineering

Measured bottlenecks, then changed the architecture.

The performance work covers page-bounded Canvas rendering, static footer reuse, repeated-image caching, cancellation, cleanup, browser yielding, memory isolation and stress regressions.

50 / 100

page Canvas regression coverage

Real non-empty incremental exports verified.

~98.26%

smaller peak capture geometry

~99.96M px giant capture → ~1.74M px page-sized capture in the benchmark fixture.

7.82s → 1.43s

static HTML footer benchmark

Footer without logo after render-once reuse optimization.

~46.7MB → ~1.0MB

footer-heavy PDF fixture

Measured output-size reduction after static footer reuse.

Current verified range

50-page and 100-page Canvas exports are verified in the current regression suite. 100 pages is a tested range, not a hard package limit; real limits depend on content, images, renderer, security, browser memory and device resources.

Explore Performance Engineering
Get started

One component, familiar Vue.

<script setup lang="ts">
import { ref } from 'vue'
import { Html2Pdf } from 'vue-pdf-export'
import 'vue-pdf-export/style.css'

const pdfRef = ref<InstanceType<typeof Html2Pdf> | null>(null)
</script>

<template>
  <button @click="pdfRef?.generatePdf()">Generate PDF</button>

  <Html2Pdf ref="pdfRef" render-mode="canvas">
    <template #pdf-content>
      <h1>My report</h1>
    </template>
  </Html2Pdf>
</template>

Acknowledgements

Thank you to the people and projects that helped make this package possible.

Selectable-text rendering is based on and adapted from @timkozlov/html-to-pdf. The vendored source remains under its original MIT license notice.

Copyright © 2026