Why receipts are difficult
Thermal paper fades. Heat, sunlight and time all reduce contrast, and a receipt kept in a car for a month may be barely legible to a person, let alone software.
The layout is cramped. Item names on the left, quantities and prices on the right, with no ruled lines, means the association between a name and a price rests entirely on vertical alignment.
The paper curls. A curled receipt photographed flat has varying focus and lighting down its length.
Photograph it well
Flatten the receipt under a sheet of glass or press it against a clipboard. This one step fixes more receipt problems than any other.
Photograph against a contrasting background. A white receipt on a dark desk gives the layout stage a clean boundary to work with.
For long receipts, take two overlapping photos rather than one distant shot. Two well-resolved halves beat one unreadable whole.
Verify the fields that matter
Check the total first, then the date, then the merchant name. These three fields carry almost all the value of a receipt for expenses and bookkeeping.
Confirm the arithmetic: if the line items plus tax do not equal the extracted total, at least one number was misread. This is the quickest self-check available.
Watch for decimal points read as commas and for currency symbols merged into the first digit.
Worked example
Input: a folded café receipt, printed in faint thermal ink, photographed flattened under a phone case in daylight.
Output: merchant name and date read cleanly; two line items correct; the tax line read as 1.96 and the total as 26.46. Adding 24.50 plus 1.96 gives 26.46, so the numbers are internally consistent and can be trusted.
Had the total come back as 28.46, the mismatch would immediately flag a digit error to correct by hand.