Skip to main content

   Ozaru

Read, analyze, draw, convert, edit and protect PDF files from Python.
Small API, Rust core, no dependencies.

PyPI Python CI License: MIT

Documentation · PyPI · Changelog


Time to extract text and draw pages: ozaru against PyMuPDF and pypdf, shorter is better

Median time of one call, on an Intel Core i5-11400H. All the numbers.

import ozaru

# The text, in reading order, and the tables as rows or Markdown
text = ozaru.extract_text("invoice.pdf")
tables = ozaru.extract_tables("report.pdf")

# Every page as a picture, on every core; pictures into a PDF
ozaru.render_pages("catalog.pdf", "pages", format="jpeg")
ozaru.images_to_pdf(["scan.tif", "photo.jpg"], "out.pdf")

# A text taken out of the file for good, not just covered
ozaru.redact_text("contract.pdf", "safe.pdf", "ID 1234567")

# What changed between two versions
print(ozaru.compare("v1.pdf", "v2.pdf").summary())

What it does

  • Read the text in reading order, words and lines with their boxes, fonts and colors, and search with positions.
  • Analyze tables, headings, regions, and the whole document as Markdown for language models.
  • Convert pages to PNG, JPEG, BMP, PNM or TIFF, and pictures (JPEG, PNG, BMP, GIF, TIFF, JPEG 2000) to PDF.
  • Organize pages: merge, split, insert, replace, move, rotate, crop and delete.
  • Edit with text, shapes, pictures, watermarks, highlights, notes and links; fill, create and flatten forms.
  • Protect with real redaction, sanitizing and passwords; compare two versions of a PDF.
  • Shrink a PDF without loss: compressed object streams, streams compressed again, duplicates kept once, page content cleaned.

Every function has a command too: uvx ozaru markdown report.pdf, uvx ozaru compare v1.pdf v2.pdf, and more.

ozaru PyMuPDF pypdf
License MIT AGPL or paid BSD
Engine Rust, no dependencies, fuzzed in CI C (MuPDF) pure Python
Draws pages yes yes no
Images own readers and writers MuPDF's needs Pillow
Compare PDFs built in no no

Young and moving fast: the road to 1.0.0 is to do everything PyMuPDF and pypdf do, and more.

Installation

With uv, in your project:

uv add ozaru

From the terminal, with nothing installed:

uvx ozaru text invoice.pdf

Or into the active environment: uv pip install ozaru. It also installs with pip. Python 3.10 or newer; wheels for Linux, macOS and Windows, so no Rust needed.

Contributing

You need Rust and uv. Then run:

git clone https://github.com/Jair-dev57/ozaru.git
cd ozaru
uv run pytest

See the contributing guide. Bug reports and ideas are welcome in the issue tracker; for security problems, read SECURITY.md.

License

ozaru is released under the MIT License.

Metadata

Release files for ozaru 0.14.1

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

Source distribution (sdist)

Source distribution for ozaru 0.14.1
File Size Uploaded Provenance Actions
ozaru-0.14.1.tar.gz 1.4 MB Without provenance Details for ozaru-0.14.1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for ozaru 0.14.1
File Actions
ozaru-0.14.1-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for ozaru-0.14.1-cp310-abi3-win_amd64.whl
ozaru-0.14.1-cp310-abi3-musllinux_1_2_x86_64.whl CPython 3.10 abi3 Linux musl 1.2+ x86-64 Details for ozaru-0.14.1-cp310-abi3-musllinux_1_2_x86_64.whl
ozaru-0.14.1-cp310-abi3-musllinux_1_2_aarch64.whl CPython 3.10 abi3 Linux musl 1.2+ ARM64 Details for ozaru-0.14.1-cp310-abi3-musllinux_1_2_aarch64.whl
ozaru-0.14.1-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details for ozaru-0.14.1-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
ozaru-0.14.1-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details for ozaru-0.14.1-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
ozaru-0.14.1-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for ozaru-0.14.1-cp310-abi3-macosx_11_0_arm64.whl
ozaru-0.14.1-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details for ozaru-0.14.1-cp310-abi3-macosx_10_12_x86_64.whl

Total release size: 19.4 MB

Release files / ozaru-0.14.1.tar.gz

Download URL ozaru-0.14.1.tar.gz
Size 1.4 MB
Tags Source
SHA-256 checksum
How to use checksums
6fe6aee24c0482bd9a8f5248ab715b2209f95b9a6be49793e56316cc02532424
BLAKE2b-256 checksum
How to use checksums
9dfd97bcf0b11af906de962beb2ba4d92d59fb34b63145942a4209e70673f923
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.12 {"installer":{"name":"uv","version":"0.13.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / ozaru-0.14.1-cp310-abi3-win_amd64.whl

Download URL ozaru-0.14.1-cp310-abi3-win_amd64.whl
Size 2.4 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
5167cc8d99f30db4bc44c33e996d2e48b315874926e0b1e561427f5d2f0ab0c9
BLAKE2b-256 checksum
How to use checksums
f1deb3e1fbcb2d50fcc4787b8d89ad22432d60203ecbe8a2901e22479a426d07
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.12 {"installer":{"name":"uv","version":"0.13.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / ozaru-0.14.1-cp310-abi3-musllinux_1_2_x86_64.whl

Download URL ozaru-0.14.1-cp310-abi3-musllinux_1_2_x86_64.whl
Size 2.9 MB
Tags CPython 3.10 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
cb0966b5ab38f8b7c0bf0d2ea8c7dee7e7474af81e5e310f5b173caac4cefa0c
BLAKE2b-256 checksum
How to use checksums
3935c599461fb77ed3b26bead6cda5bc4735fb6f8543cd80f87958929c1c882f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.12 {"installer":{"name":"uv","version":"0.13.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / ozaru-0.14.1-cp310-abi3-musllinux_1_2_aarch64.whl

Download URL ozaru-0.14.1-cp310-abi3-musllinux_1_2_aarch64.whl
Size 2.7 MB
Tags CPython 3.10 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
2d97ff6bc339b5ceea781080779f0fa90a82238b6a25189c444d4684380d485b
BLAKE2b-256 checksum
How to use checksums
58feb363895b93c6b92ae93093c2fc2508522d308a1013ab457876a21885c63c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.12 {"installer":{"name":"uv","version":"0.13.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / ozaru-0.14.1-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL ozaru-0.14.1-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 2.6 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
471ff32a77f83067040f0f1ed822eae1b1134fa3c37b13124be3a12f82de15dd
BLAKE2b-256 checksum
How to use checksums
4dc234c590b7e81148f7bf8792fc2a2f87b46313ae8814926f94a77f95a37a1b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.12 {"installer":{"name":"uv","version":"0.13.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / ozaru-0.14.1-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL ozaru-0.14.1-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 2.5 MB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
dfe2d718b5d1d562906a818f6afa01d4d13d71b547ca9e125d38311311468f44
BLAKE2b-256 checksum
How to use checksums
cbf10115d8e4073c6572e2c8f8c1d5cd11011201d923d23c0f64032b6fb3699a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.12 {"installer":{"name":"uv","version":"0.13.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / ozaru-0.14.1-cp310-abi3-macosx_11_0_arm64.whl

Download URL ozaru-0.14.1-cp310-abi3-macosx_11_0_arm64.whl
Size 2.4 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
4ec44ce2771e017dee13d1bc184e8ce4fc00e4c023d1bf80991b58b6f0ad3c03
BLAKE2b-256 checksum
How to use checksums
4c1c1e79d36fe024b95f29647f8a420f0d97b729a617c22a4d95a25fc659ac66
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.12 {"installer":{"name":"uv","version":"0.13.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / ozaru-0.14.1-cp310-abi3-macosx_10_12_x86_64.whl

Download URL ozaru-0.14.1-cp310-abi3-macosx_10_12_x86_64.whl
Size 2.5 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
31dcb1de488a855a2e8f43be888787264d66d1f0b4aa89ba7a5727ebb7a544c0
BLAKE2b-256 checksum
How to use checksums
17353c0638d2ed44fdd1f402a49295498b212789054f79c9c934d3319abe3f38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.12 {"installer":{"name":"uv","version":"0.13.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for ozaru 0.14.1

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.14.1 This release

8 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