Skip to main content

oxidocs

Convert .docx and .pptx to PDF in Python without LibreOffice or Microsoft Office.

pip install oxidocs
import oxidocs

result = oxidocs.docx_to_pdf("report.docx", "report.pdf")
print(result.pages)

oxidocs.pptx_to_pdf("deck.pptx", "deck.pdf")   # one page per slide

The package bundles the Oxi engine as a single binary. Oxi is an open-source Rust engine that lays out Word documents the way Word does. There is no office suite to install and no server to run. The document is converted on the machine that holds it.

Many documents

A Converter keeps one engine process running and can be shared between threads:

with oxidocs.Converter(threads=4) as converter:
    for name in names:
        converter.convert(f"{name}.docx", f"{name}.pdf")

Knowing when to fall back

With strict=True, a document that holds content Oxi does not draw raises UnsupportedContent instead of producing an incomplete PDF. Examples are a chart type it does not support, or SmartArt saved without its drawing. The same applies when Oxi's pages would show less than 90% of the document's own text. You can then hand that document to another converter:

try:
    oxidocs.docx_to_pdf(src, dst, strict=True)
except oxidocs.UnsupportedContent as e:
    print("falling back:", e.kinds)   # e.g. ['chart']
    convert_with_libreoffice(src, dst)

ConversionError (the base class) covers files that cannot be read at all.

Presentations

pptx_to_pdf writes one PDF page per slide, with text laid out by rules measured from PowerPoint. Slides are newer in Oxi than Word documents, and some content is not drawn as PowerPoint draws it yet: charts, gradient fills (drawn in one colour), dashed outlines (drawn solid), rotated text and pictures, and text warps. strict=True raises UnsupportedContent for a deck that holds any of these, as it does for documents:

try:
    oxidocs.pptx_to_pdf(src, dst, strict=True)
except oxidocs.UnsupportedContent as e:
    print("falling back:", e.kinds)   # e.g. ['chart']

A Converter takes documents and presentations alike.

Command line

Installing the package also puts the oxidocs command on your PATH:

oxidocs docx-to-pdf report.docx report.pdf
oxidocs docx-to-pdf --strict report.docx report.pdf   # exit status 3 on content Oxi does not draw
oxidocs pptx-to-pdf deck.pptx deck.pdf

python -m oxidocs ... runs the same command. The OXIDOCS_BINARY environment variable points the package at another oxidocs binary.

How faithful is it?

The figures below are for Word documents. Slides have no such measurement for this PDF output yet.

We froze 50 English and 50 Japanese documents from the public docx-corpus before any engine rendered them. Each was converted by this engine and by LibreOffice 26.8.2.2 on the same Linux machine, and both outputs were scored against Microsoft Word's own PDF of the same file.

English SSIM page count matches Word Japanese SSIM page count matches Word
Oxi 0.884 47 / 50 0.797 45 / 50
LibreOffice 0.841 39 / 50 0.769 26 / 50

Over 4,988 documents, the median conversion took 0.08 s, against 0.89 s for LibreOffice. The method and the full tables are in integrations/gotenberg.

Fonts: Oxi does not bundle Microsoft fonts. It lays text out with metrics measured from Word's fonts and draws it with metric-compatible open fonts. Line and page breaks therefore do not depend on which fonts the machine has installed, but the glyph shapes differ from Microsoft's.

License

The bundled oxidocs binary is the Oxi engine under MPL-2.0. This package's Python code is MIT OR Apache-2.0.

Metadata

Release files for oxidocs 0.9.0.post1

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 oxidocs 0.9.0.post1
File Actions
oxidocs-0.9.0.post1-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for oxidocs-0.9.0.post1-py3-none-win_amd64.whl
oxidocs-0.9.0.post1-py3-none-manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64 Details for oxidocs-0.9.0.post1-py3-none-manylinux_2_28_x86_64.whl
oxidocs-0.9.0.post1-py3-none-manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.28+ ARM64 Details for oxidocs-0.9.0.post1-py3-none-manylinux_2_28_aarch64.whl
oxidocs-0.9.0.post1-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for oxidocs-0.9.0.post1-py3-none-macosx_11_0_arm64.whl
oxidocs-0.9.0.post1-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details for oxidocs-0.9.0.post1-py3-none-macosx_10_12_x86_64.whl

Total release size: 264.3 MB

Release files / oxidocs-0.9.0.post1-py3-none-win_amd64.whl

Download URL oxidocs-0.9.0.post1-py3-none-win_amd64.whl
Size 53.1 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
8d50bc853605e1ee77bd122cf749c3fbad4fcd59a0b610541f1f6b9d3e5ac732
BLAKE2b-256 checksum
How to use checksums
dd6d51445d2e03e73b73fcf5b2ddaac160c0d77ce6a7f774e96efdaa80a78fbb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 15, 2026.

Transparency log

Release files / oxidocs-0.9.0.post1-py3-none-manylinux_2_28_x86_64.whl

Download URL oxidocs-0.9.0.post1-py3-none-manylinux_2_28_x86_64.whl
Size 53.0 MB
Tags Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
c75cc0133236d7953421831eaba468cd995e1b8f8d3bf9b688110fca0a97a59a
BLAKE2b-256 checksum
How to use checksums
631f0c1ba7c7ece27c42d7d95bad2e8b31e88bde5da49dfee71c587c94fd913a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 15, 2026.

Transparency log

Release files / oxidocs-0.9.0.post1-py3-none-manylinux_2_28_aarch64.whl

Download URL oxidocs-0.9.0.post1-py3-none-manylinux_2_28_aarch64.whl
Size 52.5 MB
Tags Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
23515e1531df30c5595dbb42d3d6e045b17406b3d2b0312d28c3278b131ab1aa
BLAKE2b-256 checksum
How to use checksums
b571f6435573ff5bedf37527549b6e3c232e3ab1f1ff02d92ecab56654047a83
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 15, 2026.

Transparency log

Release files / oxidocs-0.9.0.post1-py3-none-macosx_11_0_arm64.whl

Download URL oxidocs-0.9.0.post1-py3-none-macosx_11_0_arm64.whl
Size 52.9 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
1c6fa012f71fb7f420066ade2676ffd5983109c84a598e444098369f29f1dfa5
BLAKE2b-256 checksum
How to use checksums
8da8cf52b3261b4a84639c36ce9ffb3e6cffea7c70bcfd775dc8ab9efaf1e1af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 15, 2026.

Transparency log

Release files / oxidocs-0.9.0.post1-py3-none-macosx_10_12_x86_64.whl

Download URL oxidocs-0.9.0.post1-py3-none-macosx_10_12_x86_64.whl
Size 52.8 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
fdd6d217de13c42537b13c8eed56323d5c09ed1af34386300ca7c2dc379e8931
BLAKE2b-256 checksum
How to use checksums
c25f4b35579f22f58291638420659a25925200f4b568bd559a752d42bba01637
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 15, 2026.

Transparency log

Security for oxidocs 0.9.0.post1

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 5 files in this release have been uploaded with provenance metadata.

Select from 5 files

Attestation for oxidocs-0.9.0.post1-py3-none-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 Nov 15, 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.

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

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