Schema LawSign in with Google

OCR Low Resolution Scan Files: When Pixels Run Out

By Schema LawPublished Updated

You can OCR a low resolution scan, but the text is only as good as the number of pixels each letter received. Measure the file's real resolution before you convert it. If it sits far below 300 pixels per inch, chase a fuller copy first, because enlarging the image adds size and no detail.

How many pixels does a letter need before OCR can read it?

No single pixel count applies to every OCR engine, but the useful measure is the height of a capital letter in pixels, not the size of the page. The familiar advice to scan at 300 dpi works out to roughly 30 pixels for a capital in 12 point type. Each step below that leaves less to tell similar letters apart.

That figure is a yardstick to test against your own tool, and not a specification. Each engine has its own tolerance. The open-source Tesseract project publishes guidance for its own: its page on improving the quality of OCR output recommends images of at least 300 dpi and points to a test of the best height for a capital letter in pixels. That is the right way to think about it. Dots per inch only matters because of what it does to each character.

Turning type size into pixels

A point is 1/72 of an inch. The capitals in most text faces stand about two thirds of the nominal point size, so a capital in 12 point type is roughly 0.11 inch tall. Multiply by the pixels per inch of the image and you have the letter's height on screen.

Type on the paperAt 300 ppiAt 200 ppiAt 150 ppiAt 100 ppiAt 72 ppi
12 point body text33 px22 px17 px11 px8 px
10 point body text28 px19 px14 px9 px7 px
8 point footnotes22 px15 px11 px7 px5 px
6 point fine print17 px11 px8 px6 px4 px

Read the table by row. A 12 point letter at 150 ppi and a 6 point clause at 300 ppi are the same problem, because both leave a 17 pixel capital. A typeface with unusually short or tall capitals shifts every figure a little.

Why the count matters

The difference between two letters is much smaller than the letters. What separates "c" from "e" is one thin bar. What separates "3" from "8" is two small gaps on the left side. In a letter eight pixels tall, that bar or gap is a single pixel, and one pixel of blur or one wrong black-or-white decision removes it. The software then picks whichever shape is nearest, and it prints the wrong letter as crisply as a right one.

The post on the best DPI for OCR explains what resolution means on a sheet of paper and how much is enough when you control the scanner. The rest of this post is about files where you did not.

How do you find the real resolution of a PDF you were sent?

The real resolution of a scanned PDF is the pixel width of the page image divided by the width of the paper in inches. Ignore any figure the sender quoted and any number in the file name. Pull the pixel dimensions from the file and do the division yourself.

Three ways to get the pixel count

  1. List the images inside the PDF. The free Poppler tools include a command, pdfimages -list file.pdf, that prints one row per embedded image. The pdfimages manual page describes the columns, which include the width and height in pixels and x-ppi and y-ppi, the horizontal and vertical resolution of the image as it is rendered on the PDF page. This is the quickest method and it covers every page at once.
  2. Save one page as an image and read its properties. Many PDF programs can export or extract a page image. Open the saved file's properties and note the dimensions. Be sure you extracted the embedded image and did not render the page at a size you chose, because a rendering reports whatever size you asked for.
  3. Zoom until you see the pixels. At 400% a low resolution page shows stair-stepped diagonals on "A", "V" and "W" and blocky curves on "S". It gives no number, but it takes five seconds and tells you whether to bother measuring.

A worked example

A paralegal for the fictional firm of Okafor and Lindqvist receives a 40-page loan file by email. The listing shows each page image is 1,275 pixels wide and 1,650 high. Letter paper is 8.5 inches wide, so 1,275 divided by 8.5 gives 150 pixels per inch. At that resolution the 12 point body text has capitals about 17 pixels tall, which is workable with proofreading. The 6 point disclosure on page 31 has capitals 8 pixels tall. She converts the file for searching and asks the lender for a full-size copy of page 31.

Page 31 in that loan file is often a consumer lending disclosure in tiny type. You read any usury or rate figure from the image, and you check the electronic funds transfer terms if they sit in the same small block. Body text above them can look perfect while that block is wrong.

Four ways the number misleads

  • A resolution tag is only a label. An image file can carry a tag that says 300 dpi while holding 850 pixels across a letter page. Count pixels and divide by inches of paper.
  • An enlarged file measures well and reads badly. If someone stretched a 100 ppi image to 300 ppi, the listing says 300 and the letters are soft blurs. Confirm with the zoom test.
  • The image may not fill the page. A scan that was shrunk to fit inside margins, or two original pages placed on one sheet, has fewer pixels per inch of original paper than the page size suggests.
  • Pages differ. A file assembled from several sources holds several resolutions. Check the listing row by row and note the pages that fall short.

Why emailed and portal-downloaded PDFs lose resolution

Emailed and portal-downloaded PDFs lose resolution because software between the scanner and you made the file smaller. It either discarded pixels, which is downsampling, or squeezed the pixels that remained, which is lossy compression. Each step was meant to save space, and nobody chose it with character recognition in mind.

Where the pixels go

Step in the file's travelsWhat it does to the image
Copier set to a "compact" or "email" presetScans at a low resolution to begin with, often in pure black and white
"Reduce file size" or "optimize" in a PDF programResamples every page image to a lower pixel count and compresses it harder
Mail program offering to shrink attachmentsResizes images before sending
Portal or records system showing a previewBuilds a lighter rendering for the screen, and "download" may hand you that rendering
Printing a viewer window to PDFCaptures the page at screen or print-driver resolution, not the stored one
Screenshot of a pageCaptures only the pixels your monitor displayed at that zoom
Messaging apps and text messagesRecompress photographs heavily

Downsampling and compression damage letters in different ways. A downsampled page has clean, blocky letters with too few pixels. A heavily compressed page keeps its pixel count, and the pdfimages listing still shows a respectable figure, but each letter is ringed with gray smudges and thin strokes have dissolved. Either one makes for wrong characters. Only the first shows up in the resolution number, which is why the zoom test belongs beside the arithmetic.

Asking for the file that still has its pixels

The fuller copy usually exists. Somebody scanned the paper once, and that first file is sitting on a copier, a shared drive or a records system. Ask for it in terms that leave no room for another round of shrinking:

  • "Please send the original scan file, not a reduced or optimized copy."
  • "If it is too large to email, a download link is fine."
  • "Please use the portal's option to download the original document, not the preview or a printed copy."
  • "If you are rescanning, 300 dpi in grayscale is what we need."

Scanner settings belong to the guide on scanner settings that make OCR work, so they are not set out again here.

A full-size file is a bigger file. Schema Law accepts PDF, PNG and JPEG uploads of up to 20 MB, and the plans limit the pages in one document, as the pricing page shows. If the good copy is over the limit, split it into parts. Do not shrink it back down to fit.

Does enlarging a low-resolution image help recognition?

Enlarging a low-resolution image does not restore detail the scan never captured, so it cannot make an unreadable letter readable. It can sometimes help an engine that expects letters of a certain size, by bringing small but intact characters into that range. Treat it as an experiment on a copy, never as a repair.

The distinction matters. Plain resizing spreads the existing pixels over a larger grid and smooths between them. A letter whose shape survived the scan comes out larger and still correct in outline. A letter whose crossbar was lost comes out as a larger letter with no crossbar. The Tesseract documentation says only that it "may be beneficial to resize images", which is a statement about what that engine expects and no promise about lost content.

Enhancement that draws new strokes

Some image tools go further than resizing. Features sold as "enhance" or "super resolution" generate fine detail that looks plausible for the kind of picture they are given. On a holiday photograph that is harmless. On a faxed account number it means the tool may draw a confident "8" where the paper said "3". Keep such tools away from any page whose characters you intend to rely on. If you clean or enlarge a working copy by any method, keep the file you received untouched and note that the working copy was altered.

A fair test in ten minutes

  1. Pick one representative bad page and write down ten items you can read from the image with certainty: three amounts, three dates, two names and two reference numbers.
  2. Convert the page as it arrived and score how many of the ten came out right.
  3. Make a copy enlarged to twice the size with ordinary resizing, convert that, and score it against the same ten.
  4. If the score did not rise, stop. If it rose, you have learned something about that tool and that kind of page, and you still proofread.

Schema Law's free plan takes one document a day of up to three pages, which is enough to run this comparison on your own file. Nothing in the product marks a passage as uncertain, so the scoring against the image is the whole test.

Fine print, footnotes and small type on a coarse scan

Small type is the first thing a coarse scan loses. The same page can return a clean body paragraph and a wrong footnote, because the footnote's letters hold half as many pixels. Judge each page by the smallest type on it that you need, and proofread that type separately.

A common mistake is to read the first paragraph of the output, find it correct, and trust everything else on the page. Body text is the easy part. The arithmetic shows why: at 150 ppi, 12 point capitals are about 17 pixels tall and 6 point capitals about 8.

  • Footnotes in briefs, opinions and expert reports
  • Terms and conditions printed on the reverse of an invoice or purchase order
  • Disclosures in loan, credit card and insurance documents
  • Rate tables, fee schedules and the column heads above them
  • Superscript footnote markers and ordinals such as the "th" in a date
  • Recording stamps, filing stamps and the line of print across the top of a fax
  • Captions under signature lines and the labels inside form boxes

Superscripts deserve a second look. A footnote marker at half the size of the body text may vanish, which hides the fact that a footnote exists, or it may attach itself to the word before it and turn "damages" followed by a marker into "damages3". When the marker was a digit beside a figure, the amount itself changes. The post on why OCR gets numbers wrong covers how to catch that.

What to do with a page of small type

  1. Mark the zone. On your page list, write which part of the page is small type: "p. 31, lower half, 6 point disclosure".
  2. Decide whether you need it. Boilerplate you will never cite only has to be roughly searchable. A late-fee clause you will quote has to be exact.
  3. Ask for that page alone. A request for one named page at full resolution is easier to grant than a request to redo a whole file. The section on whether to rescan or OCR what you have sets out when a second scan is worth the trouble.
  4. Type what you must quote. For a short clause on a page with no better copy, read it from the image at high zoom and type it. Put "[illegible]" where you cannot read a word, and do not fill the gap with what the clause probably said.

Standard and fine fax modes as a low-resolution case

A fax is a low-resolution scan with known numbers. Standard mode records about 204 dots per inch across the page and only about 98 lines per inch down it. Fine mode doubles the lines. Low resolution fax OCR therefore depends first on which mode the sender's machine used.

The figures come from ITU-T Recommendation T.4, the standard for Group 3 fax machines. It specifies 1,728 picture elements along a 215 millimeter scan line, a standard vertical resolution of 3.85 lines per millimeter, and optional higher resolutions of 7.7 and 15.4 lines per millimeter. It also treats 7.7 lines per millimeter and 200 lines per inch as equivalent.

ModeLines per inch down the pageRows in a 12 point capitalRows in an 8 point capital
Standard (3.85 lines per mm)About 98About 11About 7
Fine (7.7 lines per mm)About 196About 22About 14
Optional 15.4 lines per mmAbout 391About 43About 29

The pixels are not square

In standard mode a letter gets twice as many dots across as rows down, so the horizontal strokes are the ones that suffer: the bar of "e", the top of "5", the middle of "8", the loop that separates "6" from "0". Vertical strokes survive, so "l", "1" and "I" arrive intact and identical to one another. The guide to faxed documents covers the rest of why faxes are hard for OCR.

You can tell the mode from the file. In the pdfimages listing, a standard-mode fax that was saved as received shows an x-ppi of about 200 and a y-ppi of about half that. Two matching figures near 200 point to fine mode. If both figures are equal and the letters look stretched or squashed, some program resampled the fax on the way to you, and you are one step further from the original.

What follows from the mode

  • Standard mode, 12 point typed letter. Eleven rows per capital is about a third of what a 300 dpi scan gives. Expect searchable text with errors in digits and names.
  • Standard mode, anything smaller. Forms, statements and footnotes at seven rows per capital leave almost nothing to tell an "e" from a "c". Ask for a resend in fine mode or a scan by email.
  • Fine mode. Body text is at the level of a 200 ppi scan. Small type still needs checking.
  • A printed fax that was scanned again. The second scan has plenty of pixels, and they describe the first fax's coarse letters. The resolution figure will mislead you here more than anywhere.

Resolution is only part of what makes a fax hard. The header line, streaks from a dirty sending machine and the order in which to proofread fax characters are covered in the guide on how to OCR a faxed document.

All posts in Difficult scans