Back to documentation

PDF analysis

How Karchu extracts structured rows from a PDF: text layer first, table and column detection, wrapped rows, dates and number formats.

Last updated 2026-09-11

Karchu extracts structured rows from PDF documents using the embedded text layer where one exists and OCR where it does not.

What is extracted

  • Extract the embedded text layer with page and coordinate information
  • Detect table structure, column boundaries and header rows
  • Join wrapped and multi line descriptions back into one transaction
  • Read regional date formats, including DD/MM/YYYY, MM/DD/YYYY, YYYY-MM-DD and abbreviated month names
  • Read regional number formats, including 1,234.56, 1.234,56 and Indian lakh grouping
  • Handle debit and credit columns, single signed amount columns and running balance columns
  • Ignore summary, total and carried forward lines so they are not imported as transactions
  • Carry page number and source text position on every extracted row

Example output shape

{
  "page": 3,
  "txn_date": "2026-02-14",
  "description": "CARD PAYMENT TO ADOBE SYSTEMS SOFTWARE",
  "merchant": "Adobe",
  "debit": 59.99,
  "credit": 0,
  "balance": 4218.44,
  "confidence": { "date": 0.99, "merchant": 0.95, "amount": 0.99 },
  "review_status": "ok"
}

Every row keeps the page it came from and the position of the source text, so a person reviewing the document can be shown exactly where a figure was read.

Limits

  • A PDF with no text layer and no readable image content produces no transactions and says so
  • Layouts Karchu has not seen may extract with lower confidence and route rows to review

Questions

How does Karchu tell a digital PDF from a scanned one?
It reads the embedded text layer. If a page returns usable text with positions, it is treated as digital. If it returns nothing or unusable fragments, that page goes to OCR.
Can it read a PDF where one transaction spans several lines?
Yes. Rows are grouped by vertical position and column boundaries, so a description wrapped over two or three lines is rejoined into one transaction.
What about 1.234,56 style amounts?
Both decimal conventions are handled, along with Indian lakh grouping. The convention is decided per document from the amounts on the page, not assumed from your locale.