Metadata-Version: 2.4
Name: pyropdf
Version: 0.1.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 the successor of [pylopdf](https://github.com/yhay81/pylopdf):
a Python library, implemented in Rust, for complete control of PDF as
ISO 32000-2 defines it. It keeps pylopdf's concept and replaces its
foundation with 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. 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)
```

The 0.1 releases read text, words, layout, tables, and Markdown, run
offline OCR, render pages to pixmaps and SVG, edit pages, annotations,
links, form fields, outlines, and attachments, and save 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.

