Skip to main content

How does Forme compare to react-pdf?

Both use React components to define PDF layouts. The key difference is the layout engine. react-pdf lays out content on an infinite canvas and slices it into pages, which breaks flex layouts and tables at page boundaries. Forme’s engine is page-native, so every layout decision accounts for the page boundary from the start. Forme also has built-in table header repetition, a dev server with live preview, and faster render times. See the full migration guide for details.

How does Forme compare to Puppeteer for PDF generation?

Puppeteer launches a headless Chrome browser to render HTML to PDF. This gives you full CSS support but costs 1-3 seconds per render, 50-200MB of memory per Chrome process, and a 400MB+ Docker image. Forme renders directly to PDF via a WASM module in 5-15ms with no browser dependency. The tradeoff is that Forme requires you to write JSX templates instead of HTML/CSS. See the Puppeteer replacement guide for a step-by-step comparison.

Can I use Forme in serverless (AWS Lambda, Vercel, Cloudflare Workers)?

Yes. Forme’s WASM module loads in under 100ms, making it a good fit for serverless environments. There is no Chromium binary to bundle, no native dependencies to compile, and no subprocess to manage. Cold starts are fast because the entire engine is a single WASM file.

Does Forme support custom fonts?

Yes. Forme embeds TrueType (.ttf) fonts directly into the PDF with automatic subsetting (only the glyphs your document uses are included). Register fonts by providing a file path or data URI.

Does Forme support images?

Yes. Forme supports JPEG and PNG images, including PNG transparency. Provide images as file paths or base64 data URIs. Aspect ratio is preserved when you specify only one dimension. See the Image component docs.

Does Forme support SVG?

Yes. The <Svg> component renders SVG markup directly into the PDF as vector graphics (not rasterized). Supported elements include rect, circle, ellipse, line, polyline, polygon, and path with opacity, fill-opacity, and stroke-opacity support. You can pass SVG as a content string or as JSX children. Advanced SVG features like filters, gradients, and masks are not yet supported. See the Svg component docs.

Does Forme support tables with header repetition?

Yes. This is one of Forme’s core features. Add the header prop to a <Row> inside a <Table>, and that row automatically repeats at the top of every continuation page when the table spans multiple pages. No workarounds or manual pagination needed. See page breaks.

How fast is Forme?

A typical invoice renders in 5-15ms. Complex documents with tables, images, and multiple pages render in 20-80ms. This is 10-100x faster than Puppeteer and 5-10x faster than react-pdf for most documents. The engine is written in Rust and compiled to WebAssembly, so performance is consistent across environments.

Can I generate PDFs in the browser?

Yes. Import @formepdf/core/browser instead of @formepdf/core. The same WASM engine runs client-side with no server required. Font URLs are fetched via fetch() instead of the filesystem, and decompression uses the browser-native DecompressionStream API. Works with Vite, Next.js, Remix, or any bundler that handles WASM.

Does Forme work with Next.js?

Yes. Use renderDocument() from @formepdf/core in API routes, server actions, or getServerSideProps. Since Forme runs in-process as WASM, there is no external service or subprocess to manage. It works in both the Pages Router and App Router.

Does Forme work with Express?

Yes. Call renderDocument() in any Express route handler and send the resulting Uint8Array as the response. See the Puppeteer replacement guide for a complete Express example.

What languages does Forme support?

Forme supports any language that uses a left-to-right writing system and can be rendered with a TrueType font. This covers Latin, Cyrillic, Greek, CJK (Chinese, Japanese, Korean), and many other scripts. Right-to-left languages (Arabic, Hebrew) are supported with automatic direction detection. Mixed LTR/RTL paragraphs reorder correctly.

Is there a VS Code extension?

Yes. Search for “Forme PDF Preview” in the VS Code Extensions view. It provides a live PDF preview, a component tree with hover-to-highlight, and an inspector panel with box model visualization and source navigation. See the VS Code extension docs for details.

Can I embed structured data inside a PDF?

Yes. Pass embedData when rendering to attach any JSON object as a hidden file attachment. The PDF looks identical — the data is invisible to viewers but extractable with extractData(). This makes PDFs self-describing: invoices carry their line items, reports carry their datasets. See the embedded data guide.

How does the hosted API work?

The hosted service lets you manage JSX templates in a dashboard and render PDFs via API using your API key. You can render synchronously (PDF bytes returned immediately) or asynchronously (a job ID is returned and you poll for the result or receive it via webhook). Templates are edited in a live Monaco editor with instant preview. See the API reference for endpoint details.

How do I upload PDFs to S3?

Pass an s3 object in the render request body with your bucket name, key, credentials, and region. Forme uploads the rendered PDF directly to your S3-compatible bucket and returns the URL. This works with AWS S3, Cloudflare R2, MinIO, and DigitalOcean Spaces. See the S3 upload docs for examples.

What are the rate limits on the hosted API?

Each API key is limited to 100 requests per minute. Monthly render limits depend on your plan: Free (500), Pro (5,000), Team (25,000), Business (100,000). The API returns 429 when either limit is exceeded.

Is Forme free?

Yes. The core library is open source under the MIT license. You can use it in personal and commercial projects without restrictions. The hosted service has a free tier with 500 renders/month and 3 templates, with paid plans for higher limits.

Does Forme support fillable PDF forms?

Yes. Forme includes AcroForm components — <TextField>, <Checkbox>, <Dropdown>, and <RadioButton> — for creating interactive fillable PDFs. You can also flatten forms at render time to convert filled fields to static content. See the Forms guide for details.

Is Forme accessible / screen reader compatible?

Yes. Enable PDF/UA-1 compliance with <Document pdfUa>. Forme automatically generates the structure tree, tab order, role map, and artifact tagging required for screen readers. Add alt text to images for full accessibility. See the Accessibility guide.

Can I generate archival PDFs?

Yes. Forme supports PDF/A-2b and PDF/A-2a for long-term document preservation. Enable it with <Document pdfa="2b">. Forme handles font embedding, sRGB output intent, and XMP metadata automatically. See the Archival guide.

Does Forme support digital signatures?

Yes. Forme can apply PKCS#7 detached digital signatures using X.509 certificates. Certify at render time via the certification prop on <Document>, or certify an existing PDF via the /v1/certify API endpoint. See the Digital Certification guide.

Does Forme work with macOS Preview?

Basic form fields render in macOS Preview, but interactive features like dropdowns and radio buttons work best in Chrome’s PDF viewer or Adobe Acrobat. For the most reliable experience across all Forme features, use Chrome or Acrobat.