Arth
Decision 6 of 18

Converge PDF onto the CSV pipeline instead of building a second one

One decision from Arth, which asks: Can an app understand your money without ever being told what it is?


PDF import handles password-protected statements and detects scanned, image-only PDFs that need different treatment from text-layer ones. Then it reconstructs the page layout into a grid — and feeds that grid into the same header-mapping and row-parsing components the CSV and Excel pipeline already used, unchanged.

Building a parallel PDF-specific parser would have been the obvious route and would have doubled the surface where the two paths could quietly disagree about the same statement. Instead a cross-format consistency test asserts that the PDF-derived and CSV-derived versions of the same transaction agree.

That test deliberately asserts on every field deduplication relies on, rather than the easier, more obvious surface fields of date and amount. The fields that matter are the ones a duplicate would hide behind.

This one did not survive contact with real statements. On two real PDFs the grid read zero rows: one table header drawn without text, another centred over wide columns. Phase 13 added the second parser I had refused to build, a line-by-line reader that takes over whenever it reads more rows than the grid. The convergence that still holds is further down: every source ends in the same ledger.

Your opinion

Would you have decided this differently?

Where do you stand?

What gets published. I read every opinion and publish substantive ones, including those that disagree with me, as a scroll on this page. I may add a reply. I leave out spam, abuse and anything off-topic, so please include only what you’d be happy to see in public.

Where it goes. I keep your opinion, your stance and, if you allow it, your name in a database run by Neon. I don’t ask for your email or store your IP address, but Netlify, which hosts this site, may log it when it handles your request. To have yours removed, email pkrishna@vaulthai.health. A published opinion is removed from the site, though it can remain in my site’s version history.

Next