Skip to content
FreeToolsKit.app

Documents & PDFs guide

How to Extract Text from a Scanned PDF and Check the Result

7 min read · Updated 20 November 2026 · Uses Extract Text from PDF

Quick answer

Use a text extractor that can read a PDF's existing text and also run OCR (optical character recognition), which recognises letters in a page image. Then compare the details you'll rely on, such as names, dates and amounts, with the original page before you use the text.

In FreeToolsKit's Extract Text from PDF tool:

  1. Add the PDF.
  2. Keep Automatic (recommended) selected and choose Extract text.
  3. Each page is labelled with the method used: Existing PDF text or OCR recognition. A scan that already has a hidden text layer shows Existing PDF text.

How Automatic decides. It checks each page for existing text first:

  • Existing text found: if the page has at least three letters or digits of existing text, the tool uses that text.
  • No usable text: otherwise, it tries OCR.

An image-only scan has no stored text, so it goes to OCR. Some scans already carry a hidden text layer from earlier OCR. If that layer is usable, Automatic reads it instead of running OCR again.

You get plain text, which you can copy or download as a .txt file. You don't get a searchable copy of the PDF.

The test file used in this guide

To show what to check, this guide uses a two-page sample PDF made for the test. Both pages are short payment notes with fictional details:

  • Page 1, a digital page with selectable text: the name Daniel O'Connell, the date 14 March 2026 and the amount $1,086.50.
  • Page 2, a simulated scan: the page is only an image, with no text stored in it. It shows the name Grace Whitfield, the date 2 September 2025 and the amount $947.25.

You can tell the two kinds of page apart before you start. On a scanned page, the content is "images, not searchable text", so you can't select or search its words (W3C technique PDF7). In your PDF viewer, try selecting a line or searching for a word you can see. If nothing highlights, that page needs OCR.

Extract Text from PDFFree to use · No account required · Files processed locallyOpen Extract Text from PDF

Extract the text

  1. Under Choose a PDF to read, add your file. The tool shows its name, size, page count and a preview.
  2. Under Pages, keep All pages, or choose Selected pages and type a Page range such as 1, 3, 5-8.
  3. Under Extraction mode, keep Automatic (recommended). It uses a page's existing text when there is enough of it, as described in the quick answer, and tries OCR on the other pages.
  4. Check Recognition language. English is currently the only option.
  5. Choose Extract text and wait for Extraction complete. The first OCR run takes longer, because the tool downloads its OCR engine and English language data from FreeToolsKit.
  6. Read each page's text, then use Copy this page, Copy all text or Download text (.txt).

The tool's limits, as they apply to each run:

  • PDF size: one unencrypted PDF of up to 50 pages and 25 MiB.
  • OCR pages: Automatic and OCR modes can process up to 20 selected pages per run.
  • Text-only extraction: Extract existing text only can read all 50.

For a longer scanned document, run it in batches with the page range:

  1. Choose Selected pages, type 1-20 in Page range and choose Extract text.
  2. Choose Download text (.txt) and save the file with its page range in the name, such as report-pages-1-20.txt, so you can identify it later.
  3. Download or copy each batch before you change the page range. Changing the page range or the extraction mode clears the results on screen.
  4. Then type the next range, such as 21-40, and repeat.

If the PDF has more than 50 pages, split it first with Split PDF. If your scan is a photo rather than a PDF, combine the images into one with JPG to PDF.

What the test produced

In Automatic mode, the summary read "2 pages processed · 1 existing text · 1 OCR". The OCR page also showed "Engine confidence estimate: 95% (not a measure of accuracy)". Every checked value matched the original.

Page 1: Existing PDF text

  • Name: original Daniel O'Connell, extracted Daniel O'Connell. Match.
  • Date: original 14 March 2026, extracted 14 March 2026. Match.
  • Amount: original $1,086.50, extracted $1,086.50. Match.

Page 2: OCR recognition

  • Name: original Grace Whitfield, extracted Grace Whitfield. Match.
  • Date: original 2 September 2025, extracted 2 September 2025. Match.
  • Amount: original $947.25, extracted $947.25. Match.

The downloaded file was named payment-notes-sample-extracted-text.txt. It contained both pages, each under a line such as --- Page 2 (OCR) ---, with the same values. The OCR page's text had a blank line between each line of the note. The text-layer page didn't.

For comparison, page 1 was then run on its own with OCR all selected pages. OCR also reproduced Daniel O'Connell, 14 March 2026 and $1,086.50 exactly. The only differences were blank lines between some lines.

This was one clean, high-contrast test file, so it shows what to check, not how accurate OCR is in general. Your scans can turn out differently.

Check the result against the original

Put the extracted text next to the page and compare the details you'll rely on, character by character:

  • Names: check the spelling, apostrophes and hyphens.
  • Dates: check the day, the month and every digit of the year.
  • Amounts: check every digit, the currency symbol and the decimal separator. A comma read as a full stop changes the value.
  • Look-alike characters: check letters and digits that look alike, such as 0 and O, or rn and m. The documentation for Tesseract, the OCR engine this tool uses, notes that rn "may sometimes be recognized incorrectly as m" (Tesseract training documentation).

Don't treat the confidence estimate as a check. The tool labels it "not a measure of accuracy", and a high estimate doesn't confirm that a particular name or amount is right.

Scan quality matters most. Tesseract "works best on images which have a DPI of at least 300 dpi". It also does better when pages are straight and have a clean border (Tesseract: Improving the quality of the output). This tool renders each page at about 200 DPI for OCR, so a sharp, straight, high-contrast original helps.

Expect layout to change. Multi-column pages, tables and sidebars come out as plain lines, and their reading order isn't rebuilt. OCR engines can fail to recognise two columns and join text across them (OCRmyPDF: Introduction). Check tables cell by cell.

When Automatic is enough, and when to rerun with OCR

Automatic is enough for most files: digital pages are read from their text, and image-only scans go to OCR. Existing text is usually the more faithful source, although spacing and line breaks can differ from the page.

The case to watch is a scan that already has a hidden text layer from earlier OCR. Automatic reads that layer and labels the page Existing PDF text, even though the page looks like a scan. If the layer is incomplete or wrong, so is the extracted text.

Rerun a page with OCR when its text looks wrong:

  • Missing text: words you can see on the page are missing from the extracted text.
  • Garbled characters: the text is garbled, which can happen when a PDF's text layer is broken.
  • A partial hidden layer: a scan with a small hidden text layer can be read from that layer and come out incomplete.

To rerun only the problem page:

  1. Copy or download the current results first. The next two steps clear the results on screen.
  2. Choose Selected pages and type the page number in Page range.
  3. Under Extraction mode, choose OCR all selected pages.
  4. Choose Extract text and compare the new text with the original page.

Plain text or a searchable PDF?

This tool gives you plain text to copy, edit or paste elsewhere. It doesn't change your PDF.

If you need to keep the original-looking PDF and search inside it, you need a searchable PDF instead. Software such as OCRmyPDF creates one by running OCR on the page image and adding an OCR "layer" to the PDF (OCRmyPDF: Introduction).

A searchable PDF still shows the scanned image, so mistakes in the hidden text don't show on screen. Because OCR "is not perfect", that text "may not fully match" what the page shows (Section508.gov: Converting scanned documents). Check the details either way.

Before you use the text

  1. Completeness: each page's text includes everything you can see on the original page. The label only tells you which method was used. In this guide's sample, page 1 showed Existing PDF text and page 2 showed OCR recognition. A scan with a hidden text layer can also show Existing PDF text, so judge the text against the page, not the label.
  2. Key details: each name, date and amount matches the original page exactly, including decimal separators.
  3. Problem pages: any page that looks incomplete or garbled has been rerun with OCR all selected pages.
  4. Keep the original: you still have the original PDF, in case a value needs checking later.