Metadata-Version: 2.4
Name: formalpdf
Version: 0.1.1
Summary: An Apache-licensed package for extracting, creating, filling, and flattening PDF Forms.
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pypdfium2==5.0.0b2
Dynamic: license-file

# formalpdf

`formalpdf` is an Apache-licensed python library for PDF forms.
It's a unified API for extracting, creating, filling, and flattening forms. 
It has a similar, but _not_ drop-in, high-level API to PyMuPDF.
All of this is possible by wrapping `pdfium`, thanks to the low-level bindings made available through `pypdfium2`.

## Installation


```sh
uv pip install formalpdf
```

## Usage

### Get All `Widget` Objects in a PDF

```py
from formalpdf import Document

doc = Document("/path/to/your.pdf")

for page in doc:
    widgets = page.widgets()
```

### Navigating Unsupported Operations

You can access the raw `PdfDocument` from `pypdfium2` using by calling:

```py
from formalpdf import Document

doc = Document("/path/to/your.pdf")

pdfium_doc = doc.document
```

You can use this to do lower-level operations that aren't yet supported by `formalpdf`.

## Roadmap

- [ ] create PyPI package
- [ ] finish widget extraction 
- [ ] widget updating
- [ ] widget creation
- [ ] tests
