Metadata-Version: 2.4
Name: pyropdf
Version: 0.3.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-fonts-jp>=0.1.1,<0.2 ; extra == 'jp'
Requires-Dist: pylopdf-fonts-ko>=0.1.1,<0.2 ; extra == 'ko'
Requires-Dist: pylopdf-ocr-models>=0.1.0,<0.2 ; extra == 'ocr'
Requires-Dist: pylopdf-fonts-zh-cn>=0.1.1,<0.2 ; extra == 'zh-cn'
Requires-Dist: pylopdf-fonts-zh-tw>=0.1.1,<0.2 ; extra == 'zh-tw'
Provides-Extra: jp
Provides-Extra: ko
Provides-Extra: ocr
Provides-Extra: zh-cn
Provides-Extra: zh-tw
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:** 0.3. 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.3.0 reads text, words, layout, tables, images, fonts, and Markdown,
exports them as JSON or retrieval chunks, runs offline OCR, and renders
pages to pixmaps and SVG, drawing the CJK fonts that a document does not
embed in fallback faces. It draws paths and text in colors or gradients,
images, and pages, the text in Standard 14 or OpenType fonts, in color
glyphs and any weight of a variable face, with `page.draw`; edits pages and their boxes,
text, images, colors, annotations, links, form fields, outlines,
attachments, metadata, page labels, and layers; signs documents and verifies
signatures; removes hidden or active content and subsets fonts; and saves
incrementally, in full, or linearized, with encryption.

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

