Skip to main content

pydoccraft

CI

pydoccraft 0.3.0 is an Apache-2.0 Python/Rust package for eager, in-process structured extraction, rendering, and semantic conversion of PDF, DOCX, and PPTX files. It exposes the compatible doc_ex PyMuPDF-style API and uses pinned PdfCraft, WordCraft, and DeckCraft library crates—without external executables, runtime downloads, networking, cloud credentials, or OCR.

Install

python -m pip install pydoccraft

The wheel contains the private doc_ex._core native extension. No office suite, Pandoc, or Craft CLI is required.

Quick start

from pathlib import Path
import doc_ex

with doc_ex.open("report.pdf") as document:
    print(document.page_count)
    print(document[0].get_text())
    print(document[0].get_text("markdown"))
    print(document[0].get_links())
    print(document[0].find_tables())
    Path("page.png").write_bytes(document[0].get_pixmap(dpi=144))
    Path("report.docx").write_bytes(document.convert("docx"))

Path("report.pdf").write_bytes(doc_ex.convert("report.docx", "pdf"))
Path("slides.pdf").write_bytes(doc_ex.convert("slides.pptx", "pdf"))

Document supports context management, iteration, integer and negative indexing, load_page, page_count, metadata, Markdown, PNG rendering, conversion, and idempotent close. Page.number is zero-based. Returned Block, Table, Link, and Image objects own their extracted data.

Supported operations

Operation PDF DOCX PPTX
Structured text, links, images, and tables Yes Yes Yes
PNG page/slide rendering Yes Yes Yes
Convert to PDF — Yes Yes
Convert to DOCX Yes — No
Password input Yes Yes Encrypted PPTX unsupported
OCR No — —
Create a new document from scratch Basic Basic Basic

PDF table detection is conservative. PDF links retain destinations and geometry; unambiguous single-line and contiguous multiline labels have exact character offsets. Ambiguous regions remain unresolved. DOCX computed pagination cannot split one automatically wrapped paragraph into exact normalized page slices. PPTX exposes URL links but not every PowerPoint action. Conversion uses upstream semantic exporters and is not pixel-perfect.

Render a page at a chosen DPI

The same API works for PDF pages, DOCX layout pages, and PPTX slides:

from pathlib import Path
import doc_ex

with doc_ex.open("report.docx") as document:  # also .pdf or .pptx
    Path("page-1.png").write_bytes(document.render_page(0, dpi=300))
    # Equivalent: document[0].get_pixmap(dpi=300)
    Path("detail.png").write_bytes(document.render_page(0, dpi=300, clip=(36, 36, 144, 72)))

Indexes are zero-based; negative indexes are supported. DPI defaults to 144 and must be finite and between 1 and 1200, subject to output-size limits. Both methods return PNG bytes. Optional clip=(x, y, width, height) selects a region in displayed-page points. DOCX pagination follows WordCraft layout and may differ from Microsoft Word. See rendering details.

Version 0.3.0 adds native authoring through doc_ex.new("docx" | "pdf" | "pptx"), including text, tables, images, backgrounds, explicit saving and independent copies. See the authoring API for examples, the supported edit profile and current limits. Earlier releases, such as 0.2.1, do not include these additions.

The expanded roadmap covers Open XML feature parity, styles, sections, templates, review features and safe editing. The design and reference crosswalk keeps ArtCraft libraries as the only document backend. Unchecked coverage remains incomplete even where an initial slice is implemented.

The coverage checklist is consolidated into 14 connected workstreams, with upstream contribution candidates distinguished from existing library support. Reports, watermarks, templates and batches should compose a small core API wherever possible.

Track the work in the GitHub Roadmap project.

Documentation

Browse the documentation website for guides, examples and the roadmap. It follows main; unreleased features remain labeled separately from published packages.

Development

cargo fmt --all -- --check
cargo test --locked
cargo clippy --locked --all-targets -- -D warnings
maturin build --release --locked --out dist
python -m unittest discover -s tests -v

Release validation must install the built wheel into a clean environment and run the suite against that installed package. Tests generate their own fixtures and require no external document tools.

Community

License

pydoccraft is licensed under Apache-2.0. Distributions include LICENSE, NOTICE, and the wheel-compatible LICENSE-THIRD-PARTY copy of the audited THIRD_PARTY_LICENSES.md inventory. Upstream dependency names identify their source and are not pydoccraft branding.

The source repository is narain1/pydoccraft. PyPI trusted publishing is configured for project pydoccraft, repository pydoccraft, workflow release.yml, and environment pypi.

Metadata

Release files for pydoccraft 0.3.0

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

Built distributions (wheels)

Table of built distributions (wheels) for pydoccraft 0.3.0
File
pydoccraft-0.3.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
pydoccraft-0.3.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-64 Details
pydoccraft-0.3.0-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
pydoccraft-0.3.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
pydoccraft-0.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details
pydoccraft-0.3.0-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
pydoccraft-0.3.0-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
pydoccraft-0.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details
pydoccraft-0.3.0-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details

Total release size: 152.3 MB

Release files / pydoccraft-0.3.0-cp313-cp313-win_amd64.whl

Download URL pydoccraft-0.3.0-cp313-cp313-win_amd64.whl
Size 17.2 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
aad6f50aad94dfcbcb6496dae8b946d70cf6f6adb05c1516fa745881cfbfaaf6
BLAKE2b-256 checksum
How to use checksums
96359b98118b6733ebdacb495907e59e12015db795c157c2147d16343e504108
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.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 Oct 22, 2026.

Transparency log

Release files / pydoccraft-0.3.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pydoccraft-0.3.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 17.7 MB
Tags CPython 3.13 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
0d31c28bee35786e3bf40ed97e2e7de4f6ab1bbb9309b42b89b5def1dff78feb
BLAKE2b-256 checksum
How to use checksums
23fcde01ff68d38f9fe4b523716765031d671635c9cbcbc60467f8409e33b1f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.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 Oct 22, 2026.

Transparency log

Release files / pydoccraft-0.3.0-cp313-cp313-macosx_11_0_arm64.whl

Download URL pydoccraft-0.3.0-cp313-cp313-macosx_11_0_arm64.whl
Size 15.9 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
f19d3c8a3b8e3965a8c62f0d90dbd80e7490f1d0e0437f9ec1e131d2060e92b0
BLAKE2b-256 checksum
How to use checksums
f48075eaab78ab3daef11c2ef823effae5f9a674b60cbcc197921974419842e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.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 Oct 22, 2026.

Transparency log

Release files / pydoccraft-0.3.0-cp312-cp312-win_amd64.whl

Download URL pydoccraft-0.3.0-cp312-cp312-win_amd64.whl
Size 17.2 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
903ed1229c04f0aca75a4654876bbf6d4ad51e9302f77861c5cc898179f2cec4
BLAKE2b-256 checksum
How to use checksums
a51aae406a822248942c6aa307663e8ed12501836232a462a906409c4061c895
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.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 Oct 22, 2026.

Transparency log

Release files / pydoccraft-0.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pydoccraft-0.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 17.7 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
e22a11e6f4d1408514259fe60e3dc734fce99ec396ef76d8c1eea9f6cc6059b8
BLAKE2b-256 checksum
How to use checksums
254b1fd025ac3c26e8d319e4da46e88df464d2f70eeada8daa06151a98ee1c4e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.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 Oct 22, 2026.

Transparency log

Release files / pydoccraft-0.3.0-cp312-cp312-macosx_11_0_arm64.whl

Download URL pydoccraft-0.3.0-cp312-cp312-macosx_11_0_arm64.whl
Size 15.9 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
d83313b19066b8289d310c69e8d90167fa4656c4f714cc51287e50d187cb5fd3
BLAKE2b-256 checksum
How to use checksums
4784a066597eceea98e7ca438434f9f4e09a5f3dfd3310b852ea9e54352adb70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.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 Oct 22, 2026.

Transparency log

Release files / pydoccraft-0.3.0-cp311-cp311-win_amd64.whl

Download URL pydoccraft-0.3.0-cp311-cp311-win_amd64.whl
Size 17.2 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
1d1adf0e3e548cad6bc48184bf2e67c56117ca9ebecf28d597d191d93f01ac0a
BLAKE2b-256 checksum
How to use checksums
8c0b528dc6bcb80ee78271bcbe5ccda765329086038af92206260bf1cdb09813
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.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 Oct 22, 2026.

Transparency log

Release files / pydoccraft-0.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pydoccraft-0.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 17.7 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
11b3ccd8e8cf17d21bde79169bbb26e189fd68acdf924c20664351aedbee937c
BLAKE2b-256 checksum
How to use checksums
472ec4494a5e29c257aeaab6d8e8b8042c048e9c6c97a715a3df80c27d3c434e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.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 Oct 22, 2026.

Transparency log

Release files / pydoccraft-0.3.0-cp311-cp311-macosx_11_0_arm64.whl

Download URL pydoccraft-0.3.0-cp311-cp311-macosx_11_0_arm64.whl
Size 15.9 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
c4f5c9d7e8525b25a2fb06e26a165683f6a8192b4b783adefa124c62836d8d0f
BLAKE2b-256 checksum
How to use checksums
72523f334ba1cd3bb55c3f99f609f8eab2ddb732147d87bfd1b4dceb1ef5418c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.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 Oct 22, 2026.

Transparency log

Security for pydoccraft 0.3.0

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.

Full provenance

All 9 files in this release have been uploaded with provenance metadata.

Select from 9 files

Attestation for pydoccraft-0.3.0-cp313-cp313-win_amd64.whl

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 Oct 22, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.3.0 This release

9 release files Full provenance

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