Page breaks that actually work. No headless browser. No Chrome. Renders in milliseconds — in Node or the browser. Enterprise-ready with PDF/UA accessibility, PDF/A archival, and digital signatures.
Build documents with familiar React components. Forme compiles to WASM and renders in-process - no browser, no subprocess, no waiting.
import { Document, Page, View, Text } from '@formepdf/react';
import { renderDocument } from '@formepdf/core';
const pdf = await renderDocument(
<Document>
<Page size="Letter" margin={36}>
<Text style={{ fontSize: 24, fontWeight: 'bold' }}>
Invoice #2024-001
</Text>
<View style={{
flexDirection: 'row',
justifyContent: 'space-between',
marginTop: 24,
}}>
<Text>Widget Pro</Text>
<Text>$49.00</Text>
</View>
</Page>
</Document>
);
// pdf is a Uint8Array - save it, serve it, email itFight with CSS page breaks in a headless browser, or use an editor that can't handle dynamic data. Puppeteer boots a full Chrome instance per render. react-pdf's flex layout has been broken on page boundaries for 7 years.
Content flows into pages, not onto an infinite canvas that gets sliced afterward. Page breaks happen at the right place every time. Flex calculations reflect actual page-constrained dimensions.
Edit the JSX below and watch the PDF render in real time. No sign-up, no server — everything runs in your browser.
See the difference in real code.
import puppeteer from 'puppeteer';
// Requires Chrome installed, Docker config,
// 200MB binary, sandbox flags...
const browser = await puppeteer.launch({
args: ['--no-sandbox', '--disable-setuid-sandbox'],
executablePath: process.env.CHROME_PATH,
});
const page = await browser.newPage();
await page.setContent(html, { waitUntil: 'networkidle0' });
const pdf = await page.pdf({ format: 'A4' });
await browser.close();import { renderDocument } from '@formepdf/core';
import { Document, Page, View, Text } from '@formepdf/react';
const pdf = await renderDocument(
<Invoice data={data} />
);/* Guess and check. Sometimes works. */
.section { break-inside: avoid; }
.table-row { page-break-inside: avoid; }
/* Nested flex + page breaks = good luck */
@media print {
.header { position: fixed; top: 0; }
/* Hope the browser repeats it... */
}<Table>
<Row header>
<Cell>Item</Cell>
<Cell>Price</Cell>
</Row>
{items.map(item => (
<Row key={item.id}>
<Cell>{item.name}</Cell>
<Cell>{item.price}</Cell>
</Row>
))}
{/* Page breaks handled automatically */}
{/* Table headers repeat on every page */}
</Table>FROM node:20
# Install Chrome dependencies (500MB+)
RUN apt-get update && apt-get install -y \
chromium fonts-liberation \
--no-install-recommends
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
# Memory limits, cold starts, Lambda layers...npm install @formepdf/core @formepdf/react
# That's it.
# WASM runs anywhere:
# - Cloudflare Workers
# - Vercel Edge
# - AWS Lambda
# - Browser
# Zero native dependencies.AI-Powered
Describe your document or upload a reference — invoice, report, certificate, anything. Forme generates a ready-to-edit JSX template in seconds.


A complete PDF toolkit, from layout primitives to dev tooling.
Content flows into pages. Page breaks happen at the right place, every time.
Document, Page, View, Text, Image, Table. If you know React, you know Forme.
forme dev shows your PDF updating in real time as you edit.
Select any element to see its box model, computed styles, and position.
Live PDF preview, component tree, and inspector panel inside your editor.
Renders in milliseconds, not seconds. No browser process needed.
Real GSUB/GPOS shaping for ligatures, kerning, and contextual forms with custom fonts.
Automatic hyphenation in 35+ languages. Knuth-Plass optimal line breaking from TeX.
Right-to-left text for Arabic and Hebrew. Mixed LTR/RTL with automatic direction detection.
2D grid layout with fixed, fractional, and auto track sizing. Explicit and auto placement.
Flex containers wrap across pages correctly with full align-content support.
Text never leaves a single orphan or widow line at a page boundary.
Tables with automatic header repetition. Cell content preserved across page breaks.
TrueType font embedding with automatic subsetting. Only used glyphs are included.
Built-in <QrCode> and <Barcode> components. Code 128, Code 39, EAN-13, EAN-8, Codabar. Vector-based, crisp at any zoom.
Single-line truncation with ellipsis or clip. Ideal for grid cells and compact layouts.
Inline SVG with rect, circle, ellipse, line, polyline, polygon, and path.
Clickable PDF links on any element. Bookmarks for document outline navigation.
Use {{pageNumber}} and {{totalPages}} in any text element.
Attach structured JSON to any PDF. Extract the original data programmatically - no OCR needed.
Generate PDFs client-side with @formepdf/core/browser. Same engine, same templates - no server required.
Style with tw("p-4 text-lg font-bold bg-blue-500"). Full color palette, grid, arbitrary values, fractions.
Describe a document or upload a reference image. AI generates a production-ready Forme template with sample data.
Embed fillable text fields, checkboxes, dropdowns, and radio buttons directly in generated PDFs. Full AcroForm support -- no JavaScript required.
Generate tagged PDFs that pass PDF/UA-1 validation. Structure trees, marked content, alt text, and keyboard tab order -- built into the engine.
Produce ISO-compliant archival PDFs (PDF/A-2a, 2b) with embedded fonts, XMP metadata, and sRGB color profiles. Drop-in compliance for regulated industries.
Sign PDFs with X.509 certificates and RSA keys using PKCS#7 detached signatures -- pure Rust, no external signing service. Visible or invisible signature fields.
Start from a professional template and customize it with AI. No design skills required.
Hosted API
Send one POST request with your template and data. Get a PDF back in milliseconds. No infrastructure to manage.
curl -X POST https://api.formepdf.com/render \
-H "Authorization: Bearer fm_your_api_key" \
-H "Content-Type: application/json" \
-d '{"template": "invoice", "data": {"amount": 49}}' \
-o invoice.pdfUse the playground to design and preview templates with live data - no local setup required.
Describe what you need or upload a reference PDF. AI builds the template and sample data for you.
One POST request with JSON in, PDF out. Works with any language or framework that can make HTTP calls.
Component tree, inspector, and PDF preview in a native VS Code panel. Click any element to jump to its source line.
Install from Marketplace
Side-by-side with the tools you're probably evaluating.
| Forme | react-pdf | Puppeteer | |
|---|---|---|---|
| Page breaks | Page-native (widow/orphan aware) | Broken for 7 years | CSS page-break (fragile) |
| Table headers | Automatic on every page | Not built in | Inconsistent <thead> |
| Line breaking | Knuth-Plass optimal (TeX algorithm) | Greedy | Browser engine |
| Hyphenation | 35+ languages, automatic | Via callback | Browser engine |
| Text shaping | OpenType GSUB/GPOS (ligatures, kerning) | Basic | Full browser shaping |
| BiDi text | RTL, mixed LTR/RTL, auto-detection | No | Full browser BiDi |
| CSS Grid | display: 'grid' with fr/auto/fixed tracks | No | Full CSS Grid |
| Live preview | Built-in dev server | Render to file | Run script, open file |
| Click-to-inspect | VS Code, Cursor, WebStorm | No | No |
| Editor extension | VS Code sidebar panels | No | No |
| Render speed | ~28ms (4-page report) | ~100-500ms | ~1-5s (Chrome boot) |
| Memory | No browser process (WASM) | ~50-100MB | ~50-200MB |
| Links | href prop on Text/View | <Link> component | HTML <a> tags |
| Bookmarks | bookmark prop on any element | Yes | No |
| QR codes | Built-in <QrCode> component | No | Via HTML/JS libraries |
| Barcodes | Built-in <Barcode> (5 formats) | No | Via HTML/JS libraries |
| Text overflow | textOverflow: 'ellipsis' | No | CSS text-overflow |
| Font fallback | fontFamily: 'Inter, Helvetica' | Single family only | Full CSS font stack |
| Custom fonts | TTF with OpenType shaping | Yes | Yes |
| Embedded data | Attach JSON, extract later | No | No |
| Browser rendering | Yes (same WASM engine) | Yes (client-side) | No (server only) |
| Dependencies | None (WASM) | yoga-layout | Chrome/Chromium |
| Runs in-process | Yes | Yes | No (subprocess) |
Open Source
Hosted API
Create an account and start rendering PDFs with a single API call. No packages to install, no infrastructure to manage.