Convert a scanned PDF to Markdown for AI: cost and method
Cyrill Semah

A scanned PDF or a photo of a document is not text: it's an image. When you hand it to an AI as is, the model has to read it as vision, and that reading is expensive in tokens. Converting a scanned PDF to clean Markdown before you pass it to a model changes both the cost and the quality of the answer. Here's why, by how much, and how to do it properly, locally.
Why a scanned PDF is expensive for an AI
A scanned file has no selectable text: each page is an image made of pixels. To extract meaning, a multimodal model has to encode that image into vision tokens, and the count depends mostly on resolution. A dense page at high resolution can consume several times the tokens the same content would cost as plain text.
On top of that comes noise: margins, headers, watermarks, scanning artifacts. The model pays to read all of it, including everything that adds nothing to your question. The result is twofold: a higher bill, and sometimes a weaker answer, because the useful signal is buried.
How many tokens does converting a scan to text save?
Once a scan is turned into clean text, the same page is usually 2 to 7x lighter in tokens. The range is wide because the gain depends on the starting resolution, the page density and the OCR provider. A high-resolution scanned invoice saves a lot; a lightweight scan, a bit less.
That number is honest on one condition: it only holds for visual or noisy cases, meaning images, scans, heavy PDFs and web pages. An already-structured document, like a Word or Excel file with no images, does not benefit from this gain: its useful text weighs about the same once extracted. On those formats, the value is elsewhere, in normalization and a stable output, a topic we cover in our guide to preparing documents for a RAG pipeline.
Converting a scanned PDF to Markdown, step by step
The method is the same whatever the tool, but the goal is to produce clean, reusable text, not just a raw transcription.
- Drop the file. A scanned PDF, a photo, a screenshot. The format is detected automatically.
- Run OCR on the image. This is the step that turns pixels into text. It goes through an AI provider.
- Review the result. A preview of the original next to the Markdown lets you fix a misread line before export.
- Export to Markdown or JSON. Markdown for a prompt or a note, structured JSON for a pipeline.
With Sygal, everything except the OCR is local, and the built-in token counter shows the weight of the converted document, so you can see exactly what a model will read.
Which OCR provider should you pick for a scan?
Sygal works on a bring-your-own-key basis: you connect your own account with the provider of your choice, with your own API key, and there is no markup. The right pick depends mostly on volume.
- Mistral charges a flat price per page, with an even cheaper batch mode. It's often the most economical on large volumes of scans.
- OpenAI (the default) is billed per token by resolution. It works well for mixed, everyday documents.
- Claude is also billed per token and becomes the priciest at volume.
- NVIDIA NIM offers a free option to get started with no API budget, and Gemini is available too.
Because the key is yours, you pay the API at its real price and you can switch engines from one conversion to the next. OCR quality depends on the model you choose, not on Sygal, which simply relays your image and hands back the result.
How much does OCR cost for a 100-page PDF?
An order of magnitude helps you decide. Take a 100-page scanned PDF at standard resolution. With a flat per-page provider like Mistral, the cost is predictable: multiply the per-page rate by the page count, and batch mode lowers it further on large volumes. With a per-token provider like OpenAI or Claude, the cost depends on resolution: the larger the image, the more it consumes.
The point is not the exact amount, which varies with public pricing and page type, but the ratio. Once the scan is converted to clean text, every later question to the model is billed at the text rate, not the image rate. You pay for OCR once, then reuse the result at the cheapest rate, as many times as you need. That's where converting up front pays off: on a document you'll query several times, the gap widens with every prompt. For a precise estimate, use the public pricing of the provider you picked: since the key is yours, the listed price is what you pay, with no middleman.
Documents already in text: a different case
To avoid overselling, it's worth being clear: all this reasoning about tokens applies to images and scans. A PDF already in text, a Word file, a well-structured Excel sheet do not cost much more than their useful content. Converting them still helps, but not as a token saving: it gives you a clean, consistent output, the same across a whole corpus, ready to use directly in a pipeline. Local conversion of these formats relies on MarkItDown, Microsoft's open-source engine, which runs on your machine with no network call.
Putting it into practice
If you regularly prepare scans, invoices or reports for an AI, converting up front pays off on both fronts: fewer tokens on visual cases, and cleaner text, so sharper answers. You can test the method on your own files with the 14-day free trial, no card required, or automate batch processing from the command line with Sygal CLI.
Frequently asked questions
A scanned PDF is an image. To read it, a model has to process it as vision, billed in image tokens that scale with resolution, often several times the cost of the equivalent text. A PDF that already contains real text is read directly as text, far cheaper.
Try Sygal free for 14 days
Convert PDFs, images and Word docs into clean Markdown, locally on your Mac or PC. No cloud, no subscription.
Download SygalRelated articles

Converting confidential documents without the cloud: the 100% local method
Legal, accounting, healthcare: your documents shouldn't go to the cloud. Here's how to convert them to Markdown and JSON, 100% locally, and where the real limits are.
Read the article
Preparing your documents for a RAG pipeline: clean Markdown and JSON
A RAG pipeline is only as good as the documents you feed it. Here's how to normalize any format into usable Markdown and JSON, locally.
Read the article
Why we're starting a blog for Sygal
Sygal just went live, without a blog until now. Here's why we're opening one, and what you'll actually find here: real numbers, not generic tips.
Read the article