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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pdfjetdev-0.1.2.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pdfjetdev-0.1.2-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file pdfjetdev-0.1.2.tar.gz.

File metadata

  • Download URL: pdfjetdev-0.1.2.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for pdfjetdev-0.1.2.tar.gz
Algorithm Hash digest
SHA256 bd8761f43e4f8e29fd4c767f8853c39baa5cbbf5102aa3bcf2e0b4e7fe64be60
MD5 94a2a6da493ea8eb4cbe74042012b2a2
BLAKE2b-256 7a4fcbf312bf14ee3b5e3943a0c81e378664cd3037bc3c55be3c72c11584c356

See more details on using hashes here.

Provenance

The following attestation bundles were made for pdfjetdev-0.1.2.tar.gz:

Publisher: publish-python-sdk.yml on workollab/pdfjet-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pdfjetdev-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: pdfjetdev-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for pdfjetdev-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2fdc35b8917ed2f51d460a4ffc852acf617920a181b27ee55dc7442a20461586
MD5 a7e43c3d8f66a43a83080ea27fa0ee93
BLAKE2b-256 117be4dc478f68103673ab2b249bc36cf7e16ac83f53b3aab5932642ad361ade

See more details on using hashes here.

Provenance

The following attestation bundles were made for pdfjetdev-0.1.2-py3-none-any.whl:

Publisher: publish-python-sdk.yml on workollab/pdfjet-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page