How to Prompt AI to Read a Scanned Document
A scanned PDF and a normal PDF reach the model by two different routes. Almost all prompting advice assumes the easy one.
You upload a scanned contract, ask for the termination clause, and get a confident answer with a clause number that does not exist. The reason is not that the model is careless. It is that a scanned document and a normal PDF reach the model by two completely different routes, and almost all advice about prompting with documents assumes the easy one. To prompt AI to read a scanned document well, you work with the harder route: the model is looking at a picture of text, there is no text layer underneath to check itself against, and your prompt has to supply the verification that the file cannot.
Why prompting AI to read a scanned document is different
A born-digital PDF, the kind a word processor exports, carries a text layer. The characters are in the file as characters.
A scan does not. It is an image of a page, wrapped in a PDF container. Nothing in it says the word "termination" anywhere. That word exists only as a shape the model has to recognise.
This distinction is visible in the pricing. Google's document processing documentation says each document page is equivalent to 258 tokens, and that for Gemini 3 models, text embedded in a PDF is extracted and handed to the model, with no charge for tokens from that native text. A scan has no embedded text to extract. You pay the full per-page vision cost and get none of the free, exact text. The same file size, the same page count, and a materially different input.
The documentation is also explicit that document vision only meaningfully understands PDFs, and that other file types are extracted as plain text, which loses charts, diagrams and formatting. If you have loose page images, put them in a PDF first.
Fix the file before you fix the prompt
Half the bad answers in this category come from the file, and the documentation names the fixes plainly.
Rotate the pages the right way up. A sideways scan is a sideways scan to the model too.
Avoid blurry pages. Rescan rather than reprompt. There is no prompt that recovers illegible glyphs.
Mind the resolution ceiling. Larger pages are scaled down to a maximum of 3072 by 3072 pixels and smaller pages scaled up to 768 by 768. A 600 DPI scan of an A4 page is downscaled regardless, so scanning at ever higher resolution does not buy accuracy. The docs note higher resolution does not necessarily improve performance.
Split long files. The limit is 50MB or 1,000 pages, but relevance degrades well before that. Send the fifteen pages that matter.
For a single page, put your prompt after the page. That ordering is the documented recommendation.
Prompt for verification, not for a summary
On a born-digital PDF you can ask for a summary and spot-check it. On a scan, a summary is unauditable: there is no text layer for you to search to confirm a quoted phrase. So ask in a shape that makes the answer checkable by eye.
Three instructions do most of the work.
Make it quote, not paraphrase. A verbatim quotation can be compared against the image. A paraphrase cannot.
Make it cite the page. You need to know where to look.
Make it mark unreadable text explicitly. This is the one people skip, and it is the one that prevents the invented clause number. Give it a token to emit.
Assembled:
This is a 14 page scanned lease. For each of my questions, answer only from what is visible in the scan. Quote the relevant text verbatim and give the page number. If any word you need is illegible, write [illegible] in place of that word rather than inferring it. If the answer is not present in these pages, say "not in this document". 1. What is the notice period for termination by the tenant? 2. What is the monthly rent and on what date is it due? 3. Which party is responsible for repairs to the boiler?
That prompt yields three quotations with page numbers. Checking them takes a minute. The alternative, a fluent paragraph with no anchors, takes as long to verify as reading the lease yourself.
Where scans quietly go wrong
These are the error modes worth knowing before you trust an extraction.
Failure | What it looks like | What to do |
|---|---|---|
Digit confusion | 5 read as 6, 1 as 7, especially in stamped or faxed text | Ask for every figure to be quoted with its surrounding sentence |
Column bleed | Two-column pages read across instead of down | Ask for the reading order, or crop columns to separate pages |
Table collapse | Row and column alignment lost, values attached to wrong headers | Ask it to reproduce the table as it appears, then check one row |
Handwriting | Confident invention on annotations and signatures | Ask explicitly whether each field is printed or handwritten |
Stamp and overlay | Text under a stamp dropped silently | Name the stamp in your prompt and ask what it obscures |
Missing page | An answer assembled from the pages that scanned | Ask it to list the page numbers it can see, first |
That last one is a good opening move on any scan: ask the model to list the page numbers it can read before you ask anything substantive. If page 7 came through blank, you want to know that now.
Numbers and dates get their own pass
Digit errors are the ones that cost money, and they do not announce themselves. Fluent text around a wrong number reads exactly like fluent text around a right one.
Treat any figure you intend to act on as unverified until you have looked at the pixels. A workable habit is to ask for figures in a list with their page and line context, then check only that list against the scan rather than rereading everything.
List every monetary amount and every date in this document, as a table with three columns: the value exactly as printed, the page number, and the full sentence it appears in.
Fifteen rows you can scan against the original beats a summary you have to trust. For the related problem on text-layer documents, where the failure is compression rather than recognition, see prompting AI to summarise a PDF accurately.
Frequently asked questions
Does the model run OCR on my scan?
Google's documentation describes native vision understanding of document context rather than a separate OCR step, and does not mention OCR. Practically it does not matter much: either way there is no exact text layer to fall back on, so the verification burden sits with your prompt.
Why does a scanned PDF cost more than a digital one?
Because the digital one has embedded text that is extracted and, on Gemini 3 models, not charged for. A scan is billed at the documented 258 tokens per page for the page image, with no free text path.
Can I just convert the scan to text first?
Often yes, and it is a reasonable move for long documents you will query repeatedly. You are then prompting against text, with the accuracy of whichever tool did the conversion baked in. Keep the scan to check against.
How do I stop it inventing clause numbers?
Give it a permitted output for failure. "Write [illegible] rather than inferring" and "say not in this document if it is absent" work because the model has something to say other than an answer. This is the same mechanism behind getting a model to flag what it is unsure about.
Is redacting a scan different from redacting a normal document?
Yes, and more dangerous, because a scan looks redacted when a black box is drawn over an image, while a text-layer PDF can keep the text underneath. The general rules are in how to prompt AI to redact a document properly, but never rely on a model to confirm a redaction held. The broader approach to this class of prompt is covered in our prompt engineering framework.
How did this land?
About the author

Developer Advocate
Steve builds something with Swarmz every week and writes up what worked, what broke, and what he'd do differently. Tutorials and hands-on guides are his lane.


