← Writing
July 21, 2026 ocrpdfdebugging

The IBAN that copies wrong

An invoice PDF showed an IBAN starting with ‘LI’. When copied, it pasted as ‘L1’ and the SWIFT transfer bounced, because ‘L1’ is not a valid country code.

Same file. On screen: ‘LI’. On Ctrl+C: ‘L1’. What happened?

The invoice was not a native PDF, just a scanned piece of paper. A PDF created by a scan has two layers: image and invisible text. The text layer is generated with OCR, which is what actually gets copied. And the OCR of the scanner misread the capital ‘I’ as the digit ‘1’.

Lesson: a scan can look digital but carries whatever the OCR got wrong. So keep documents digital end to end: printing a native PDF just to scan it back in adds nothing and quietly corrupts the text. If it started as a file, send it as a file.


Originally published on Substack.