---
title: "Extract Data from PDF: Automated and AI Methods Compared"
description: "Extract data from PDF files at volume: compare 5 methods, see how automated and AI PDF data extraction work, and handle scans and forms."
url: https://www.docsumo.com/blog/extract-data-from-pdf
updated: 2026-10-15
---

# How to extract data from PDF files: 5 methods, from copy-paste to automated AI extraction

For operations and data teams that get invoices, statements and forms as PDFs every day. See the 5 ways to get the data out, which one fits your volume, and the checks that keep the numbers right.

[Amit Timalsina](https://www.docsumo.com/blog-authors/amit-timalsina) · Updated Oct 15, 2026 · 10 min read

![A PDF file passing through gears and coming out as JSON, XLSX and CSV files](https://www.docsumo.com/blog/images/extract-data-from-pdf-hero.webp)

## Key takeaways

- A PDF stores **characters and where they sit on the page, not fields**. Software has to work out which number is the account number and which is the amount due.
- The 5 methods are **manual entry, PDF converters, table extraction tools, rule-based templates and AI extraction**. Your volume and the number of layouts decide which one fits.
- **Scanned PDFs** need OCR (optical character recognition) before any extraction, because each page is only a picture. A **fillable PDF form** is the easy case, since each answer sits in a named field.
- **Excel for Microsoft 365 on Windows** imports tables from a PDF (Data > Get Data > From File > From PDF). Google Sheets can't open PDFs, so get the tables into Excel or CSV first.
- **Automated PDF data extraction** has to check its own output. Totals should add up. The software scores how sure it is of each value, and values with a low confidence score should go to a person.

You can **extract data from a PDF** by hand, with a converter or table tool, with templates, or with AI. Hand-copying or converting is fine for a few files. Invoices, statements and forms that arrive every day in many layouts need automated AI extraction with checks.

**Account**

| Field | Extracted value |
| --- | --- |
| Provider | Riverbend Electric & Gas |
| Customer name | Maple Court Apartments LLC |
| Account number | 3108-5572-40 |
| Service address | 2150 Maple Ct, Columbus, OH 43215 |
| Billing period | 2026-08-05 → 2026-09-03 |
| Issue and due date | 2026-09-08 · 2026-09-29 |

**Charges**

| Field | Extracted value |
| --- | --- |
| Previous balance | 1,742.30 |
| Payment received | −1,742.30 |
| Charges before tax | 1,719.86 |
| Taxes and fees | 98.89 |
| Current charges | 1,818.75 |
| Total amount due | 1,818.75 |

**Usage by meter**

| Field | Extracted value |
| --- | --- |
| E-5520871 · electric | 9,420 kWh · 38.6 kW demand |
| E-5520904 · electric | 1,080 kWh |
| G-3317265 · gas | 194 CCF |
| Reads · E-5520871 | 48,210 → 57,630 |
| Tariff · E-5520871 | GS-2 General Service |
| Supply rate · E-5520871 | $0.0912 / kWh |

*A commercial utility bill read into named fields, with a usage row for each meter. Charges before tax plus taxes and fees equal the $1,818.75 due.*

## Why PDF data extraction is hard

PDF was built to make a page look the same everywhere, not to make its data reusable. It stores characters and their positions on the page. Nothing in the file says "this is the amount due".

### Layouts vary

Every vendor and bank lays out its documents differently.

### Scans have no text

A scanned PDF is a picture of the page. Nothing can be copied until OCR reads it.

### Structure is complex

Pages have several columns, nested tables, and tables that continue onto the next page.

### Volume breaks manual fixes

A process that works for 10 files a week breaks at 10,000.

A basic PDF parser returns the page's text in rough reading order, with nothing to say which value is which. Two more steps fix that. Layout analysis finds the parts of the page, such as the header, tables and totals. Extraction then puts a name on every value, such as "amount due". The result is structured data.

*OCR returns the characters, layout analysis finds the header, table and totals in reading order, and extraction names each value and checks that line items plus tax equal the total.*

## First, check what kind of PDF you have

Try selecting the text in a PDF viewer. What happens tells you the first step.

| PDF type | How to tell | First step |
| --- | --- | --- |
| Text-based (native) | Text selects and copies cleanly | Copy the text stored in the file (its text layer); no OCR needed |
| Scanned | Nothing selects: the page is an image | Straighten and clean the page, then run OCR |
| Searchable scan | Text selects, but may copy with errors | Use the text layer; run OCR again where it's wrong |
| Fillable form | Fields you can click and type in | Read the field values directly (see PDF forms below) |

To make a scanned PDF searchable, or to turn it into an editable Word file, a desktop OCR app is enough. See [the best OCR software](https://www.docsumo.com/blog/the-best-ocr-software-comparison). Docsumo isn't a desktop tool for editing PDFs or making searchable files. It's an intelligent document processing (IDP) platform that extracts and checks the data in your PDFs. It reads forms and can fill them out too.

> **Docsumo for this**: [Document extraction API](https://www.docsumo.com/solutions/document-extraction-api)
>
> Send PDFs through the REST API and get JSON back, with a confidence score on every field and a review screen for the values it's unsure about.

## 5 ways to extract data from PDFs

**How many PDFs, and how varied?**

- **A few files, now and then**: **Copy and paste, or a PDF converter** such as Adobe Acrobat, then tidy up the result.
- **Regular tables in text-based PDFs**: **A table extraction tool** such as pdfplumber, Camelot or Tabula, or Excel's own PDF import.
- **Many files, one fixed layout**: **Rule-based templates** that read each field from a known position.
- **Many files, many layouts or scans**: **AI-based extraction**, with a person reviewing only the values it's unsure about.

| Method | Works on | Accuracy | Effort at scale | Best for |
| --- | --- | --- | --- | --- |
| Manual data entry | Anything | Varies with fatigue | High | A few documents a week |
| PDF converters | Text-based PDFs with simple layouts | Good on clean files; loses structure on complex ones | Medium (cleanup) | One-off conversions |
| Table extraction tools | Text-based PDFs with clear tables | Good on ruled tables | Medium | Statements and reports with regular tables |
| Rule-based templates | Fixed, known layouts | High on the layouts you built | High (a template per layout) | One form from one source |
| AI-based extraction | Any layout, text-based or scanned | High, with confidence scores | Low | Recurring documents in many layouts |

### 1. Manual data entry

Someone reads each PDF and types the values in. It takes no setup, but it's slow and error-prone at volume.

### 2. PDF converters

Adobe Acrobat and similar tools convert a whole PDF to Excel or Word. Acrobat can put each table, each page or the whole document on its own worksheet. Complex layouts often come out with split cells and merged columns, so someone still has to tidy the sheet.

### 3. PDF scraping and table extraction tools

Free, open-source tools scrape a PDF's tables into rows and columns. Two of them, pdfplumber and Camelot, are Python libraries. Tabula is an app with a simple web interface, and tabula-java is the library behind it. Tabula's README says the app is unlikely to see updates soon, while tabula-java still gets occasional fixes.

Most of these tools need a text-based PDF. Tabula works only on text-based PDFs, and pdfplumber works best on them too. Camelot reads scans only with its optional ML and OCR add-ons.

This pulls the transactions from a text-based bank statement (tested on Python 3.11 with pdfplumber 0.11.10; `pip install pdfplumber`).

```python
import pdfplumber

with pdfplumber.open("statement.pdf") as pdf:
    for page in pdf.pages:
        for table in page.extract_tables():
            header, *rows = table
            for row in rows:
                print(dict(zip(header, row)))
```

Output:

```text
{'Date': '07/02/2026', 'Description': 'Payroll deposit', 'Amount': '2,450.00'}
{'Date': '07/05/2026', 'Description': 'Rent payment', 'Amount': '-1,800.00'}
{'Date': '07/19/2026', 'Description': 'Card purchase', 'Amount': '-86.40'}
```

It works because the table has ruling lines and the PDF is text-based. For scans and tables that run across pages, see [table extraction from PDF](https://www.docsumo.com/blog/table-extraction-from-pdf).

### 4. Rule-based templates

A template reads each field from a fixed spot on a known layout, such as the value to the right of "Total Due". Every new layout needs a new template. See [zonal OCR](https://www.docsumo.com/blog/zonal-ocr).

### 5. AI PDF data extraction

AI models trained on many examples find fields from the text, the layout and visual cues, so a new layout usually needs no setup. They read scans, join tables that run across pages and give every value a confidence score. A person checks only the values the model is unsure about. Our guide to [AI data extraction](https://www.docsumo.com/blog/ai-document-extraction) explains how these models work.

**Video**: [Process ANY Complex Document with AI | No-Code Data Extraction Solution](https://www.youtube.com/watch?v=NDqsOSpxB3A)

**Our take.** Don't pick a tool by what its vendor calls it. Document AI, document intelligence and IDP are names for one category of software. Our advice is to take two or three candidates and run each one on the same batch of your own PDFs. Keep the one that gets your fields right with the least setup.

## How to extract data from PDF forms

How you get data out of a PDF form depends on where the answers are stored. In a fillable form, each answer sits in a named field. A flattened form has been saved so its fields can't be clicked any more. In a flattened, printed or scanned form, the answers are part of the page itself.

| Form type | How to tell | How to get the data |
| --- | --- | --- |
| Fillable | You can click a field and type in it | Read the field values directly, with Acrobat or a library such as pypdf |
| Flattened | It looks filled in, but nothing is clickable | Read the page text, then pair each label with its value |
| Scanned or faxed | Nothing selects | Run OCR, then pair each label with its value |
| Handwritten | The answers are written by hand | Use OCR that reads handwriting, and have a person check unclear values |

Adobe Acrobat gets the answers out of fillable forms without code. To save one form's answers, open Prepare a form and choose Options > Export data. Acrobat saves them as FDF, XFDF, XML or TXT. To put many filled forms into one spreadsheet, choose Options > Merge data files into spreadsheet in the same panel.

In Python, pypdf reads a form's text fields in a few lines (tested on Python 3.11 with pypdf 6.19; `pip install pypdf`).

```python
from pypdf import PdfReader

reader = PdfReader("vendor-form.pdf")
print(reader.get_form_text_fields())
```

Output:

```text
{'vendor_name': 'Riverbend Electric & Gas', 'payment_terms': 'Net 30', 'remit_method': 'ACH'}
```

On a flattened copy of the same form, the code returns an empty result. The answers are still on the page. But in our copy, the page text lists the three labels first and the three values after them. Nothing says which value belongs to which label.

Pairing each label with its value is called [key-value pair extraction](https://www.docsumo.com/blog/key-value-pair-extraction). Scanned and handwritten forms need OCR first, as our guide to [OCR form processing](https://www.docsumo.com/blog/ocr-form-processing) explains.

Docsumo reads handwritten text. When one PDF holds a stack of tax forms, it sorts the pages by form and extracts each box and line. See [IRS tax forms](https://www.docsumo.com/solutions/documents/irs-tax-forms) and [ACORD forms](https://www.docsumo.com/solutions/documents/acord-forms).

## How to convert PDF data to Excel or Google Sheets

Excel can pull tables straight from a PDF. Google Sheets can't, so the route depends on where the data has to go.

| Destination | How | Good to know |
| --- | --- | --- |
| Excel, one file | In Excel for Microsoft 365 on Windows, choose Data > Get Data > From File > From PDF, then pick the tables | You get whole tables, and similar tables on consecutive pages are joined by default. Microsoft doesn't list PDF as a data source in Excel for Mac |
| Google Sheets | Get the tables into Excel or CSV, then use File > Import in Sheets | Sheets can't import a PDF. Opening the PDF with Google Docs runs OCR, but it usually misses tables |
| Excel or Sheets, every day | An extraction tool exports just the fields and line items you need from each new PDF | You can download the extracted data from Docsumo to Excel. Its Data Table puts the data from every document of one type in one table, which you can export to CSV or Google Sheets |

For bank statements, see [how to convert PDF bank statements to Excel](https://www.docsumo.com/blog/convert-bank-statement-pdf-to-excel).

## Common PDF extraction failures and fixes

| Problem | Fix |
| --- | --- |
| Poor, skewed or rotated scans: OCR misreads characters or reads lines out of order | Straighten and clean the page first; send low-confidence values to review |
| Broken text layer: old or badly made PDFs return scrambled characters | Use OCR wherever the text layer is clearly wrong |
| Multi-column pages: lines from the two columns get mixed together | Read each column as its own region |
| Complex tables: merged cells scramble columns, and rows break at page ends | Detect tables visually, drop repeated page headers and join the parts |
| Silent failures: a few files return wrong values nobody notices | Validate every result; route low-confidence values to a person |

## How automated PDF data extraction works

Automated PDF [data extraction](https://www.docsumo.com/blog/what-is-data-extraction) runs the same steps on every file, from the moment it arrives to the export. Nobody opens the PDF unless a value fails a check. It's one kind of [automated data extraction](https://www.docsumo.com/blog/automated-data-extraction). [Automated document processing](https://www.docsumo.com/blog/automated-document-processing) covers the wider process.

Text-based PDFs, Scanned PDFs, Email attachments, API uploads → AI extraction: 01 Classify and split, 02 OCR where there's no text, 03 Extract fields and tables, 04 Check and review → **Excel, JSON or your systems**

*How automated extraction turns PDFs into checked data*

Set it up in this order.

1. **Pick one document type**: Start with one, such as [invoices](https://www.docsumo.com/solutions/documents/invoices) or [bank statements](https://www.docsumo.com/solutions/documents/bank-statements), and add others once it runs well.
2. **List the fields**: Write down every field and table you need, and the format for each.
3. **Connect intake**: PDFs can come in by email, by upload or through an [API](https://www.docsumo.com/solutions/document-extraction-api). In Docsumo, one file can hold up to 500 pages.
4. **Split mixed files**: When one PDF holds several documents, such as a loan packet, the software sorts them by type ([classification](https://www.docsumo.com/blog/document-classification)). Then it cuts the file where each document starts (splitting). In Docsumo, auto-classification and splitting are on the Business plan.
5. **Set thresholds and checks**: Choose a confidence score. Any value scored below it goes to a person. Then choose the checks every file has to pass.
6. **Export**: Download to Excel, or send results to your ERP, database or loan system through an [API and webhooks](https://www.docsumo.com/integrations).

## One utility bill, from inbox to spreadsheet

Take the bill in the figure at the top of this page. Riverbend Electric & Gas emails Maple Court Apartments LLC its bill for August 5 to September 3, 2026. The PDF arrives in the team's shared inbox. Docsumo has its own email inbox, so if the email also goes there, nobody has to download the PDF and upload it again.

Page 1 holds the account, the charges and a summary for each meter, and page 2 lists the line items. Extraction returns the account number, 3108-5572-40, the billing period and one row per meter. Two meters are electric, at 9,420 kWh and 1,080 kWh, and one is gas, at 194 CCF.

Then the checks run. The three meter charges add up to $1,719.86 before tax. With $98.89 in taxes and fees, that's $1,818.75, the amount due on September 29. If any value had a low confidence score, a reviewer would see it, and clicking it highlights its source line on the page.

The values go to Excel, or to your AP system through the API and webhooks. The data from every bill like this one goes into the same Data Table. On the Enterprise plan, a check can also compare the first electric meter's supply rate of $0.0912 per kWh with the rate in your contract. See how Docsumo reads [utility bills](https://www.docsumo.com/solutions/documents/utility-bills).

## Checks to run on extracted PDF data

Run these checks before the data reaches your systems.

- **Totals add up**: Line items and tax sum to the total, and transactions reconcile to the closing balance.
- **Required fields are present**: Every field your system needs is there, in the right format.
- **Dates are valid**: Each one is a real date, falls in a sensible range and comes in the right order.
- **Names match your records**: Vendor, customer or account details agree with your master data.
- **It isn't a duplicate**: The same document hasn't been processed before.
- **Uncertain values were reviewed**: Anything below your confidence threshold went to a person first.

In Docsumo, fields below your confidence threshold go to a reviewer. Clicking a field highlights its source line on the page. You can add your own checks as workflow steps, either an AI step or your own Python code. Try it free for 14 days on up to 1,000 pages, and see [pricing](https://www.docsumo.com/pricing) for the plans.

- **99%** field-level accuracy across 250+ document types
- **95%+** of documents processed straight through, without manual review

## Which PDFs to automate first

Count last month's PDFs by type. Start with the type that has the most files and the most layouts. Converters and templates fail on that type first. Run a batch of those files through the method you pick, and look at what a person still had to fix. When you're ready to compare tools, see [PDF data extraction software](https://www.docsumo.com/blog/best-data-extraction-software).

[Book a demo](https://www.docsumo.com/book-a-demo) with a few of your own PDFs, or [start a free trial](https://www.docsumo.com/free-trial).

## Frequently asked questions

### How do I extract data from a PDF into Excel?

In Excel for Microsoft 365 on Windows, choose Data > Get Data > From File > From PDF, pick the tables you want and load them. For PDFs that arrive every day in many layouts, an extraction tool pulls out just the fields you need and exports them to Excel.

### Can you extract data from a scanned PDF?

Yes, but it needs OCR (optical character recognition) first. A scanned PDF is only an image of the page, and OCR turns that image into text you can select, search and copy. After OCR, you still need rules or a model to find the specific fields.

### How do I extract data from a PDF form?

If the form is fillable, read the field values directly. Adobe Acrobat can merge many filled forms into one spreadsheet, and Python's pypdf library returns the name and value of each field. A flattened form still has its text, so you need a step that pairs each label with its value. A scanned or handwritten form needs OCR first, then the same step.

### What is a PDF scraper or parser?

A PDF scraper, or PDF parser, reads a PDF's text, tables and form fields and saves them as data, such as CSV or JSON. Basic scrapers return the text in page order. AI-based ones also work out what each value means, such as which number is the total due. Free tools handle tables in text-based PDFs, such as the pdfplumber and Camelot libraries and the Tabula app.

### Can ChatGPT extract data from a PDF?

Yes. You can upload a PDF and ask ChatGPT for the values you need. OpenAI says that outside its Enterprise plan, ChatGPT reads the digital text in a PDF, not the images in it. Uploads are capped at 80 files every 3 hours, and at 3 a day on the free plan. For PDFs that arrive every day, you also need the same fields in the same format, checked totals and a review step.

### How accurate is automated PDF data extraction?

It depends on document quality and variety, so test on your own files. Docsumo reaches 99% field-level accuracy across 250+ document types, and fields below your confidence threshold go to a person for review.

**Sources**

1. [Microsoft Support: Import data from data sources (Power Query), From PDF](https://support.microsoft.com/en-us/excel/import-data-from-data-sources-power-query)
2. [Microsoft Support: Power Query data sources in Excel versions](https://support.microsoft.com/en-us/excel/power-query-data-sources-in-excel-versions)
3. [Microsoft Learn: Pdf.Tables (MultiPageTables option)](https://learn.microsoft.com/en-us/powerquery-m/pdf-tables)
4. [Google Docs Editors Help: Import data sets and spreadsheets](https://support.google.com/docs/answer/40608)
5. [Google Drive Help: Convert PDF and photo files to text](https://support.google.com/drive/answer/176692)
6. [Adobe Help: Convert PDFs to Excel and XML formats in Acrobat](https://helpx.adobe.com/acrobat/desktop/save-export-documents/convert-to-other-formats/pdf-to-excel.html)
7. [Adobe Help: Collect and manage PDF form data](https://helpx.adobe.com/acrobat/using/collecting-pdf-form-data.html)
8. [pypdf documentation: Interactions with PDF forms](https://pypdf.readthedocs.io/en/stable/user/forms.html)
9. [pdfplumber on GitHub](https://github.com/jsvine/pdfplumber)
10. [PyPI: pdfplumber](https://pypi.org/project/pdfplumber/)
11. [Camelot on GitHub](https://github.com/camelot-dev/camelot)
12. [Tabula on GitHub](https://github.com/tabulapdf/tabula)
13. [OpenAI Help Center: Uploading files and audio to ChatGPT](https://help.openai.com/en/articles/8555545-uploading-files-and-audio-to-chatgpt)

First published Nov 29, 2022. Last updated Oct 15, 2026.

**Written by** [Amit Timalsina](https://www.docsumo.com/blog-authors/amit-timalsina) · Python Developer, Docsumo

Amit is a self-taught Machine learning practitioner with expertise in application areas for logistics, eCommerce, health-tech, linguistics, and Document AI. Using Machine Learning, Natural Language processing, and MLOPs for day to day work, Amit helps Docsumo build End-to-End automated document processing solutions.

[LinkedIn](https://www.linkedin.com/in/amittimalsina/) · [All posts by Amit](https://www.docsumo.com/blog-authors/amit-timalsina)

- [Tesseract OCR: how it works and how to use it in Python](https://www.docsumo.com/blog/tesseract-ocr)
- [Named Entity Recognition: From Fundamentals to State of the Art](https://www.docsumo.com/blog/named-entity-recognition)
- [How to extract tables from PDF files, scans and images](https://www.docsumo.com/blog/table-extraction-from-pdf)

## Keep reading

- [How to extract tables from PDF files, scans and images](https://www.docsumo.com/blog/table-extraction-from-pdf): For finance and operations teams that pull line items and transactions out of PDFs, and for the developers who build that step. Pick a method by file type and volume, then check the rows it returns.
- [Automated data extraction: how it works and how to roll it out](https://www.docsumo.com/blog/automated-data-extraction): For operations, finance and IT leaders replacing manual data entry: how automated extraction works, how templates and AI compare, where it pays off and how to roll it out.
- [OCR data extraction: how it works, methods and accuracy checks](https://www.docsumo.com/blog/ocr-data-extraction): For operations and finance teams replacing manual data entry. See what OCR reads, what extraction adds on top and how to get checked data out of scans, photos and PDFs.

[More on OCR & IDP](https://www.docsumo.com/blog#posts-idp)

## Next steps

- [Book a demo](https://www.docsumo.com/book-a-demo)
- [Get a free trial (1,000 pages)](https://www.docsumo.com/free-trial)
- [Contact sales or support](https://www.docsumo.com/contact)
- [agents.md](https://www.docsumo.com/agents.md): connect Docsumo to your AI agent with Docsumo MCP
- [llms.txt](https://www.docsumo.com/llms.txt) lists the key pages; add .md to any page's URL for its Markdown copy
