When you parse a multi-page bank statement PDF into Excel or CSV, the most common sanity check is also the easiest one to fool:
opening_balance + sum(credits) - sum(debits) == closing_balance
If that number matches, most converters mark the file "verified." In practice, that check misses some of the most painful bookkeeping bugs.
Here are four failure modes we ran into while building a browser-local PDF-to-spreadsheet parser (LedgerRowKit) and how integer-cent checks plus line-level source tracing catch them.
1. Equal-and-opposite omissions hide behind a clean closing balance
Suppose a parser skips one $50.00 deposit and one $50.00 debit across a 40-page statement. The closing balance still matches the PDF to the penny.
To catch silent omissions, verify three separate invariants instead of one:
- Row count parity: Count dated transaction entries in the PDF (excluding opening balances, repeated column headers, and section totals) and match them 1-to-1 against exported rows.
- Separate debit and credit totals: Compare total withdrawals and total deposits independently against the statement summary block whenever the bank prints one.
- Row-level running balance: Check every intermediate balance, not just the final line.
2. Do not deduplicate matching amounts blindly
On real statements, two consecutive rows often share the exact same date and dollar amount. In our public 40-page synthetic checking fixture (120 transactions, 39 cross-page continuations), page 1 contains two back-to-back -$3.32 debits:
| PDF source | Transaction | Signed amount | Printed balance |
|---|---|---|---|
P1:L6 | First debit | -$3.32 | $996.68 |
P1:L7 | Second debit | -$3.32 | $993.36 |
P1:L8 | Incoming transfer (continued on page 2) | +$7.09 | $1,000.45 |
A naive dedupe pass drops P1:L7. Keeping an immutable source coordinate (P{page}:L{line}) on every extracted row makes it obvious that P1:L6 and P1:L7 are distinct lines that each move the running balance.
3. Do every balance check in integer cents and trace mismatches back to the exact PDF line
JavaScript floating-point math (0.1 + 0.2 !== 0.3) creates noisy false positives on long statements. Converting every signed amount and printed balance to integer cents (Math.round(amount * 100) after strict regex parsing) keeps checks deterministic.
When an expected balance disagrees with the printed balance, flagging the row is only half the fix—the reviewer still has to find where the problem came from. In our worked October sample, a -$75.00 shipping payment on P1:L14 produces an expected balance of $1,125.00 while the statement prints $1,115.00 (a $10.00 shortfall that carries through to the close). Clicking the flagged row jumps straight to P1:L14 in the PDF text pane so a human can decide in seconds whether the extraction misread a digit or the source document itself has a discrepancy.
4. Keep parsing local in the browser—and be explicit about what that does not cover
For sensitive client bank PDFs, uploading raw statements to a third-party server is often a non-starter. Modern browsers can parse selectable-text PDFs locally via client-side PDF extraction and generate .xlsx / .csv workbooks (with CSV formula-injection neutralization for leading =, +, -, @) with zero bytes of statement content sent over the network—something anyone can confirm directly in the DevTools Network tab.
Two practical boundaries worth being upfront about:
- Text-based PDFs only: If dragging across a page selects the whole page as a single image, it is a scan and requires an approved OCR workflow rather than a text parser.
- CSV import layouts vary: Keeping a clean review workbook with source coordinates and mismatch flags separate from a 3-column or 4-column QuickBooks/Xero import copy prevents audit trails from being stripped out.
Reproducible sample fixtures
If you are testing your own bank-statement parser or reconciliation script, you can grab our synthetic multi-page PDF fixtures and verification checklist on GitHub:
- Synthetic fixtures & reconciliation checklist: Hatcher001246/ledgerrow-bank-statement-samples
- Full verification walkthrough & interactive browser check: How to Verify Bank Statement Extraction Accuracy