Skip to main content

pdfjetdev — Python client for PDFjet

Turn any PDF into Markdown, CSV, structured JSON (with provenance), editable Word, or a searchable PDF with a few lines of Python. Wraps the PDFjet API. Files are never stored.

  • Zero dependencies — the core client uses only the Python standard library.
  • Structured JSON with provenance — element types, text, page numbers, and per-element bounding boxes.
  • RAG-ready — LangChain and LlamaIndex loaders included.

Install

pip install pdfjetdev
# with framework loaders:
pip install "pdfjetdev[langchain]"
pip install "pdfjetdev[llamaindex]"

Quick start

from pdfjetdev import Client

client = Client("pj_live_...")          # or set the PDFJET_API_KEY env var

# Structured parse with bounding-box provenance
doc = client.extract_json("invoice.pdf")
print(doc.page_count, "pages, scanned:", doc.scanned)
for block in doc.pages[0].blocks:
    print(block.type, block.bbox, block.text or block.items or "")

# Chunk-ready Markdown for a RAG pipeline
print(doc.to_markdown())

# Other outputs
md   = client.extract_markdown("invoice.pdf")   # str
csv  = client.extract_csv("invoice.pdf")        # str
docx = client.extract_docx("invoice.pdf")       # bytes
pdf  = client.extract_searchable("scan.pdf")    # bytes (searchable PDF)

file can be a path, bytes, or an open binary file. Requests to /extract/* and the utility endpoints automatically retry on 429/5xx with exponential backoff.

Pass provenance=False to extract_json for a leaner text+structure payload (no bounding boxes).

LangChain

from pdfjetdev.integrations.langchain import PDFJetLoader

loader = PDFJetLoader("report.pdf", api_key="pj_live_...")   # one Document per page
docs = loader.load()   # page_content is layout-preserving Markdown; page number in metadata

LlamaIndex

from pdfjetdev.integrations.llamaindex import PDFJetReader

reader = PDFJetReader(api_key="pj_live_...")
docs = reader.load_data("report.pdf")   # one LlamaIndex Document per page

Errors

All errors subclass pdfjetdev.PDFJetError: AuthenticationError (401/403), PaymentRequiredError (402, quota), InvalidInputError (400/413), RateLimitError (429), ServiceUnavailableError (5xx).

License

MIT · pdfjet.dev

Metadata

Release files for pdfjetdev 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pdfjetdev 0.1.2
File Size Uploaded
pdfjetdev-0.1.2.tar.gz 10.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pdfjetdev 0.1.2
File Interpreter ABI Platform
pdfjetdev-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 21.3 kB

Release files / pdfjetdev-0.1.2.tar.gz

Download URL pdfjetdev-0.1.2.tar.gz
Size 10.1 kB
Tags Source
SHA-256 checksum
How to use checksums
bd8761f43e4f8e29fd4c767f8853c39baa5cbbf5102aa3bcf2e0b4e7fe64be60
BLAKE2b-256 checksum
How to use checksums
7a4fcbf312bf14ee3b5e3943a0c81e378664cd3037bc3c55be3c72c11584c356
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.

Transparency log

Release files / pdfjetdev-0.1.2-py3-none-any.whl

Download URL pdfjetdev-0.1.2-py3-none-any.whl
Size 11.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2fdc35b8917ed2f51d460a4ffc852acf617920a181b27ee55dc7442a20461586
BLAKE2b-256 checksum
How to use checksums
117be4dc478f68103673ab2b249bc36cf7e16ac83f53b3aab5932642ad361ade
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page