PDF OCR That Keeps the Math: Scanned PDFs to Editable Markdown
August 9, 2026 · Oyren AI Team
PDF OCR That Keeps the Math: Scanned PDFs to Editable Markdown
You have a scanned PDF — a lecture handout, a photographed contract, a paper older than the internet — and you need it as text you can search, edit and quote. Most converters hand back either nothing or word soup. This post is about why that happens, and what it takes to convert a scanned PDF to Markdown with the math, the tables and the layout still intact.
The text layer is not the page
Most "PDF to text" tools never look at the page. They scrape the text layer — invisible characters embedded when a PDF is born digital. We ship a free in-browser converter that does exactly this, and its limits page says it plainly: this reads text, it does not read documents.
- Formulas come out as scrambled characters. Equations are drawn glyph by glyph; the text layer has the characters but not the structure, so they arrive out of order.
- Tables lose their grid. Cells are just positioned text — you get the words with none of the rows and columns they belonged to.
- Images and charts are skipped. Anything drawn rather than typed has no text layer at all.
- Scans produce nothing. A photographed or scanned page is one big image. There is no text to extract.
OCR reads the page instead
Oyren's Datalab-powered OCR treats every page as a picture of a document and writes it back out as real text. A scan, a photographed handout, a slide export — maths, tables and multi-column layouts survive the pass, and the PDF turns editable in the same pass.
Concretely, converting a scanned PDF to Markdown in Oyren means:
- Formulas preserved as LaTeX you can edit. Limits above and below a Σ, fractions, superscripts, roots — the four things a scan usually flattens into nonsense come through as structure.
- Tables rebuilt as Markdown grids. Rows and columns, not a paragraph of cell contents.
- Diagrams and charts described in place. Drawn content gets a written description where it sits, so nothing silently disappears.
- Scanned pages read like any other page. The one case the text layer can never help with is the one OCR exists for.
The demo on our landing page runs this on a real example — a scanned lecture handout with the attention-weights equation on it. The equation arrives as LaTeX source you can open and change:
$$\alpha_{ij}=\frac{e^{q_i^{T}k_j/\sqrt{d_k}}}{\sum_{l=1}^{n} e^{q_i^{T}k_l/\sqrt{d_k}}}$$
Click a block and edit it in place
The output is not a wall of text. Each paragraph, equation and table lands as a block: click one to edit it where it sits, cut or merge pages, or send the lot to a note that reads properly on any device. OCR to Markdown is the start of the workflow, not the end of it.
What a page costs
OCR in Oyren is metered, and the meter is public: $0.0075 a page — 75 credits at 10,000 credits to the dollar. An 18-page lecture handout costs $0.14. A 300-page book costs $2.25. There is no subscription in front of it; you top up credits from $5 and they never expire.
When the free tool is enough
If your PDF is born digital and you only need its text, skip OCR entirely. Our free PDF to Markdown converter runs in your browser tab — no account, no upload, the file never leaves your machine. It reads the text layer honestly and tells you when a file needs more than that, instead of returning an empty page.
What a readable document unlocks
Once a scanned PDF is clean Markdown, the rest of the workspace can use it. Ask a question and get an answer grounded in the exact page it came from. Pull the numbers into a note that does the math as you type. Search across every converted file at once, or serve the lot to Claude over MCP and let an agent do the reading.
That last part is the point of doing OCR properly. An agent working over your files is only as good as what it can read — a table it can parse is evidence, a table flattened into word soup is noise. The conversion is what turns a pile of scans into something people and agents can both reason over.
Honest limits
- Rough handwriting is still hard. Print, slides and typeset math convert well; a hurried whiteboard photo may not.
- OCR is the paid path. The text-layer tool is free; reading the page costs the $0.0075 above. For a clean digital PDF, the free tool is the right call.
- Big archives deserve arithmetic. $0.0075 a page is $75 for ten thousand pages. The meter is linear — do the multiplication before batch-converting a library.
Try it on one document
The pitch is the same one our landing page makes: bring one document and judge the OCR on that. Upload a scanned PDF, watch it become editable Markdown blocks with the math intact, and ask it your first question. Get started at oyren.ai/workspaces.