Installation
Requirements and the one-line module install for an existing Nuxt 4 app.
Nuxt PDF is a Nuxt module. It installs into an existing Nuxt 4 application and adds server-side PDF rendering; there is no separate CLI or service.
Requirements
| Layer | Supported |
|---|---|
| Node.js | ^22.14.0, ^24.0.0, or ^26.0.0 |
| Nuxt | ^4.4.8 |
| Vue | ^3.5.0 |
Nuxt 3, Node 20, browser rendering, and edge rendering are not claimed by the current alpha. The engine is Node server-only.
Install the module
pnpm add @lupinum/nuxt-pdfAdd it to nuxt.config.ts:
export default defineNuxtConfig({
modules: ["@lupinum/nuxt-pdf"],
});The module discovers templates under pdfs/ and generates the typed #pdf
registry. In development, it also mounts preview routes under /_pdf.
#pdf is a Nitro server module. The production client bundle contains neither
the template SFCs nor the PDF engine, and the production server artifact omits
the development preview registry, sample data, and scenarios.
nuxt dev (or run nuxt prepare) once
so Nuxt writes the typed #pdf registry. Until that runs, #pdf imports have no
types.Optional test dependencies
The testing utilities in @lupinum/nuxt-pdf/test parse and rasterize real
output through pdfjs-dist and @napi-rs/canvas. They are loaded lazily and are
not runtime dependencies, so install them only when you write PDF tests:
pnpm add -D pdfjs-dist @napi-rs/canvasSee Testing your PDFs for the full workflow.