Skip to main content

rofd-convert-py

Headless OFD (GB/T 33190) to PDF conversion — PyO3 bindings over the rofd-convert kernel (convert spec §6.6).

Install (wheel, abi3-py39+)

pip install rofd-convert

Dev build from the repository root:

py -3.1 -m maturin build --release -m crates/convert-py/Cargo.toml -o target/wheels
py -3.1 -m pip install --force-reinstall target/wheels/rofd_convert-*.whl

Usage

from rofd_convert import Converter, register_font_file

# Once per process, BEFORE the first Converter (registry snapshot).
# Real documents declaring non-embedded fonts need a registered font.
register_font_file("simsun.ttc")

c = Converter()
pdf, warnings = c.convert(ofd_bytes)
# Content flags are all on by default; flip per call:
pdf2, _ = c.convert(ofd_bytes, watermark=False, max_pages=50)

convert releases the GIL during the kernel call; one instance serves one call at a time (a concurrent call raises ConvertError("converter in use")). For throughput, give each thread its own instance (threading.local) — demo/run.py shows the ThreadPoolExecutor recipe.

Acceptance

py -3.1 crates/convert-py/demo/run.py   # pooled converts == CLI bytes

Metadata

Release files for rofd-convert 0.1.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 rofd-convert 0.1.0
File Actions
rofd_convert-0.1.0-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details for rofd_convert-0.1.0-cp39-abi3-win_amd64.whl
rofd_convert-0.1.0-cp39-abi3-manylinux_2_28_x86_64.whl CPython 3.9 abi3 Linux glibc 2.28+ x86-64 Details for rofd_convert-0.1.0-cp39-abi3-manylinux_2_28_x86_64.whl
rofd_convert-0.1.0-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details for rofd_convert-0.1.0-cp39-abi3-macosx_11_0_arm64.whl
rofd_convert-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details for rofd_convert-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl

Total release size: 11.5 MB

Release files / rofd_convert-0.1.0-cp39-abi3-win_amd64.whl

Download URL rofd_convert-0.1.0-cp39-abi3-win_amd64.whl
Size 2.5 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
6ee41061e2af997ad92b197563b35f5b878ce20326da223d6ec4ed1e256de825
BLAKE2b-256 checksum
How to use checksums
3ca5b2a9d700f883992620b6336f80361ab876d6b85ce47dc2739ab53d11de06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / rofd_convert-0.1.0-cp39-abi3-manylinux_2_28_x86_64.whl

Download URL rofd_convert-0.1.0-cp39-abi3-manylinux_2_28_x86_64.whl
Size 3.7 MB
Tags CPython 3.9 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
8156ec516d4b7ba6dae73d97bbaa7a1eaff361ed5f769e1c5133dd3f5b4c1879
BLAKE2b-256 checksum
How to use checksums
be16e977a2767a1b56c4dc5079b90af83751a3d20b6aecc8f516562f1b7e8e4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / rofd_convert-0.1.0-cp39-abi3-macosx_11_0_arm64.whl

Download URL rofd_convert-0.1.0-cp39-abi3-macosx_11_0_arm64.whl
Size 2.6 MB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
b46f9862c6320bd5c8afd07f92246b925469b4ce0236629d9b2d65c9c05acce4
BLAKE2b-256 checksum
How to use checksums
0490bc3d5cbc19537a496b2a320f1df4450bc32703119681fc637b5d1dc9843c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / rofd_convert-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl

Download URL rofd_convert-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl
Size 2.7 MB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
ff6481bac0bd426b8cf80761068ef1735253a4372d04de294bd85cb9085b1d20
BLAKE2b-256 checksum
How to use checksums
09dd301133104ba233c2b279f9dc3dafed7c9ca9f05c5adea4a038896901e432
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for rofd-convert 0.1.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

0.1.0 This release

4 release files 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