The problem I kept running into: a financial report where a subtotal on page 8 is wrong, but nobody spots it until the numbers get aggregated into a spreadsheet and something doesn't reconcile.

I wanted a tool that could ingest any PDF with tables and tell me which totals don't add up. The constraint: no template, no column mapping UI, no server. Every byte in the browser.

What it does

Upload a PDF. The tool:

  1. Extracts all text items with their x/y coordinates from each page via pdfjs-dist
  2. Clusters items by y-position into rows (within a 4px snap tolerance)
  3. Detects which rows are "total" or "subtotal" rows by keyword matching
  4. For each total row, identifies numeric columns and sums the data rows above it (back to the previous header or total)
  5. Compares computed sum to stated total — flags differences above a 0.1% tolerance

The hard part: coordinate-based table detection

PDF text items don't know they're in a table. The structure is: a stream of (string, x, y, width) tuples. I have to infer table structure purely from spatial relationships.

The approach:

This breaks on rotated text, multi-column layouts, and cells that span multiple columns. But it catches the common case — section subtotals in financial reports, grand totals in expense sheets.

Stack

Freemium

3 PDFs/month tracked in localStorage. Paid plan unlocks unlimited and CSV export ($9/month).

Live at: https://compare-lab.xyz/pdf-table-checker/

If you work with tabular PDFs regularly and there's a document structure this approach would miss, I'd like to know.