Here is the disappointment most people meet the first time they OCR a nicely formatted document: the words come back fine, but the document does not. The bold heading is now the same plain text as everything else. The italic book title lost its italics. The three font sizes collapsed into one. Nothing is wrong with the recognition — the characters are right. What disappeared is the formatting.
This guide is honest about why that happens, what can genuinely be kept, and which workarounds actually help in practice.
Why OCR throws formatting away
A printed page carries two kinds of information: the characters, and how they are presented — size, weight, font, spacing, position. OCR was originally built to recover only the first kind. Standard OCR output is a plain text stream: characters in reading order, with line breaks. There is nowhere in a plain text file to record "this line was 18pt bold" or "this word was italic," so that information is discarded by design, not by accident.
There is a second, quieter problem. Even if the output format could store formatting, the engine has to guess it from pixels. A bold letter and a regular letter are just two slightly different shapes. Modern engines can estimate stroke thickness and slant reasonably well, but they are inferring typography, not reading it. The original file knew the font exactly; the OCR engine only sees a photograph of it.
What can realistically be preserved
| Formatting element | Can OCR keep it? | Notes |
|---|---|---|
| Paragraphs and line breaks | Usually yes | Line and paragraph structure survives in most engines. |
| Headings vs body text | Approximately | Inferred from relative size and spacing, not guaranteed. Short headings in body-size text are often missed. |
| Bold text | Sometimes | Engines estimate stroke width. Light-bold and semibold fonts are frequently read as regular. |
| Italics | Sometimes | Slant is detectable, but slanted display fonts confuse it, and true italics in serif fonts read better than oblique sans fonts. |
| Exact font family | Effectively no | An engine may guess "looks like a serif font." It will not reliably name the font, and it cannot restore it. |
| Exact point size | No, only relative size | "Bigger than the body text" survives; "14pt" does not, because size in a scan depends on scan resolution. |
| Colour | Rarely | Most pipelines convert to greyscale or black-and-white early, discarding colour before recognition starts. |
| Tables and columns | Partially | Structure may survive as spacing in a DOCX export, or collapse entirely in plain text. Expect to check it. |
The pattern to notice: structure survives better than appearance. What the text is (a heading, a list, a table) has a chance. What it looked like (this exact font, this exact size, this colour) mostly does not.
Workaround 1: export to DOCX instead of plain text
If you plan to reformat the document anyway, a Word export is the most practical route. When you run an image through PictureText, the result can be downloaded as .docx as well as .txt. A DOCX file gives you a proper document to work in: you can apply Word's heading styles, re-bold the lines that are obviously headings, and use Find and Replace to clean up systematic errors across the whole document at once. This is still manual work, but it is ten minutes of tidying instead of retyping the document from scratch.
Workaround 2: use size differences as your heading detector
After extraction, headings are usually identifiable by content even when size data is gone: they are short, they have no full stop, they often use title case, and they sit between blank lines. A quick pass through the document with a finger on the Heading style shortcut formats a typical report faster than any automated method. For long documents, extract one section at a time — cropping a page by section keeps headings visually obvious because you still have the original image beside you while you format.
Workaround 3: know when not to use OCR at all
If your source is a PDF that was created digitally — exported from Word, InDesign, or a web page — the text and its formatting already exist inside the file. Opening it and copying the text, or converting it with a PDF tool, preserves fonts and layout far better than OCR ever will, because nothing is being guessed. OCR is for when the text only exists as pixels: scans, photos, screenshots, and image-only PDFs. Using it on a born-digital PDF is re-photographing a document you already own.
For scans you intend to archive or publish formally, dedicated desktop OCR software with structured export formats (such as hOCR or ALTO XML, which store word positions and some style data) can retain more metadata than web tools. That is a specialist workflow — worth it for a library digitisation project, overkill for getting a contract into Word.
Mistakes that destroy formatting before OCR even starts
- Saving the scan as a heavily compressed JPG. Compression artefacts thicken and thin letter strokes randomly, which wrecks the stroke-width estimates bold detection relies on. Scan to PNG or TIFF, at 300 DPI for print documents.
- Downscaling the image first. Shrinking a page makes heading and body sizes converge. Keep the original resolution.
- Photographing instead of scanning. Perspective makes text at the top of the page smaller than text at the bottom, so relative size stops meaning anything. If you must use a phone, hold it flat and parallel to the page.
- Expecting the engine to fix a bad layout. If the reading order comes out scrambled on a multi-column page, that is a layout problem, not a formatting problem — the fixes are different, and they start with cropping columns separately.
The realistic expectation
Plan on this: OCR will give you accurate words and rough structure. Headings and bold will survive sometimes, inexactly. Fonts, exact sizes, and colour will not survive at all. If the document's appearance genuinely matters — a contract, a formatted report — budget a short reformatting pass in Word after extraction, using the original as your visual reference. Anyone promising one-click extraction that keeps every detail of a styled document intact is describing their marketing, not their software. Get the text out first with a free image to text converter, then spend your effort on the formatting pass where human judgement actually makes the difference. When the problem is not formatting but gibberish output, start with our OCR not working checklist instead.