Reading crumpled paper

·

Rui Cavaleiro

·

Machine learning engineer

·

5 min

We keep a drawer of paper in the Lisbon office. There are 4,182 receipts in it: some posted to us by testers in envelopes, some collected by the team, one jar of them left in a car through August 2025. Every change to the reader is run against that drawer before it goes anywhere near a release. The worst item in it is a receipt from Padaria Rosa folded into eight panels, with the total sitting directly under a crease.

Thermal paper is on a timer

Most till receipts in Portugal are printed on thermal paper, which means the print is heat rather than ink, and heat fades. A receipt from Mercearia Bico dated 03 Feb 2026 for EUR 6.85 was clear when we photographed it in February and blank in June, after four months in a wallet pressed against a bank card. A card in the same pocket is the fastest way to erase one. Of the 4,182 receipts in the drawer, 214 are now unreadable to a person, and no amount of work on our side will bring them back. The app says this once, on the capture screen: photograph it the day you get it.

A curled receipt is a cylinder

Our first correction treated the paper as a flat rectangle seen at an angle, which is the standard approach and the wrong model of the object. A receipt that has been in a pocket keeps a curl, so the middle of every line bows and the amounts drift left into the description column. In 2.4.0, released on 12 Aug 2026, we fit a curve to the top and bottom edges and unwarp with a mesh instead. The total is now read correctly on 97.1% of the drawer, up from 91.6%.

The arithmetic has to close

Reading only the largest number on a receipt is a trap. In Portugal the change line, TROCO, sits under the total and is often bigger; a 23% IVA line looks like a total to anything that only pattern-matches; a weight line from Talho Serrano, printed as 0,412 kg, has been read as an amount more than once. So Slip reads the whole grid, adds the item lines and the tax, and compares that sum against the printed total. When the two disagree by more than EUR 0.02 the receipt is marked low confidence and you get asked rather than told. That happens on about 1 receipt in 34.

What happens to the photo

The photograph is read on the phone that took it. Slip keeps the image beside the entry at full resolution, and you can delete the image and keep the amount, which is what most people do with a medical receipt. Forwarding by email is the one path where a receipt is read somewhere other than your phone, and that exception is written on the privacy page in the same size as everything else. When the paper has faded to nothing, Slip says so and offers a blank entry with the date already filled in, because a guess at that point is a fabrication with two decimal places on it.

Create a free website with Framer, the website builder loved by startups, designers and agencies.