VUE-PDF

Create PDF documents
with Vue components

A Vue 3 port of react-pdf. Compose PDF documents using familiar Vue SFCs — write <Document>, <Page>, <Text>, and <View> just like you would build any Vue app. Works on the browser and server.

bash
pnpm add @vuepdf/renderer
</>

Vue Component Model

Declare PDF documents using 30+ Vue primitives — Document, Page, View, Text, Image, Canvas, SVG, forms, and more.

Flexbox Layout

Powered by Yoga Layout (same engine as React Native). Every <View> is a flex container.

Browser + Server

Dual platform support. Use usePDF and <PDFViewer> in the browser, or renderToFile on the server.

Nuxt Auto-Imports

With @vuepdf/nuxt, all 30+ components and composables are auto-imported with zero config.

Rich Text Engine

Advanced text layout with hyphenation, justification, RTL/bidi support, and custom font handling.

TypeScript First

Fully typed components, composables, and public API. Intellisense coverage across the entire package.

SVG & Canvas

Embed vector graphics with full SVG support (Path, Rect, Circle, gradients, markers) and <Canvas> drawing.

Forms & Annotations

Create fillable AcroForm PDFs — TextInput, Checkbox, Select, List, FieldSet — plus Note annotations.

Extensions

Optional packages for LaTeX math (@vuepdf/math) and Mermaid diagrams (@vuepdf/mermaid).

Quick Example

Create your first PDF document in seconds:

app.vue
<template>
  <Document>
    <Page size="A4" style="padding: 40px">
      <View style="margin-bottom: 20px">
        <Text style="font-size: 24px; font-weight: bold">
          Hello, vue-pdf!
        </Text>
      </View>
      <View>
        <Text style="font-size: 12px; color: #666">
          Generate PDFs with Vue components — in the browser or on the server.
        </Text>
      </View>
    </Page>
  </Document>
</template>