Back to browse
I'm running ML models for PDF layout analysis entirely in the browser

I'm running ML models for PDF layout analysis entirely in the browser

by bobsingor·Feb 18, 2026·3 points·0 comments

AI Analysis

●●SolidWizardryBold Bet
The Take

Runs full layout detection — PP-DocLayoutV3 for blocks/titles/tables and Microsoft's table-transformer for cell structure — entirely in the browser via ONNX Runtime (WASM/WebGPU), so documents never leave the tab. Impressive technical work, but the models are ~60MB and inference is CPU/GPU-heavy, so expect crashes on phones and slow analysis on older machines. The plugin-first approach (React/Svelte/Vue) and open-source repo make it a very usable proof-of-concept for privacy-first PDF tooling.

Category
Target Audience

Frontend engineers, developers building PDF/document-processing tools, privacy-conscious teams and researchers experimenting with client-side ML

Post Description

Hi HN, creator of EmbedPDF here.

I recently posted my open-source PDF viewer here, and one thing I really value is that it runs completely offline. I started wondering if we could push that further: could we do full ML layout analysis (detecting tables, headers, columns) directly in the browser?

To my surprise, it actually works.

The catch: It is far from production-ready. It crashes on most phones, and on older computers, it can be incredibly slow.

The why: I believe the future of document processing is local. Many users work with sensitive documents (bank statements, legal contracts) and simply do not want to upload them to a cloud endpoint just to parse a table or analyze layout.

This is a proof of concept for that future—where models get smaller, WASM/WebGPU gets faster, and we can keep data entirely on the client side.

Demo: https://www.embedpdf.com/layout-analysis Repo: https://github.com/embedpdf/embed-pdf-viewer

I'd love to hear your thoughts on the performance and where you think browser-based ML is heading.

Similar Projects

Open Source●●Solid

PDFLince. Privacy first, client side PDF tool

Zero-server processing inside the browser is the clever bit — Web Workers + pdf-lib/PDF.js lets you compress, merge, split and convert large PDFs without uploading sensitive files. The app also supports offline use and multiple languages, but the repo is early-stage with minimal community traction, so it’s useful now for cautious users or integrators rather than a drop-in replacement for mature SaaS players.

Niche GemShip It
GSiesto
233mo ago