# OpenDataLoader PDF

> Open-source PDF parser for AI-ready data and automated accessibility tagging

- Category: Retrieval & Knowledge (RAG) / Parsing & Ingestion
- Language: Java
- Licence: Apache-2.0
- Repository: https://github.com/opendataloader-project/opendataloader-pdf
- Website: https://opendataloader.org
- Canonical page: https://ai-tldr.dev/tools/opendataloader-pdf/

## In short

OpenDataLoader PDF is an open-source tool that converts PDF files into AI-ready data. It sits in the Parsing & Ingestion category of the Retrieval & Knowledge (RAG) tools and is open-source, written in Java and licensed Apache-2.0. To get started: install the package.

## Overview

OpenDataLoader PDF is an open-source tool that converts PDF files into AI-ready data. It extracts text, tables, headings, lists, and images, then outputs them as Markdown, JSON (with bounding boxes for every element), or HTML. This makes it a solid first step for RAG pipelines and other LLM workflows that need clean, structured input.

It runs a fast, deterministic local mode and an optional hybrid mode that routes hard pages, such as complex tables, scanned documents, and formulas, to an AI backend. Beyond extraction, it also auto-tags untagged PDFs into screen-reader-ready Tagged PDFs, which is a free Apache-2.0 foundation for PDF accessibility work.

## What it does

- Extracts Markdown, JSON, and HTML from any PDF, with bounding boxes attached to every element for source citations
- Deterministic local mode plus an optional hybrid AI mode for complex tables, formulas, charts, and scanned pages
- Built-in OCR (80+ languages) in hybrid mode for scanned and image-based PDFs
- Detects reading order, heading hierarchy, numbered, bulleted, and nested lists
- Auto-tags untagged PDFs into Tagged PDFs as a free foundation for accessibility and PDF/UA workflows
- AI safety filters for prompt-injection content, plus header, footer, and watermark filtering

## Getting started

OpenDataLoader PDF needs Java 11+ and Python 3.10+. Check Java with `java -version` first, then install the Python package and convert your files. Node.js and Java SDKs are also available.

1. Install the package

   Install the latest version from PyPI.

```bash
pip install -U opendataloader-pdf
```

2. Convert PDFs to structured data

   Batch your files in one call and pick the output formats you need. Each call spawns a JVM process, so passing several files together is faster than calling convert repeatedly.

```python
import opendataloader_pdf

opendataloader_pdf.convert(
    input_path=["file1.pdf", "file2.pdf", "folder/"],
    output_dir="output/",
    format="markdown,json"
)
```

3. Handle complex or scanned PDFs

   For complex tables, scanned pages, or formulas, install the hybrid extra, start the hybrid server, then run the client with the hybrid flag.

```bash
pip install "opendataloader-pdf[hybrid]"
opendataloader-pdf-hybrid --port 5002
opendataloader-pdf --hybrid docling-fast file1.pdf file2.pdf folder/
```

4. Use it with LangChain

   An official LangChain document loader is available for RAG pipelines.

```python
pip install -U langchain-opendataloader-pdf
from langchain_opendataloader_pdf import OpenDataLoaderPDFLoader
```

## When to use it

- Build RAG pipelines by parsing PDFs into structured Markdown for chunking, or JSON with bounding boxes for element-level control and source citations
- Extract tables, formulas, and chart descriptions from complex or scanned documents using hybrid mode with built-in OCR
- Auto-tag untagged PDFs into Tagged PDFs to speed up accessibility remediation at scale instead of paying for manual document-by-document fixes
