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.
Choose a parser
| PDF layout | Java API | How it reads the table |
|---|---|---|
| Selectable text aligned in columns | StreamParser | Groups text by position. |
| Cells bounded by visible rules | LatticeParser | Detects horizontal and vertical grid lines. |
| Scanned pages without a text layer | OcrStreamParser | Uses OCR to recognize text and recover columns. |
| Mixed or unknown layout | HybridParser | Compares 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.