Skip to content

The invisible text layer: why your scan still looks identical after OCR

By the getPDF team · Published 11 October 2026

The short answer

A searchable scan is 2 things on each page: the original scan picture, and a layer of real words drawn in an invisible mode exactly where the picture shows them. You see the picture; search, selection and copy find the words. getPDF’s OCR adds the layer without touching the picture’s bytes, so the page looks identical, and you can check that yourself with Inspect PDF in under a minute.

Try it here, nothing is uploaded

PDF · scanned or photographed · any size

How can a page show a picture but search like text?

A PDF page is a list of drawing instructions: put this picture here, write these letters there, in this font, at this size. A scanner writes 1 instruction per page: draw the picture. There are no letters, so there is nothing to find.

OCR reads the picture and adds a second set of instructions: for every word it recognised, write the word at this spot, this wide, this tall. The trick is in 1 setting of the PDF format, the text render mode. Mode 3 means “neither fill nor outline the letters”: the word exists, has a position and a size, and paints nothing. Every reader honours it, so the picture stays the only thing you see.

An exploded view of 1 page. The lower plane is the scan picture with grey lines of print, labelled as unchanged bytes. The upper plane, drawn with a dashed border, holds the invisible words Jane Cooper, 14 March 2019 and 1,284.50 EUR, each placed over its printed line. A cursor drags a selection across the printed amount, and the highlight lands on the invisible word above it.1. the scan picture: drawn first, bytes unchangedJane Cooper14 March 20191,284.50 EUR2. the text layer: real words, render mode 3, paints nothingyou select the picture;the words come along
What each page of a searchable scan holds after OCR. The picture is drawn first and is the only thing you see; the words are drawn after it in render mode 3, so they paint nothing, but selection, search and copy find them at the same spot.

How each word lands on its printed word

The reader, Tesseract 5 running in your browser, draws every page at 300 dpi and returns each word with its box in pixels. getPDF turns those pixel boxes into page positions with the same engine that drew the page, so a page that is rotated, or scanned sideways and turned upright, gets its words in the right place and the right direction.

Each word is then written with a special font, GlyphLessFont: every letter maps to 1 empty shape, and the word is stretched to the width of its box. Each word sits on its line’s baseline, the line the letters stand on, and is as tall as the line’s letters from the tallest to the lowest tail. So the words of a line share one height, a selection runs as a straight band rather than jumping up and down with each word, and lines printed in one size come out in one size, which is how PDF to Word and PDF to Markdown can tell paragraphs from headings on a scan. The font also carries a table that tells readers which character each code stands for, which is why copy gives you “1,284.50 EUR” and not boxes.

That is also why the highlight in your PDF reader covers whole words a little roughly: the layer knows where each word starts and ends, not each letter.

Not everything the reader returns goes in. Specks and smudges that it reads as stray letters, unsure and not shaped like a word, are left out, and the result says how many (“Left out 26 marks the reader could not make into words”), so search does not trip over them.

Does the scan really stay the same?

Yes, and it is tested rather than promised. Our test suite runs OCR on a scanned lease and requires 2 things of the result: the picture’s stored bytes are identical to the original’s, and the page draws exactly the same pixels. The original page is only wrapped in a save-and-restore pair of instructions, so the layer starts from a clean state.

What changes is everything around the picture: the file is written again, with the new words, the font, and a newer PDF version number (1.7). Pages that already had text of their own are left alone by default, so a page is never given a second layer over real text.

Check it yourself with Inspect

You can confirm all of this on your own file in a minute, on your device:

  1. Run Inspect PDF on the original scan and note 3 rows.
  2. Run OCR PDF on it and download the searchable copy.
  3. Run Inspect on the copy and compare.

On our 1-page test scan (an invented lease, 200 dpi grey), measured again on 12 October 2026:

What you check Original scan After OCR
Pages with text 0 of 1 checked 1 of 1 checked
Scanned pages (image, no text) 1 0
Fonts none (no text) GlyphLessFont, embedded, 1 page
Largest image page 1, 1165 x 826 px, 33 KB page 1, 1165 x 826 px, 33 KB
Images 1, 33 KB (97 % of the file) 1, 33 KB (89 % of the file)
File size (from your file manager) 34,792 bytes 38,233 bytes

Same picture, same pixel size, same bytes; a new font; 3.4 KB more file. Then the practical test: open the copy, press Ctrl+F (Cmd+F on a Mac), and search for a word you can see. The hit lands on the printed word.

Inspect PDFsee the fonts, images and text pages of any PDF. Free, runs on your device.

Why the file grows only a little

Text is small. A word in the layer costs its position, its stretch and its letters: a few dozen bytes. The font is added once per file. Measured on 12 October 2026:

Scan Words read Grew by
1-page lease, 200 dpi grey 27 3.4 KB
1-page typed letter, 300 dpi 156 5.5 KB
10 pages of that letter 1,560 29 KB

Against the scans themselves, 34 KB to 1.2 MB a page in these tests, that is noise. If your searchable archive is big, the pictures are why, and Make a PDF smaller is the fix; OCR first, then compress, because compression keeps text exactly as it is.

What this means in practice

  • Printing is unchanged. Mode 3 paints nothing on paper either.
  • Every reader works. Acrobat, Preview, Chrome, Edge and phone readers all understand render mode 3; nothing special is needed after the download.
  • Copy is as good as the reading, no better. The layer is what the reader made of the picture. On a clean 300 dpi letter we measured 151 of 156 words exactly right (the pronoun “I” came out as a vertical bar all 5 times); on a noisy old fax, 118.
  • Search misses are possible. A word the reader got wrong is a word search cannot find. Searching a part of the word, or a second word nearby, finds more.

The honest part

The layer can disagree with the picture. It is a guess written in text. In our test photo of a letter tilted by 8 degrees, an amount of 545.92 came out as 545.90 in the layer while the picture still showed 545.92. The confidence report flags pages and words the reader was unsure of, and what the confidence score means explains how far to trust it. For a contract figure, an account number or a date that starts a deadline, read the picture: the pixels are the document.

The file is new, so a digital signature does not survive. The picture is untouched, but the file around it is written again, and a signature covers the whole file. The tool warns when the original was signed; keep that original.

It does not clean up the picture. A crooked, dark or stained scan stays exactly that, because nothing touches the picture. If the page needs to look better, scan it again.

It does not make the text editable in place. The words are invisible and in an empty font. For an editable document, convert the searchable copy with PDF to Word; the full story of one scan, from languages to the confidence report, is in making a scanned PDF searchable.

Questions

Does OCR change my scanned PDF?

It adds to it. The scan picture keeps its exact bytes; a block of invisible words is added to each page that was read, plus 1 small font. The page draws the same pixels as before. The file is rewritten, so a digital signature on the original no longer checks out; the tool warns about that.

How much bigger does the file get?

A few kilobytes a page. In our tests a 1-page scan with 27 words grew from 34 KB to 37 KB, a full typed letter of 156 words by 5.5 KB, and 10 such pages by 29 KB, against scans of hundreds of kilobytes to megabytes.

Will the invisible text print?

No. The words are drawn in a mode that paints nothing, on screen or on paper. A printout of the searchable copy is the same as a printout of the original.

Can I see the text layer?

Not directly, by design. Select across a line or press Ctrl+A in your PDF reader and the highlight shows where the words sit. Inspect PDF shows the font the layer uses, GlyphLessFont.

Why does the copied text differ from what I see?

The layer is the reader's best guess at the picture, not a copy of it. Where the scan is poor, the layer can say 545.90 where the paper says 545.92. For anything that matters, the picture is the document.

The tools for this job