Metadata-Version: 2.4
Name: pyropdf
Version: 0.2.0
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Programming Language :: Python :: Free Threading :: 3 - Stable
Classifier: Programming Language :: Rust
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Dist: pylopdf-ocr-models>=0.1.0,<0.2 ; extra == 'ocr'
Provides-Extra: ocr
License-File: LICENSE
License-File: NOTICE
License-File: tools/arlington/model/LICENSE
Summary: A Python library, implemented in Rust, for complete control of PDF as ISO 32000-2 defines it.
Author-email: Yusuke Hayashi <yusuke8h@gmail.com>
License-Expression: MIT
Requires-Python: >=3.11
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Changelog, https://github.com/yhay81/pyropdf/blob/main/CHANGELOG.md
Project-URL: Documentation, https://pyropdf.haya.works/
Project-URL: Homepage, https://pyropdf.haya.works/
Project-URL: Issues, https://github.com/yhay81/pyropdf/issues
Project-URL: Source, https://github.com/yhay81/pyropdf

# pyropdf

pyropdf is a Python library, implemented in Rust, for complete control of
PDF as ISO 32000-2 defines it. It keeps a document on one versioned object
store that every engine reads, so an edit costs what it touches, every
change can be undone, and a failed transaction leaves the document as it
was.

**Status:** alpha, 0.2. The API may change between minor versions. Documentation:
<https://pyropdf.haya.works/>. [DESIGN.md](DESIGN.md) describes the
foundation, and [CHANGELOG.md](CHANGELOG.md) what each release holds.

```bash
pip install pyropdf
```

```python
import pyropdf

with pyropdf.open("input.pdf") as doc:
    page = doc.pages[0]
    print(page.text())
    page.pixmap(dpi=144).save("page-1.png")
    with doc.transaction("rotate"):
        page.rotation = 90
    doc.save("output.pdf", incremental=True)
```

0.2 reads text, words, layout, tables, images, and Markdown, runs offline
OCR, renders pages to pixmaps and SVG, edits pages and their boxes,
annotations, links, form fields, outlines, attachments, metadata, page
labels, and layers, removes hidden or active content, subsets fonts, and
saves incrementally or in full, with encryption. Drawing on a page with
`page.draw` comes in a later release.

## Safety claims

No pyropdf release claims safety for untrusted input before hayro's bounded
construction (I2, [#15](https://github.com/yhay81/pyropdf/issues/15)) is
released. `DocumentLimits` bounds the work of an operation, but it is not
that claim.

## Contributing

[CONTRIBUTING.md](CONTRIBUTING.md) explains how to build, test, and propose
a change, and [SECURITY.md](SECURITY.md) how to report a vulnerability.

