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.

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.0

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.0
File Size Uploaded Provenance Actions
ozaru-0.14.0.tar.gz 1.4 MB Without provenance Details for ozaru-0.14.0.tar.gz

Built distributions (wheels)

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

Total release size: 19.2 MB

Release files / ozaru-0.14.0.tar.gz

Download URL ozaru-0.14.0.tar.gz
Size 1.4 MB
Tags Source
SHA-256 checksum
How to use checksums
3db047fdfbb163df410b604b5108cb6a4fc1dce8a25ea4aec8575e5dd41f6cc0
BLAKE2b-256 checksum
How to use checksums
da2907574b07ded6ac03af457965fda28d8b3e93f3ba59bd9c0a8abd56738ddf
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.0-cp310-abi3-win_amd64.whl

Download URL ozaru-0.14.0-cp310-abi3-win_amd64.whl
Size 2.4 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
a4b975f5aa36d7496fef1f05013a82f227f6cb7bf66393b760f3277731831838
BLAKE2b-256 checksum
How to use checksums
180993753c3c53d26f7d1031199dc2dacaa2f13419be8c2bbf8abf00933f97ef
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.0-cp310-abi3-musllinux_1_2_x86_64.whl

Download URL ozaru-0.14.0-cp310-abi3-musllinux_1_2_x86_64.whl
Size 2.8 MB
Tags CPython 3.10 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
51bd4e7dcbc58771aa73eef4d5a29f01671714f5ccd55b3cc7c3d82b13d142bb
BLAKE2b-256 checksum
How to use checksums
92b039e575887681265e4ff3e6cf04cabf73f339ef29a0526fcdb143f9d0b215
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.0-cp310-abi3-musllinux_1_2_aarch64.whl

Download URL ozaru-0.14.0-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
6ccf96ee701936b4a2f5c4755e2710c0659a8bc88728ac22e4e249bb01e966bc
BLAKE2b-256 checksum
How to use checksums
8adadfb830181797a9a823b4cda31208ff1132e0e292764fb1f6cbf81c43d145
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.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL ozaru-0.14.0-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
040eb098101a07758990adfe8f316fe5b15b36ef5a989f8334c1c09fea3696ef
BLAKE2b-256 checksum
How to use checksums
733c1c8ce854666be34416622cf1b3ebd21dcc3c7278e578e6ec6d1f87f1bdd3
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.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL ozaru-0.14.0-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
e8cd7b34f50dfda550e7f4f55cd8af1b2a098db4ee47c33cd44c54977cbc91b6
BLAKE2b-256 checksum
How to use checksums
6d6ce76cf2d289dc79df7bef8addfb38aaa52b4b3eaa21fd03d4fb78dc8729ba
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.0-cp310-abi3-macosx_11_0_arm64.whl

Download URL ozaru-0.14.0-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
495e8e77c51ed857b590d7df6d618a3aeabfb372d7ab204e370a16f6d57130d8
BLAKE2b-256 checksum
How to use checksums
fd5b278dad245ac9481bde5327e90ddde78f95b2e97c08c1985f1d814c0707b0
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.0-cp310-abi3-macosx_10_12_x86_64.whl

Download URL ozaru-0.14.0-cp310-abi3-macosx_10_12_x86_64.whl
Size 2.4 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
acbdefc6730a1f602ce1355b5053d9f5fc1b4174a7cd27db1a247e74f4309dcd
BLAKE2b-256 checksum
How to use checksums
3b135c749520e54983a4ac0b70502edd90b93b8c7975bdded1fd78e153607715
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.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.14.0 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