Imposia

Imposia Documentation

Turn React HTML into browser pages you can preview, print, and save as PDF.

Build a feature where people edit content and print it, and you usually end up with three documents claiming to be the same one: the editor renders the content, the preview clones it, and the print path reconstructs it somewhere else. Then the preview says 12 pages and the PDF has 13, and nobody can say which one is correct — because nothing decided which one was authoritative.

Imposia removes that question. It turns the HTML and CSS you already have into one paginated document inside the browser, and every surface — preview, native print, Save as PDF — observes that same finished document.

Why Imposia exists →

What happens to your HTML

  1. Your app passes HTML, CSS, and page options to Imposia.
  2. Core paginates the next version in a temporary iframe.
  3. When pagination finishes, Imposia replaces the visible document in one step.

If pagination fails or a newer update arrives first, readers keep seeing the last completed document. They never see a half-finished layout.

What one committed source can produce

OutputHow you get itWhat you receive
PreviewThe React ViewerThe completed pages, presented from the canonical iframe
Print or PDFprint()The browser's native print dialog, where the reader picks a printer or Save as PDF
EPUBexportEpub()Optional. A reflowable EPUB 3.3 Blob built from the committed semantic source

Know the boundary

Imposia does not produce PDF bytes

print() opens the browser's own print flow. There is no PDF renderer, no Node or CLI renderer, and no server publishing API. If your application needs PDF bytes on a server, Imposia is not the right tool — use a headless browser or a server-side renderer instead.

Imposia runs in the browser and ships as ESM. If that matches your application, continue with Build your first page.

On this page