Skip to main content

mcruft-pdfcraft-native

Count, extract and combine PDF pages through pinned PdfCraft Rust libraries. This optional Python extension supplies mcruft's pdfcraft-native engine without launching a CLI or downloading anything at runtime.

Install

Python 3.12+, macOS 11+ and Apple Silicon are required for the published abi3 wheel:

uv pip install 'mcruft-pdfcraft[native]'

This installs the adapter as well as the extension. For the standalone binding:

uv pip install mcruft-pdfcraft-native

Linux, Windows and Intel macOS wheels are not provided. The all extra exists for consistent installation across mcruft distributions and adds no dependencies.

Use

The low-level API accepts string paths and zero-based page indexes. Output parent directories must exist. Choose new output paths: the low-level writer overwrites existing files. Malformed PDFs and I/O failures raise RuntimeError.

import mcruft_pdfcraft_native as pdf

print(pdf.page_count("input.pdf"))
pdf.extract("input.pdf", [0], "first-page.pdf")
pdf.combine(["first-page.pdf", "appendix.pdf"], "combined.pdf")

For policy selection, capability routing and loss reports, use the mcruft document API with the mcruft-pdfcraft adapter installed. The binding exposes these three page operations; it does not expose the full PdfCraft editor or claim to preserve every PDF feature.

Build from source

Install Rust and Python 3.12 or later, then run from this directory:

uvx maturin build --release

This extension is outside the uv Python workspace and is not built by uv sync. PdfCraft engine crates are pinned to commit 53199fb4fa36f3c95b539add6218c57aeb2f823c (v0.13.0); UI, MCP and updater crates are not linked. Building requires access to those sources and a native toolchain.

Licence: Apache-2.0 AND (MIT OR Apache-2.0). The wheel includes mcruft, upstream and linked dependency licences under licenses/.

Metadata

Release files for mcruft-pdfcraft-native 1.0.0

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

Built distribution (wheel)

Table of built distributions (wheels) for mcruft-pdfcraft-native 1.0.0
File Interpreter ABI Platform Actions
mcruft_pdfcraft_native-1.0.0-cp312-abi3-macosx_11_0_arm64.whl CPython 3.12 abi3 macOS 11.0+ ARM64 Details for mcruft_pdfcraft_native-1.0.0-cp312-abi3-macosx_11_0_arm64.whl

Release files / mcruft_pdfcraft_native-1.0.0-cp312-abi3-macosx_11_0_arm64.whl

Download URL mcruft_pdfcraft_native-1.0.0-cp312-abi3-macosx_11_0_arm64.whl
Size 1.4 MB
Tags CPython 3.12 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
a4c772fbee0a040046010ac594e4554ff3a199569154912a7f6fd665a075d7e1
BLAKE2b-256 checksum
How to use checksums
7c4a43b4c2d785345878b3966bb541d192bb84aa580ef9d31261fcdd9ffce17c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for mcruft-pdfcraft-native 1.0.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

1 release file No 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