Tabula Alternative: Extract Scanned & Multi-Page PDF Tables Without Java
Move past tabula-py JVM crashes, empty DataFrames on scanned PDFs, and broken multi-page tables using one zero-retention REST API.
Where Tabula & tabula-py Break in Production Pipelines
Tabula and its Python wrapper tabula-py are popular for extracting tables from clean, text-based PDFs—but production document pipelines quickly hit three hard architectural limits. First, Tabula only reads embedded PDF text layers, so any image-only scanner PDF returns empty output. Second, running tabula-py in Docker, AWS Lambda, or Cloudflare Workers requires bundling a Java Runtime Environment (JVM), inflating container size and cold starts. Third, borderless financial statements and 10–20 page continuation schedules split columns at arbitrary whitespace and repeat page headers inside your CSV rows.
Vision-Based Table OCR + Automatic Cross-Page Stitching
StructOCR replaces the Java + Tabula + post-processing regex stack with POST /v1/pdf-extract. Upload a digital or scanned PDF (up to 10 MB, up to 20 pages per call) via direct multipart/form-data with mode=tables and stitch_tables=true. StructOCR reads 150+ DPI scans and borderless tables, automatically stitches continuation pages when column counts and normalized headers match, and strips duplicate header rows. Test a real file immediately in our free PDF table extractor or PDF to CSV converter.
When Teams Migrate from Tabula to StructOCR
- Scanned Bank Statements & Financial Schedules: Tabula returns empty tables on image-only scans. StructOCR reads scanned and photographed statements into aligned rows ready for Excel or pandas.
- Zero-JVM Serverless & Container Deployments: Remove OpenJDK from slim Python, Node.js, or Go containers—one HTTPS POST replaces subprocess calls to tabula-java.jar.
- Multi-Page Price Lists & Operational Reports: Deterministic cross-page stitching merges continuation tables into one continuous table while keeping distinct sub-tables separate.
- Borderless Statements & Mixed Column Widths: Avoid tuning Lattice vs. Stream modes or hardcoded area coordinates per vendor template.
Drop-In Python Replacement for tabula.read_pdf()
Send binary PDFs directly to POST https://api.structocr.com/v1/pdf-extract with mode=tables and stitch_tables=true. Each table in document.tables[] maps directly to a CSV file or pandas DataFrame. See the full parameter reference in the PDF Extract API docs.
Prerequisite: Python 3.9+ (`pip install requests`; no Java/JVM required)
import csv
import os
import requests
# Replaces: dfs = tabula.read_pdf("scanned_schedule.pdf", pages="all", stream=True)
with open("scanned_schedule.pdf", "rb") as pdf_file:
response = requests.post(
"https://api.structocr.com/v1/pdf-extract",
headers={"x-api-key": os.environ["STRUCTOCR_API_KEY"]},
files={"file": ("scanned_schedule.pdf", pdf_file, "application/pdf")},
data={
"mode": "tables",
"pages": "all",
"stitch_tables": "true",
},
timeout=90,
)
response.raise_for_status()
tables = response.json()["document"]["tables"]
for idx, table in enumerate(tables, start=1):
out_path = f"table_{idx}.csv"
with open(out_path, "w", newline="", encoding="utf-8-sig") as f:
writer = csv.writer(f)
writer.writerow(table["headers"])
writer.writerows(table["rows"])
print(f"{out_path}: {len(table['rows'])} rows across pages {table['page_range']} (stitched={table['stitched']})")Technical Specs
- •Runtime Dependencies: Tabula requires Java/JVM; StructOCR is a single HTTPS REST endpoint (`POST /v1/pdf-extract`)
- •Scanned PDFs: Tabula only reads embedded PDF text; StructOCR reads both digital and 150+ DPI scanned PDFs, JPG, PNG, and WebP
- •Multi-Page Stitching: Deterministic header-similarity stitching (`stitch_tables=true`) strips repeated page headers across up to 20 pages per call
- •Upload Limit: Direct binary `multipart/form-data` up to 10 MB per request
- •Privacy: Strict Zero Data Retention (in-memory processing; `raw_response: null`)
- •Pricing: 2 credits per succeeded page (failed pages automatically refunded; 200 free credits = 100 pages on signup)
Key Features
- •No more Lattice vs. Stream guesswork: Handles gridded, semi-bordered, and completely borderless tables automatically.
- •Duplicate continuation headers removed: Repeated column headers on page 2–20 are stripped before appending rows.
- •Multi-table safety: Distinct sub-tables with different column layouts remain separated in `document.tables[]` instead of corrupting columns.
- •Optional custom JSON Schema: Need header metadata alongside tables? Switch to `mode=auto` or `mode=json` with a `schema` array or JSON Schema.
Example Stitched Table Response (Synthetic Specimen)
Synthetic output from `POST /v1/pdf-extract` showing a 3-page scanned supplier schedule stitched into a single `table_1` object.
{
"success": true,
"mode": "tables",
"document": {
"summary": {
"document_type": "supplier_price_schedule",
"title": "Q4 Wholesale Hardware Price List",
"language": "en"
},
"fields": {},
"tables": [
{
"id": "table_1",
"title": "Hardware SKU Schedule",
"page_range": [
1,
3
],
"stitched": true,
"headers": [
"SKU",
"Item Description",
"Pack Qty",
"Unit Price (USD)"
],
"rows": [
[
"HW-1042",
"Stainless Flange Bolt M8x30",
"100",
"18.50"
],
[
"HW-1088",
"Nylon Lock Nut M8",
"250",
"14.20"
],
[
"HW-2105",
"Galvanized Corner Bracket 60mm",
"50",
"32.00"
]
]
}
]
},
"custom_data": null,
"pages": [
{
"page": 1,
"status": "ok",
"tables_found": 1
},
{
"page": 2,
"status": "ok",
"tables_found": 1
},
{
"page": 3,
"status": "ok",
"tables_found": 1
}
],
"usage": {
"page_count": 3,
"pages_processed": 3,
"pages_succeeded": 3,
"credits_per_page": 2,
"credits_charged": 6
}
}Frequently Asked Questions
Why does tabula-py return an empty list on scanned PDFs?
Tabula extracts character coordinates from the PDF's embedded text stream rather than running OCR. If a document was scanned to PDF as page images, there is no text stream for Tabula to read. StructOCR renders each page visually so scanned and digital PDFs use the same extraction pipeline.
Do I need Java, Ghostscript, or Poppler installed to use StructOCR?
No. You upload the raw PDF binary via standard multipart/form-data to POST /v1/pdf-extract from Python, Node.js, Go, Java, PHP, C#, or cURL with zero local OCR or JVM dependencies.
Can I also compare Camelot and pdfplumber migration paths?
Yes—if your team is replacing Python coordinate parsers more broadly, see our Camelot alternative guide and pdfplumber scanned PDF guide, or test your multi-page file directly in the browser PDF Table Extractor.
How does billing work if one page in a 15-page PDF fails?
StructOCR charges 2 credits only for succeeded pages (usage.pages_succeeded). Any page that returns status: error is automatically refunded and never stitched across a missing page gap.
You May Also Like
Related tutorials, platform guides, and comparisons
Extract Table from PDF to CSV in Java – Scanned PDF Table OCR API
Extract multi-page and scanned PDF tables into UTF-8 CSV files in Java 17+ via POST /v1/pdf-extract. Replace brittle PDFBox/Tabula coordinate rules with vision table stitching.
Convert PDF to JSON in Java – Scanned PDF & Schema OCR API
Convert scanned or digital PDFs into typed JSON in Java 17+ and Spring Boot via POST /v1/pdf-extract. Supports 10 MB multipart uploads, custom JSON schemas, and stitched tables.
Convert PDF to JSON in C# & .NET – Custom Schema OCR API
Extract structured JSON and custom JSON schemas from scanned or digital PDFs in C# and ASP.NET Core using MultipartFormDataContent and POST /v1/pdf-extract.
pdfplumber Scanned PDF Alternative – Vision OCR to JSON & CSV
When pdfplumber.extract_tables() returns empty results on scanned PDFs or breaks on borderless layouts, switch to POST /v1/pdf-extract for stitched tables and custom JSON Schema extraction.
Camelot PDF Alternative for Borderless & Scanned Tables
Replace camelot-py without Ghostscript or OpenCV dependencies. Extract borderless, scanned, and multi-page PDF tables into Excel, CSV, and JSON via POST /v1/pdf-extract.
Netherlands Identiteitskaart OCR Python SDK
Python Tutorial: Automate KYC in Netherlands. Extract data from Identiteitskaart using StructOCR Python SDK. Supports native text and MRZ extraction.
New Zealand Passport OCR with Python SDK
Use the official StructOCR Python SDK and FastAPI to extract structured MRZ and VIZ data from New Zealand passports with a server-side integration.
Morocco CNIE OCR Python SDK
Python Tutorial: Automate KYC in Morocco. Extract data from CNIE using StructOCR Python SDK. Supports native text and MRZ extraction.
Taggun Alternative: Receipt OCR API
Taggun compared with the StructOCR REST API for receipt extraction: deployment, pricing model, and when each fits.
New Zealand Passport OCR with Node.js SDK
Use the official StructOCR Node.js SDK with TypeScript and Express to extract structured MRZ and VIZ data from New Zealand passports.
Technical Comparisons & Integrations
Explore platform integrations and competitive analysis
Add Receipt OCR to Your Replit App in 5 Minutes
Step-by-step guide to integrating the StructOCR receipt API into a Replit application. Build expense tracking and receipt scanning tools using Replit Agent and Secrets.
Add VIN OCR to Your Replit App in 5 Minutes
Step-by-step guide to integrating the StructOCR VIN scanner API into a Replit application. Build automotive and fleet tools using Replit Agent and Secrets.
Single-Page MRZ SDKs vs. Dual-Page Indian KYC API
Why traditional MRZ scanners fail at full Indian Passport verification, and how to process both the front identity page and the back address page in a single API call.
Template-Based OCR vs. StructOCR API for Invoice Processing
Why traditional zonal/template-based OCR fails at processing vendor invoices, and how layout-agnostic AI APIs instantly extract line items and totals.
Tesseract & PassportEye vs. StructOCR Passport API
A technical evaluation for developers deciding between open-source MRZ scanners and a dedicated cloud-based Passport OCR API.
Tesseract OCR vs. StructOCR API for ISO 6346 Container Numbers
A technical comparison for developers evaluating open-source Tesseract vs. a dedicated cloud API for extracting shipping container numbers.
From tutorial to production in 5 minutes.
You've seen the code. Now get your API key, grab your 200 free credits, and see it work with your own images. No credit card required.