Metadata-Version: 2.4
Name: docx-rs-4jy72q
Version: 0.1.0
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Rust
Classifier: Operating System :: MacOS
Classifier: Operating System :: POSIX :: Linux
Summary: Fast DOCX-to-PDF rendering with a Rust layout engine that matches LibreOffice
License: Proprietary
Requires-Python: >=3.10
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM

# docx-rs

Fast DOCX-to-PDF conversion with a Rust layout engine whose output matches
LibreOffice's, without running LibreOffice.

```python
from docx_rs import convert, convert_bytes

convert("document.docx", "document.pdf")
pdf_bytes = convert_bytes(open("document.docx", "rb").read())
```

Conversions release the GIL, so threads convert in parallel.

## Supported documents

The renderer only produces a PDF when it supports everything in the document. A
document using unsupported features raises `docx_rs.UnsupportedDocument`, whose
`findings` list each unsupported construct; it never returns an approximate PDF.
Support currently covers typical generated legal documents: styles, numbering,
tables, sections, headers and footers, fields such as cached tables of contents,
text boxes and images. Use `docx_rs.inspect(path)` to see the eligibility report
without converting.

## Fonts

The package bundles open fonts and substitutes them for common Microsoft fonts:
TeX Gyre Termes for Times New Roman, Carlito for Calibri, Caladea for Cambria,
Liberation Sans and Mono for Arial and Courier New, OpenSymbol for Symbol and
DejaVu Sans for Segoe UI Symbol. These are the substitutions a typical Linux
LibreOffice installation makes. Each font keeps its own licence; see
`docx_rs/fonts/licenses/`. A custom font profile can be passed as
`font_profile=` (a profile JSON path or `docx_rs.FontProfile.load(path)`).

