Flutter web · pdfium wasm

PDFs that stay sharp,
rendered in the browser.

A tile engine that runs pdfium in real Web Workers and rasterises every tile on demand. 100 MB CAD drawings and 200 megapixel scans zoom smoothly — and never leave the tab.

pubspec.yaml
dependencies:
  fidelity_pdf: ^1.1.0
0servers required
3worker threads by default
5 MBpdfium.wasm, cached once
<16 msUI-thread work per tile

Why it holds up

Built around one constraint

Dart cannot thread on the web. Everything here follows from taking that seriously instead of working around it.

Nothing leaves the browser

pdfium runs in this tab. No server, no upload, no wire format — which is also the simplest possible privacy story.

Real threads, not fake ones

Dart has no isolates on web, so the background tier is a pool of actual Web Workers running pdfium-wasm. The UI thread never rasterises.

Zoom without a ceiling

Tiles are rendered on demand, never baked ahead. A vector page stays razor-sharp however far you go; a raster image stops at its native resolution instead of inventing detail.

PDF and images, one pipeline

PNG, JPEG, BMP, GIF and WebP go through the same tile engine. Format is sniffed from the bytes, never trusted from the extension.

Survives a bad page

A wasm heap never shrinks, so an exhausted worker is dead for good. The pool detects that and rebuilds it, instead of failing every tile forever.

Budgets you can see

Every knob is on one config object, and estimate() tells you what a setting costs before you pay for it.

Three lines

Drop it in

FidelityPdfView opens the file, picks the engine, and handles pan and zoom. Bring your own controller and camera when you need to drive pages, thumbnails or an existing viewport yourself.

Full API reference →

viewer.dart
final camera = CameraSystem();
final doc = await FidelityController.open(
  PdfSource.bytes(bytes),
  camera: camera,
);

FidelityPdfView(controller: doc, camera: camera);