# How AI Reads a PDF: OCR, Document Parsing and Field Extraction

> Follow a digital and a scanned invoice through OCR, parsing rules vs AI extraction, and four checks that catch a misread total. Free 7-minute explainer.

Source: https://learn.ynteractive.com/content/how-ocr-and-document-parsing-work · Updated 2026-10-20 · Free from Stepthrough (https://learn.ynteractive.com)

## Practice it step by step

[Start the free practice](https://learn.ynteractive.com/modules/ocr-document-parsing-explained)

[Take the free module: why it matters, practice and a quick check →](https://learn.ynteractive.com/courses/ai-document-processing/2)

You do every step yourself in a practice copy of Stepthrough. It checks your work as you go, and “Do it for me” finishes any step you get stuck on. Free, about 7 minutes, and nothing touches your real accounts. [Open full screen](https://learn.ynteractive.com/modules/ocr-document-parsing-explained)

Free · Live now · [AI Basics](https://learn.ynteractive.com/content/course/ai-basics) · [Stepthrough](https://learn.ynteractive.com/content/tool/stepthrough) · ~7 min · 20 steps · Beginner

Updated October 20, 2026. Built against the tool’s current screens and checked step by step. [How we check this lesson](https://learn.ynteractive.com/content/about#how-we-check)

Docparser, Smallpdf, KDAN, [Foxit](https://learn.ynteractive.com/content/tool/foxit) and [n8n](https://learn.ynteractive.com/content/tool/n8n) [invoice](https://learn.ynteractive.com/content/glossary/invoice) workflows all read documents for you, and they all rely on the same three steps. In this free, hands-on explainer you help Kestrel Design Studio, a made-up eight-person design firm, with two [vendor invoices](https://learn.ynteractive.com/content/glossary/accounts-payable): a PDF from billing software and a phone scan. You see what [OCR](https://learn.ynteractive.com/content/glossary/ocr) does to the scan and the two mistakes it makes, compare parsing rules with AI extraction, and open the four checks that make extracted data safe to use.

## At a glance

| Question | Answer |
| --- | --- |
| What you build | Follow two vendor invoices, one digital and one scanned, through OCR, parsing rules vs AI extraction, and the four checks that stop a misread total from reaching your books. |
| Tools | Stepthrough |
| Time | About 7 minutes, 20 steps in 4 parts |
| Level | Beginner, no coding needed |
| Cost | Free |
| Ways to learn it | [Practice it step by step](https://learn.ynteractive.com/modules/ocr-document-parsing-explained) |

### The 4 parts, in short

1. Is there text in the file?: Open the digital PDF, Open the scanned PDF, OCR step 1: find the text, OCR step 2: recognize letters, and 2 more steps.
2. Parse the fields: Go to parsing, Method 1: rules, Method 2: AI extraction, Check the blank field.
3. Check before it counts: Go to the checks, Check 1: the math, Check 2: duplicates, Check 3: blanks, and 1 more step.
4. Cheat sheet: Open the cheat sheet, Read and summarize, Extract fields, Compare versions, and 1 more step.

**Start here first:** [Start Here: How Stepthrough Works](https://learn.ynteractive.com/content/how-stepthrough-works) (module 1 of AI Basics)

**Part of:** [AI for Finance Teams](https://learn.ynteractive.com/content/paths/ai-for-finance) (step 12 of 22). Next up: [AI Receipt Extractor: Receipts to Google Sheets with n8n](https://learn.ynteractive.com/content/ai-receipt-extractor-n8n-google-sheets)

**Part of:** [AI Back Office for Small Business](https://learn.ynteractive.com/content/paths/ai-back-office) (step 2 of 18). Next up: [AI Receipt Extractor: Receipts to Google Sheets with n8n](https://learn.ynteractive.com/content/ai-receipt-extractor-n8n-google-sheets)

**Part of:** [AI That Reads Your Documents](https://learn.ynteractive.com/content/paths/ai-document-processing) (step 1 of 9). Next up: [Smallpdf: Get the Key Points of a 25-Page PDF in 5 Minutes](https://learn.ynteractive.com/content/smallpdf-ai-pdf-summarizer-key-points-long-pdf)

## What you will do

You start by telling a digital PDF from a scanned one, then open the three steps of OCR: finding the text areas, recognizing each character with a confidence score, and producing searchable text. On the courier [receipt](https://learn.ynteractive.com/content/ai-receipt-extractor-n8n-google-sheets)'s OCR output you spot two errors: a zero read as the letter O, and a total with its comma and period swapped.

Next you parse an invoice two ways, with rules that read the text after a label and with AI extraction that asks for each field by name, and see why a missing due date is left blank instead of guessed. Then you open four checks (totals, duplicates, blanks and approval limits) and a cheat sheet that maps each document job to a tool.

## OCR, parsing and extraction in plain words

OCR, optical character recognition, turns a picture of a page into text. A PDF made by software already contains text and skips it; a scan or a photo needs it. The result is often a searchable PDF: the original image with invisible text laid over it.

Document parsing turns that text into named fields such as vendor, invoice number, date and total. Parsing rules work when a layout never changes. AI data extraction works across layouts, as long as it is told not to guess. Either way, simple checks catch the few mistakes that would otherwise cost money.

## Where document AI slips

OCR errors cluster on numbers, two-column layouts and tables, and blurry photos or stamps lower accuracy. AI summaries occasionally leave an item out of a list. That is why every step you automate should end with a check a person can see: totals that add up, no duplicate invoice numbers, a review list for blanks, and approval over a limit.

## How the interactive lesson works

Every step is shown first in the Watch panel, then you do it yourself in Your turn on an explainer board of diagrams and documents. Each click is checked, and Do it for me helps if you get stuck. There is no account and no real app: Kestrel Design Studio and its invoices are made up.

## Try it yourself, free

Reading the steps is a start. Doing them is how it sticks. The interactive module walks you through every click in a practice copy of Stepthrough, checks each step, and never touches your real accounts.

[Start “How AI Reads a PDF: OCR, Document Parsing and Field Extraction”](https://learn.ynteractive.com/modules/ocr-document-parsing-explained)

## Step by step: How AI Reads a PDF: OCR, Document Parsing and Field Extraction

All 20 steps of the interactive module, in order. In the module you watch each one, then do it yourself in a practice copy that checks your work.

### 1. Is there text in the file?

1. **Open the digital PDF.** Click the **Digital PDF** card.
   Sam runs the office at a small design studio, and about sixty vendor invoices arrive every month. This one came from billing software. The words are stored as text, so any AI tool can read it.
2. **Open the scanned PDF.** Click the **Scanned PDF** card.
   This one is a scan. It is a picture of a page, with no text inside. Before anything can read it, it needs OCR.
3. **OCR step 1: find the text.** Under **OCR**, click **Find**.
   OCR stands for optical character recognition. First it finds where the text sits on the page, and what order to read it in.
4. **OCR step 2: recognize letters.** Click **Recognize**.
   Then it turns each shape into a letter or number, with a confidence score. Blurry photos and stamps lower the score.
5. **OCR step 3: searchable text.** Click **Output**.
   The result is text you can search and copy. Often it sits invisibly over the original picture. That is a searchable PDF.
6. **Spot the OCR mistakes.** Click **Spot the OCR mistakes**.
   Here is what OCR read from the receipt. Look closely. A zero became the letter O, and the total swapped its comma and period. Numbers on scans are where small mistakes hide.

### 2. Parse the fields

7. **Go to parsing.** Click the **2 Find the fields** tab.
   Text is not data yet. Sam needs five fields from every invoice.
8. **Method 1: rules.** Click **Method 1: rules**.
   The first way is rules. The invoice number is whatever follows the words, invoice number. It is exact and cheap, when every invoice looks the same. Docparser works like this.
9. **Method 2: AI extraction.** Click **Method 2: AI extraction**.
   The second way is AI extraction. You ask a model for the fields by name, and it finds them in any layout. Flexible, but it has to be told not to guess.
10. **Check the blank field.** Click the **Due date** card.
    Here are the fields. The invoice has no due date, so the field is blank. That is correct. A blank you can see beats a guess you cannot.

### 3. Check before it counts

11. **Go to the checks.** Click the **3 Check before it counts** tab.
    Before a row lands in the bills sheet, it passes a few checks.
12. **Check 1: the math.** Click **Check 1**.
    Check one. Do the lines add up to the total? This would have caught the courier receipt.
13. **Check 2: duplicates.** Click **Check 2**.
    Check two. Have we seen this invoice number before? Vendors resend bills, and you do not want to pay twice.
14. **Check 3: blanks.** Click **Check 3**.
    Check three. Any blank required field goes to a short review list, not the sheet.
15. **Check 4: approval.** Click **Check 4**.
    And check four. Anything over the approval limit waits for the owner. Software reads the invoice. A person still decides to pay it.

### 4. Cheat sheet

16. **Open the cheat sheet.** Click the **4 Cheat sheet** tab.
    Last, which tool fits which job.
17. **Read and summarize.** Click **Read and summarize**.
    To read a long PDF fast, an AI PDF tool summarizes it and answers questions with the page number. Always click through to check.
18. **Extract fields.** Click **Extract fields**.
    To turn many documents into a spreadsheet, use rules when the layout never changes, and AI extraction when it does. Either way, add the checks.
19. **Compare versions.** Click **Compare versions**.
    To see what changed in a new version, a compare tool marks every change, so a quiet fee increase cannot hide.
20. **Fill and sign.** Click **Fill and sign**.
    And to close the loop, fill and sign tools let you sign a flat PDF without printing it.

## Frequently asked questions

**What is OCR?**

Optical character recognition: software that turns a picture of text, such as a scanned page or a phone photo, into real text you can search, copy and process.

**What is document parsing?**

Turning the text of a document into named fields, such as the vendor, invoice number, date and total on an invoice, so it can go into a spreadsheet or another system.

**Parsing rules or AI extraction: which is better?**

Rules are exact and cheap when every document from a sender looks the same. AI extraction handles varied layouts. Many teams use rules for their regular vendors and AI for the rest, with the same checks on both.

**Why does my scanned invoice come out with wrong numbers?**

OCR misreads shapes that look alike, such as 0 and O or 1 and l, and can swap number formats. Clear scans help, and a totals check catches most errors.

**Is this lesson free?**

Yes. [Stepthrough](https://learn.ynteractive.com/content/tool/stepthrough) is free, and this explainer needs no account and no setup.

[Start this module free](https://learn.ynteractive.com/modules/ocr-document-parsing-explained)

- Previous in AI Basics: [AI Support Bot Guardrails, Fallback Answers and Human Handoff](https://learn.ynteractive.com/content/ai-support-bot-guardrails-and-human-handoff)
- Next in AI Basics: [How AI Transcription Works: Speech-to-Text, Speaker Diarization and Themes](https://learn.ynteractive.com/content/how-ai-transcription-works)

## More in AI Basics

- [Start Here: How Stepthrough Works](https://learn.ynteractive.com/content/how-stepthrough-works): Try the practice in under two minutes: watch a step, click, type, get unstuck with Do it for me, and finish.
- [AI Agent vs Chatbot vs Automation: One Job Done Three Ways](https://learn.ynteractive.com/content/ai-agent-vs-chatbot-vs-automation): Chase six unpaid invoices three ways: a chatbot writes a template, an automation follows a rule, and an AI agent works out the steps and flags the tricky one.
- [What Is a Webhook? Send a Test and Watch the Data Arrive](https://learn.ynteractive.com/content/what-is-a-webhook): Point a plumber's website contact form at a free webhook tester, send a test and a real message, and watch the data arrive the moment it's sent.
- [Automation Basics: Triggers, Actions and Data Mapping](https://learn.ynteractive.com/content/automation-triggers-actions-mapping): Learn the three ideas behind every n8n workflow, Make scenario and Zap: a trigger starts it, actions do the jobs, and data mapping carries the details. Fix the classic…
- [When to Add AI to an Automation (n8n, Make or Zapier)](https://learn.ynteractive.com/content/when-to-add-ai-to-automation): Sort six office jobs into plain rules, AI steps and human decisions, then see the safe shape of an AI automation and how n8n, Make and Zapier each add the AI step.
- [Use AI at Work Without Leaking Client Data using ChatGPT](https://learn.ynteractive.com/content/safe-ai-at-work-what-not-to-paste): Turn off model training, strip a tenant's bank details and address out of a prompt, then catch the two promises ChatGPT made up before the reply goes out.

[All 18 modules in AI Basics](https://learn.ynteractive.com/content/course/ai-basics)

## More Stepthrough tutorials

- [How AI Answers from Your Documents: Retrieval (RAG) Explained](https://learn.ynteractive.com/content/how-ai-answers-from-your-documents): Follow one customer question through a support bot: files cut into chunks, a search by meaning, the AI told to answer only from what it found, and a safe fallback when…

## Terms in this lesson

Plain-English definitions, each with an example from a free lesson.

[Data extraction](https://learn.ynteractive.com/content/glossary/data-extraction) · [Document parsing](https://learn.ynteractive.com/content/glossary/document-parsing) · [OCR (optical character recognition)](https://learn.ynteractive.com/content/glossary/ocr) · [Parsing rules](https://learn.ynteractive.com/content/glossary/parsing-rules) · [Searchable PDF](https://learn.ynteractive.com/content/glossary/searchable-pdf) · [Invoice](https://learn.ynteractive.com/content/glossary/invoice)

[The full AI glossary](https://learn.ynteractive.com/content/glossary)

## Browse related tutorials

[AI Basics (18)](https://learn.ynteractive.com/content/course/ai-basics) · [Stepthrough tutorials (5)](https://learn.ynteractive.com/content/tool/stepthrough)
