ExtractPDF4J 2.3.1 API

Extract tables from PDFs using Java. Choose a parser based on how the document represents its table.

From PDF to table

Open a PDF, call a parser, and work with the returned Table objects. Use CsvExporter for CSV or JsonExporter for JSON.

Synthetic statement and CSV excerpt. The 3 April ATM withdrawal appears under Debit as 10,000.00 INR.
Selectable text in a synthetic statement becomes structured rows with separate debit and credit fields.

Choose a parser

Parsing strategies by PDF layout
PDF layoutJava APIHow it reads the table
Selectable text aligned in columnsStreamParserGroups text by position.
Cells bounded by visible rulesLatticeParserDetects horizontal and vertical grid lines.
Scanned pages without a text layerOcrStreamParserUses OCR to recognize text and recover columns.
Mixed or unknown layoutHybridParserCompares extraction strategies and selects the highest-scoring result.

For a runnable PDF-to-CSV example and sample files, see the CLI walkthrough. For more demos, see the four parsing examples.

If ExtractPDF4J helps you, star the project to help others discover it. Open an issue if you find a bug or have an idea, or fork the repo to contribute.

Packages
Package
Description
Core public APIs and foundational types for configuring and executing PDF extraction with ExtractPDF4J.
Defines annotations used throughout ExtractPDF4J for configuration, metadata declaration, and extension points.
Implements the command-line interface for executing PDF extraction workflows and interacting with ExtractPDF4J from shell environments.
 
Provides reusable helper utilities supporting parsing, content normalization, validation, and shared internal operations.
 
PDF parsing strategies that convert document content into structured tables.
Contains the root configuration and application entry point for the ExtractPDF4J microservice runtime.
Exposes HTTP endpoints for PDF upload, extraction execution, and API-based access to ExtractPDF4J capabilities.
Implements service-layer orchestration and business logic for document processing and extraction operations in the microservice layer.