惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Martin Fowler
Martin Fowler
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
博客园 - 聂微东
IT之家
IT之家
GbyAI
GbyAI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Y
Y Combinator Blog
博客园 - 【当耐特】
The Cloudflare Blog
宝玉的分享
宝玉的分享
罗磊的独立博客
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
V
Visual Studio Blog
小众软件
小众软件
博客园_首页
Last Week in AI
Last Week in AI
J
Java Code Geeks
V
V2EX
雷峰网
雷峰网
Apple Machine Learning Research
Apple Machine Learning Research
阮一峰的网络日志
阮一峰的网络日志
腾讯CDC
博客园 - 司徒正美
Engineering at Meta
Engineering at Meta
The GitHub Blog
The GitHub Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
D
DataBreaches.Net
博客园 - 三生石上(FineUI控件)
MyScale Blog
MyScale Blog
云风的 BLOG
云风的 BLOG
The Register - Security
The Register - Security
M
MIT News - Artificial intelligence
Microsoft Azure Blog
Microsoft Azure Blog
T
The Blog of Author Tim Ferriss
N
Netflix TechBlog - Medium
F
Full Disclosure
B
Blog
H
Help Net Security
C
Check Point Blog
WordPress大学
WordPress大学
人人都是产品经理
人人都是产品经理
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Jina AI
Jina AI
酷 壳 – CoolShell
酷 壳 – CoolShell
Blog — PlanetScale
Blog — PlanetScale
L
LangChain Blog
P
Proofpoint News Feed
D
Docker
Microsoft Security Blog
Microsoft Security Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
Tabula vs Camelot vs pdfplumber in 2026: Which Python Library Actually Wins?
Martin · 2026-05-25 · via DEV Community

When you need to extract tables from PDFs in Python, three libraries dominate every Stack Overflow answer and tutorial from the past few years: Tabula, Camelot, and pdfplumber. Each has real strengths and genuine failure modes — and the advice you got in 2022 may steer you wrong today.

This guide covers what each library does well in 2026, where each breaks, and how to choose the right one for your specific document type. At the end, I'll flag when it makes more sense to skip the code entirely.


The quick comparison table

Library Best for Fails on
Tabula Stream tables in native PDFs Lattice grids, scanned PDFs
Camelot Lattice tables in native PDFs Scanned PDFs, complex layouts
pdfplumber Complex layouts, debugging Scanned PDFs
None of the above Scanned / photographed PDFs ← use an OCR-first tool

Tabula

Tabula is a Java library; Tabula-py wraps it for Python. It detects table boundaries by analyzing whitespace and text positioning in text-layer PDFs. It works in two modes:

  • Stream: uses column whitespace to identify boundaries
  • Lattice: uses drawn lines/borders to identify boundaries

Setup is minimal:

import tabula

# Extract all tables from a PDF
tables = tabula.read_pdf("bank_statement.pdf", pages="all")
for df in tables:
    print(df.head())

When it works well: Clean, text-based PDFs with consistent column spacing — simple bank statement exports, government reports, or any document using whitespace rather than cell borders to separate data.

When it fails:

  • PDFs with multi-column layouts that confuse the stream parser
  • Tables that span multiple pages with repeated headers (you often get duplicate header rows)
  • Any scanned or image-based PDF — Tabula reads the text layer, which doesn't exist in scanned documents
  • Dense bordered grids (Camelot's lattice mode handles those better)

2026 maintenance status: Tabula-py is community-maintained. The underlying Tabula Java library has been largely stable since 2018 — not much active development, but it still works reliably for its core use case.


Camelot

Camelot takes a more principled approach to table detection. Its lattice mode uses line-detection algorithms to find explicit table borders; its stream mode analyzes whitespace similar to Tabula. The critical difference: Camelot's lattice mode is noticeably more accurate on documents where cells have drawn borders.

import camelot

# Lattice mode — best for tables with visible borders
tables = camelot.read_pdf("invoice.pdf", flavor="lattice")
print(tables[0].df)

# Stream mode — best for whitespace-separated tables
tables = camelot.read_pdf("statement.pdf", flavor="stream")

Camelot also lets you visualize exactly what it detected, which cuts debugging time dramatically:

tables[0].plot()

When it works well: Invoices and formal reports with explicit cell borders. Financial statements exported from accounting software that preserve table structure cleanly. Any document where you would visually describe the layout as "a grid with lines."

When it fails:

  • Irregular tables where cells span multiple rows or columns
  • PDFs generated from scans (same hard limit as Tabula — no text layer, no extraction)
  • Some PDFs return "No tables found" even when tables are clearly visible on screen; this usually means the PDF uses positioned text rather than actual line objects

2026 maintenance status: The original repo (camelot-dev/camelot) is sparsely maintained. The atlanhq/camelot fork receives more regular updates and is generally recommended for new projects in 2026.


pdfplumber

pdfplumber operates at a lower level than Tabula or Camelot. Instead of asking "find me the tables," you get precise access to every character, line segment, and rectangle in the PDF's geometry. You direct the extraction; it executes exactly what you specify.

import pdfplumber

with pdfplumber.open("report.pdf") as pdf:
    for page in pdf.pages:
        table = page.extract_table()
        if table:
            for row in table:
                print(row)

        # Or extract all words with their coordinates
        words = page.extract_words()

pdfplumber's visual debugger is the standout feature — it shows exactly what the library detected, which turns a 45-minute head-scratching session into a 5-minute fix:

with pdfplumber.open("messy_invoice.pdf") as pdf:
    page = pdf.pages[0]
    im = page.to_image()
    im.debug_tablefinder()
    im.save("debug.png")

You can also tune the table detection settings directly — column tolerance, edge detection, snap tolerance — which matters when documents have inconsistent column spacing or overlapping elements.

When it works well: PDFs with irregular or overlapping table structures. Invoices where column boundaries shift row-to-row. Situations where you need precise control over what gets extracted and how. Also excellent for extracting specific regions of a page rather than entire tables.

When it fails:

  • Slower than Tabula and Camelot on large documents (the extra precision costs time)
  • Requires more code for complex cases — you'll be adjusting table_settings parameters rather than just calling read_pdf()
  • Still cannot handle scanned PDFs

2026 maintenance status: Actively maintained with regular releases. Responsive to issues. The best choice for long-term projects where maintenance risk matters.


The constraint all three share

None of these libraries can read scanned PDFs, photographed documents, or files that are just images wrapped in a PDF container. They all parse the PDF's text layer — the underlying character objects that a properly exported PDF contains.

If your document was printed and scanned, or photographed on a phone, the text layer is either absent or contains garbage. All three libraries will return empty results or extract nonsense.

For scanned documents you need an OCR preprocessing step:

# Option: pdf2image + pytesseract
from pdf2image import convert_from_path
import pytesseract

pages = convert_from_path("scanned_statement.pdf", dpi=300)
for page_img in pages:
    text = pytesseract.image_to_string(page_img)
    # then parse the text...

This works but adds significant complexity — you're now managing image resolution, OCR accuracy, and text parsing in addition to the extraction logic itself.


Side-by-side test: Chase bank statement (digital export)

To make the comparison concrete, I tested all three on a typical digital PDF bank statement (5 pages, 250 transaction rows, whitespace-separated columns with no explicit borders):

Library Rows extracted Issues
Tabula (stream) 247/250 3 rows with long descriptions merged with next row
Camelot (lattice) 0/250 No borders detected — wrong mode for this document
Camelot (stream) 238/250 12 rows with descriptions over ~60 chars dropped
pdfplumber (default) 241/250 9 rows missed due to column tolerance
pdfplumber (tuned) 250/250 Required ~20 min of table_settings adjustment

Takeaway: pdfplumber gives the best accuracy but requires effort to tune. Camelot lattice is useless for a document without borders — always check your document type before picking the mode. Tabula stream gives solid results with zero configuration.


How to choose

Use Tabula when: You have clean text-layer PDFs with whitespace-separated columns and want the fastest setup. Government reports, simple bank exports, standard invoices.

Use Camelot (lattice) when: Your PDFs have explicit cell borders and you need higher accuracy than Tabula delivers. Formal financial statements, printed reports, tables with visible grid lines.

Use pdfplumber when: Your table structure is irregular, you need to debug extraction failures, or you're building a long-term pipeline where you need fine control over detection parameters. The visual debugger alone is worth the learning curve.

Use OCR preprocessing when: Any of your source documents are scanned images. All three libraries will fail silently or return empty results on image-only PDFs.


When to skip the code entirely

If you're building a recurring pipeline that processes hundreds or thousands of PDFs regularly, the libraries above are the right tool. But a meaningful portion of real-world PDF extraction work doesn't fit that profile.

For a bookkeeper processing monthly bank statements, a CPA handling 1099s across tax season, or an analyst who needs to pull tables from 20 PDFs once, setting up Python with Java dependencies (Tabula requires Java 8+), working through installation issues, and maintaining version compatibility is disproportionate effort.

Tools like PDFExcel handle scanned PDFs, photographed documents, and varied layouts without code — upload the file, download a clean spreadsheet. They're particularly useful when documents vary in type (some scanned, some digital, some photographed) or when the person doing the work isn't a developer.

The honest decision rule: if you're already comfortable in Python and will process PDFs regularly, pick from the libraries above. If you need occasional one-off extraction, or you need scanned-document support without building and maintaining an OCR pipeline, a dedicated tool saves real time.


Final verdict (2026)

Tabula Camelot pdfplumber
Bordered tables OK Best Good
Whitespace tables Best Good Good
Scanned PDFs No No No
Visual debugging No Basic Excellent
Custom settings Limited Limited Extensive
Maintenance (2026) Low Medium Active
Setup complexity Low Medium Low

For new projects in 2026: pdfplumber is the safest default — actively maintained, handles the widest range of layouts, and the debugger makes troubleshooting fast. Use Camelot when you have explicitly bordered tables and need the best lattice accuracy. Use Tabula when you need a quick solution for standard text-layer documents and don't want to tune parameters.

All three fail on scanned PDFs. Either preprocess with OCR or use a tool built for it.