Thanks to visit codestin.com
Credit goes to docs.langchain.com

Skip to main content
PDF Parsing for RAG — Convert to Markdown & JSON, Fast, Local, No GPU
OpenDataLoader PDF converts PDFs into LLM-ready Markdown and JSON with accurate reading order, table extraction, and bounding boxes — all running locally on your machine. Why developers choose OpenDataLoader:
  • Deterministic — Same input always produces same output (no LLM hallucinations)
  • Fast — Process 100+ pages per second on CPU
  • Private — 100% local, zero data transmission
  • Accurate — Bounding boxes for every element, correct multi-column reading order

Requirements

  • Python >= 3.10
  • Java 11 or newer available on the system PATH

Installation

pip install -U langchain-opendataloader-pdf

Quick start

from langchain_opendataloader_pdf import OpenDataLoaderPDFLoader

loader = OpenDataLoaderPDFLoader(
    file_path=["path/to/document.pdf", "path/to/folder"], 
    format="text"
)
documents = loader.load()

for doc in documents:
    print(doc.metadata, doc.page_content[:80])

Parameters

ParameterTypeDefaultDescription
file_pathstr | List[str](Required) PDF file path(s) or directories
formatstr"text"Output format: "text", "markdown", "json", "html"
split_pagesboolTrueSplit into separate Documents per page
quietboolFalseSuppress console logging
passwordstrNonePassword for encrypted PDFs
use_struct_treeboolFalseUse PDF structure tree (tagged PDFs)
table_methodstr"default""default" (border-based) or "cluster" (border + clustering)
reading_orderstr"xycut""xycut" or "off"
keep_line_breaksboolFalsePreserve original line breaks
image_outputstr"off""off", "embedded" (Base64), or "external"
image_formatstr"png""png" or "jpeg"
content_safety_offList[str]NoneDisable safety filters: "hidden-text", "off-page", "tiny", "hidden-ocg", "all"
replace_invalid_charsstrNoneReplacement for invalid characters

Additional Resources


Connect these docs to Claude, VSCode, and more via MCP for real-time answers.