Private betav0.1.0
Docs
Format developer documentation

Overview

Deploy your Format documents to production.

To generate PDFs in production, you need two things:

  1. The compiled renderer bundle, produced by format compile, a bundler plugin or the Next.js plugin.
  2. Your assets, the images, fonts, and other static files your documents reference, packaged as a ZIP.

For most deployments, both are handled automatically. format compile produces a _generated directory containing the renderer bundle and an assets.zip per document. Deploy that directory alongside your app.

What gets deployed

After running format compile, the output looks like this:

_generated
package.json
index.js
invoice
index.js
assets.zip
chunks
styles.js

The _generated directory is self-contained. It includes the compiled renderers, their styles, and an assets.zip per document. Ship it alongside your application code.

Choose your deployment target

Where do you generate PDFs?Guide
Node.js server (Express, Fastify, Hono, etc.)Node.js
Docker containerDocker
Next.js on VercelVercel
Serverless functions (AWS Lambda, etc.)Serverless
Edge runtimes (Cloudflare Workers, Vercel Edge)Edge

Assets

The Format API requires a ZIP of assets alongside the rendered HTML. How you provide that ZIP depends on your constraints and runtime. Read Assets for the full breakdown.

Was this page helpful?