Nothing leaves the browser
pdfium runs in this tab. No server, no upload, no wire format — which is also the simplest possible privacy story.
Flutter web · pdfium wasm
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.
dependencies:
fidelity_pdf: ^1.1.0 Why it holds up
Dart cannot thread on the web. Everything here follows from taking that seriously instead of working around it.
pdfium runs in this tab. No server, no upload, no wire format — which is also the simplest possible privacy story.
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.
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.
PNG, JPEG, BMP, GIF and WebP go through the same tile engine. Format is sniffed from the bytes, never trusted from the extension.
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.
Every knob is on one config object, and estimate() tells you what a setting costs before you pay for it.
Three lines
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.
final camera = CameraSystem();
final doc = await FidelityController.open(
PdfSource.bytes(bytes),
camera: camera,
);
FidelityPdfView(controller: doc, camera: camera);