If you have ever tried copy-pasting transactions from a Chase, Bank of America, Barclays, or Revolut PDF statement into Excel, you know the pain: columns merge, signs flip, and one missed minus sign ruins your entire monthly close.
Worse, sending financial PDFs to generic LLMs introduces two fatal problems for bookkeeping:
Hallucinated digits — a single misread $1,840.00 vs $1,890.00 breaks reconciliation.
Privacy risk — uploading sensitive client bank statements to third-party AI APIs violates most accounting firms' data policies.
Here is the deterministic coordinate-based Python pipeline we built to solve this cleanly—and verify every statement down to $0.00 variance.
1. Extract Layout-Preserving Rows with pdfplumber
Instead of naive text extraction, preserving horizontal layout keeps dates, descriptions, debits/credits, and running balances aligned:
import io , pdfplumber
def extract_statement_lines ( pdf_bytes : bytes ) -> list [ str ] : lines = [ ] with pdfplumber . open ( io .…