tabula-py returns [] on a scan because it reads only the text layer, and by default only page 1. parserkit reads scans with OCR: a 2-page statement costs $0.04 at $0.02 a page, 50 pages free.
tabula read_pdf returns [] on a scanned PDF
On a scan, tabula.read_pdf(path, pages="all") returns a list of 0 tables and no error. tabula-py wraps tabula-java, which needs Java 8 or newer, reads only text-based PDFs and has shipped no release since 2021-08-17. parserkit read the same scan by OCR and returned 26 transactions with every balance checked.
Error fixesUpdated
$ python read_tables.py statement-wrenfield-v-scan.pdf
Failed to import jpype dependencies. Fallback to subprocess.
No module named 'jpype'
[]Causes
Why it happens and the fix for each
The PDF is a scan, so there is no text to read
As the
tabula-pyFAQ puts it, "tabula-py and tabula-java don't support image-based PDFs. It should contain text-based table information." In our run onstatement-wrenfield-v-scan.pdf,read_pdf(path),pages="all",lattice=True, andstream=Truewithguess=Falseall returned[], a list of 0 tables. You can check your file by runningpdffontson it, because a scan with no text layer prints the header row and no fonts (see PDF text extraction returns empty). To get rows out, add an OCR text layer first withocrmypdfandTesseract: that letread_pdf(path, pages="all")return 2 tables on our scan, with the column names taken from the closing balance line. Or skip the OCR step and send the PDF to the bank statement parser API, which returns the transactions with every balance checked.pdffonts on the scan $ pdffonts statement-wrenfield-v-scan.pdf name type encoding emb sub uni object ID ------------------------------------ ----------------- ---------------- --- --- --- ---------Only page 1 is read unless you pass pages
The
tabula-pyFAQ notes: "By default, tabula-py extracts tables from the first page of your PDF, with pages=1 argument." If your table is on page 2 or later, a plainread_pdf(path)call misses it or only gives you page 1. You will see'pages' argument isn't specified.Will extract only from page 1 by default.printed when you run it. Passpages="all"totabula.read_pdf(path, pages="all")to read every page; onstatement-wrenfield-v-digital.pdf,read_pdf(path)returned 1 table of 18 rows by 5 columns, whilepages="all"returned 6 tables. That is 6 DataFrames for one 2-page statement, stitched back together by you; parserkit'sbank_statementpreset returned all 26 transactions as one list.Python import tabula tables = tabula.read_pdf("statement.pdf", pages="all") print(len(tables), [table.shape for table in tables])Java is not on the PATH Python sees
tabula-py2.10.0 needs Python 3.9 or newer, Java 8 or newer, and a Java runtime on thePATH. Whenjavais missing from thePATHPython sees,read_pdfraisestabula.errors.JavaNotFoundErrorattabula/backend.py, line 133, with the message in the box below. You can runtabula.environment_info()to check the Java setup from inside Python. Install Java 8+ and make surejavais on thePATHfor that Python process, or drop the Java dependency: parserkit is one HTTPS call.No java on PATH File "/workspace/venv/lib/python3.13/site-packages/tabula/backend.py", line 133, in call_tabula_java raise JavaNotFoundError(JAVA_NOT_FOUND_ERROR) tabula.errors.JavaNotFoundError: `java` command is not found from this Python process.Please ensure Java is installed and PATH is set for `java`The jpype message is a notice, not the failure
When
python read_tables.py statement-wrenfield-v-scan.pdfran in our test, it printed"Failed to import jpype dependencies. Fallback to subprocess."and"No module named 'jpype'"right before returning[]. It looks like an error, buttabula-pyis just falling back to a subprocess call instead of usingjpype. The same notices printed on the text copy and the OCR copy, and both still returned tables. You do not need to fix thejpypenotice to get tables back; look at whether the PDF has a text layer or whetherlattice=Trueis set.lattice=True on a table without ruling lines
Passing
lattice=Truetells Tabula to look for ruling lines around cells, which fails or splits things strangely when a statement does not have them (much like when Camelot read_pdf is not working in lattice mode). After we ranocrmypdf17.13.0 withTesseract5.5.0 on our scan to add a text layer,read_pdf(path, pages="all")returned 2 tables (15 rows by 5 columns and 7 by 5), whilelattice=Trueon that same OCR copy returned 0 tables. Onstatement-wrenfield-v-digital.pdf,pages="all"withlattice=Truereturned 14 tables, 12 of them a single row and the letterhead in one cell. Droplattice=Trueif your table has no grid lines.
Example
The same scan through parserkit
statement-wrenfield-v-scan.pdf is the 2-page scan tabula returned [] for. Sent once with the bank_statement preset, both pages were read by OCR and every balance was added up again.
POSTapi.parserkit.com/v1/parse?wait=60
curl "https://api.parserkit.com/v1/parse?wait=60" \
-H "Authorization: Bearer $PARSERKIT_API_KEY" \
-F file=@statement-wrenfield-v-scan.pdf \
-F preset=bank_statementimport os
import requests
with open("statement-wrenfield-v-scan.pdf", "rb") as file:
res = requests.post(
"https://api.parserkit.com/v1/parse",
params={"wait": 60},
headers={"Authorization": f"Bearer {os.environ['PARSERKIT_API_KEY']}"},
files={"file": file},
data={"preset": "bank_statement"},
)
job = res.json()
for row in job["data"]["transactions"]:
print(row["date"], row["description"], row["amount"], row["balance"])import { openAsBlob } from "node:fs";
const form = new FormData();
form.append("file", await openAsBlob("statement-wrenfield-v-scan.pdf"), "statement-wrenfield-v-scan.pdf");
form.append("preset", "bank_statement");
const res = await fetch("https://api.parserkit.com/v1/parse?wait=60", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.PARSERKIT_API_KEY}` },
body: form,
});
const job = await res.json();
console.table(job.data.transactions);{
"id": "job_wrnysps6myd8bfewkb9e",
"status": "succeeded",
"pages": 2,
"digital_pages": 0,
"ocr_pages": 2,
"cost_usd": 0.04,
"verification_status": "verified",
"duplicate": null,
"data": {
"bank": {
"name": "Wrenfield Savings Bank"
},
"account": {
"holder": "Jordan Ellery",
"number": "4417 2093 6650",
"routing_number": "541030924",
"type": "Everyday checking"
},
"currency": "USD",
"period_start": "2026-09-01",
"period_end": "2026-09-30",
"opening_balance": 2741.18,
"closing_balance": 4832.35,
"total_credits": 5078.03,
"total_debits": 2986.86,
"transactions": [
{
"date": "2026-09-01",
"description": "Rent payment, Eldridge Property Mgmt",
"amount": -1650,
"balance": 1091.18
},
{
"date": "2026-09-02",
"description": "Card purchase, Old Town Noodle Bar",
"amount": -36.98,
"balance": 1054.2
},
{
"date": "2026-09-30",
"description": "Interest paid",
"amount": 0.71,
"balance": 4832.35
}
]
},
"verification": {
"status": "verified",
"math_balanced": true,
"coverage": {
"values": 116,
"checked": 116
},
"checks": [
{
"kind": "balance",
"path": "closing_balance",
"status": "pass",
"expected": 4832.35,
"actual": 4832.35,
"difference": 0,
"message": "opening balance + total credits - total debits"
},
{
"kind": "sum",
"path": "total_credits",
"status": "pass",
"expected": 5078.03,
"actual": 5078.03,
"difference": 0,
"message": "sum of the money-in rows"
},
{
"kind": "sum",
"path": "total_debits",
"status": "pass",
"expected": 2986.86,
"actual": 2986.86,
"difference": 0,
"message": "sum of the money-out rows"
},
{
"kind": "balance",
"path": "closing_balance",
"status": "pass",
"expected": 4832.35,
"actual": 4832.35,
"difference": 0,
"message": "opening balance + every transaction"
},
{
"kind": "running_balance",
"path": "transactions[].balance",
"status": "pass",
"expected": null,
"actual": null,
"difference": null,
"message": "26 of 26 printed balances follow from the one before (in printed order)"
},
{
"kind": "aba_routing",
"path": "account.routing_number",
"status": "pass",
"expected": null,
"actual": "541030924",
"difference": null,
"message": "a well-formed ABA routing number"
}
]
}
}Real response from . Trimmed to the first two transactions and the last one, with addresses, value dates, references, bounding boxes and file links left out.
Three routes through the same scanned statement
On the 2-page scan, and on a copy where ocrmypdf added a text layer.
| Route | What came back | Needs | Cost |
|---|---|---|---|
| parserkit, bank_statement preset | 26 transactions as JSON, every balance checked | An API key | $0.04 for the 2 pages |
| tabula-py 2.10.0 | 0 tables, whatever the options | Java 8+ and a text layer | Free (MIT license), runs on your machine |
| ocrmypdf 17.13.0, then tabula-py | 2 tables, with column names taken from the closing balance line | Tesseract, plus Java for tabula | Runs on your machine |
Source: Reproduction log
Check for a text layer before you debug tabula
Before you tweak read_pdf options, run pdffonts on your file: on our 2-page scanned statement it printed its header row and no fonts, so there was no text layer for tabula to read.
Even when a text layer is there, either in statement-wrenfield-v-digital.pdf or after running ocrmypdf ("OCRmyPDF adds an OCR text layer to scanned PDF files, allowing them to be searched or copy-pasted"), Tabula can still misread the layout. On both the text copy and the OCR copy, Tabula named the columns from the closing balance line above the table (Closing balance, 4,832.35) and put the real header (DATE, DESCRIPTION, WITHDRAWALS, DEPOSITS, BALANCE) into row 0.
What parserkit does with the same scan
We sent statement-wrenfield-v-scan.pdf to POST /v1/parse with the bank_statement preset. Pages with a text layer are read from it and pages without one go through OCR, counted in digital_pages and ocr_pages; on this 2-page scan, 0 were read from a text layer and 2 by OCR. The job status was succeeded and verified, returning 26 transactions with all 6 checks passing: opening balance plus credits minus debits equals the closing balance, the money-in and money-out rows add up to their totals, and every printed running balance follows from the one before.
Tabula is free, but on a statement it leaves the OCR install, the page stitching, the header fix and the balance math to you. parserkit does all four in one call: a 2-page statement like this costs $0.04 at $0.02 a page ($0.01 a page past 5,000 pages in a UTC month), and failed jobs and exact duplicates cost nothing. You get $1 free credit on Google sign-in, which covers 50 pages with no card required; see the pricing page for details.
FAQ
Common questions
Why does tabula read_pdf return an empty list?
tabula-py only works on text-based PDFs, not scanned documents, so calling read_pdf on a scan with no text layer returns []. It can also return 0 tables if you pass lattice=True on an OCR copy without table grid lines, or if the table isn't on page 1 and you didn't pass pages="all". parserkit reads every page of a scan or a text PDF and returned 26 transactions from this one.
Does tabula-py work on scanned PDFs?
No, Tabula only works on text-based PDFs and has no OCR. ocrmypdf can add a text layer first, but on our scan tabula then took the column names from the closing balance line. parserkit runs OCR on pages without a text layer and checks every balance, at $0.02 a page.
How do I fix JavaNotFoundError in tabula-py?
Install Java 8 or newer and make sure the java command is on the PATH that your Python process sees. You can call tabula.environment_info() in Python to check what Java setup tabula-py detects. parserkit needs no Java at all: it's one HTTPS call to POST /v1/parse.
Why does tabula only read the first page?
By default, tabula-py runs with pages=1 and prints 'pages' argument isn't specified.Will extract only from page 1 by default. Pass pages="all" to read_pdf so it reads every page in the PDF. parserkit reads every page in one job, up to 250 pages, and returns the transactions as one list.
Is there a free Tabula alternative for scanned bank statements?
Tabula is free but can't read scans, and tabula-java has shipped no release since 1.0.5 on 2021-08-17. parserkit reads scanned statements with OCR, checks every balance and gives you 50 pages free on Google sign-in, no card.
Related
- camelot read_pdf finds no tablesWhy Camelot returns TableList n=0 on scans and borderless tables, the fix for each, and how parserkit reads the scan in one call.
- extract_text returns emptypdfplumber and pypdf return '' on scanned PDFs. Spot a scan in one line, then let parserkit read it with OCR and checked totals.
- Bank statement parser APIEvery transaction as JSON, with each running balance re-added.
- PDF table extraction APITables from PDFs and scans as JSON, Excel and CSV, whole across page breaks.
- parserkit vs TabulaTabula's free draw-a-box table extraction for text-based PDFs against parserkit's OCR, page-spanning tables and API at $0.02 a page.
- Bank statement to CSV converterTurn a bank statement PDF or photo into a CSV with one row per transaction and every balance checked, free and without an account.
- PDF to Excel converterPull the tables out of a PDF, digital or scanned, into Excel with the printed column names, free and without an account.
- PDF table extraction toolsparserkit leads for PDF tables to Excel, CSV and JSON at $0.02 a page, ahead of Tabula, Camelot and AWS Textract.
Start free
Send us your worst scan
Your first $1 is free: 50 pages with every check and export, no card.
