forme

Forme is a document engine for JavaScript, written in Rust and compiled to WASM. Render the HTML and print CSS you already have, or author React, Svelte, Vue, a

What is forme?

Forme is a document engine for JavaScript, written in Rust and compiled to WASM. Render the HTML and print CSS you already have, or author React, Svelte, Vue, and Preact components. Paginated PDFs in-process - no headless browser.

Overview of forme

What it is

Forme is a document engine for JavaScript, written in Rust and compiled to WASM. It renders HTML and print CSS, or allows authoring components in React, Svelte, Vue, and Preact. It generates paginated PDFs in-process without a headless browser.

Key features

  • Page-native layout: Content flows into pages, page breaks at the right place.
  • React, Svelte, Vue, and Preact components: Document, Page, View, Text, Image, Table.
  • Live preview: forme dev shows PDF updating in real time.
  • Fast: Rust engine compiled to WASM, renders in milliseconds.
  • OpenType shaping: Real GSUB/GPOS shaping via rustybuzz.
  • Optimal line breaking: Knuth-Plass algorithm.
  • Hyphenation: Automatic in 35+ languages.

Use cases

Generating PDFs from existing HTML and print CSS. Authoring PDF templates with React, Svelte, Vue, or Preact components. Live preview during development with forme dev. Client-side PDF generation in the browser using @formepdf/core/browser. Creating invoices, reports, and other paginated documents with dynamic data.

Getting started

bashnpx @formepdf/html invoice.html -o invoice.pdfFor component-based authoring, install the relevant packages (e.g., npm install @formepdf/react @formepdf/core) and use the renderDocument function. See the repository README for full instructions.

License and pricing

MIT license, open source.

Based on the project's public README and repository metadata.

Add this badge to your README

Featured on YunoDB Badge styles & help

Maintain this project? Show that it is featured on YunoDB.

Markdown[![Featured on YunoDB](https://yunodb.com/badge/danmolitorforme.svg)](https://yunodb.com/tools/danmolitorforme?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/danmolitorforme?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/danmolitorforme.svg" alt="Featured on YunoDB" height="20"></a>