-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #526 from chinapandaman/PPF-524
PPF-524: simple fill docs
- Loading branch information
Showing
4 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Fill a PDF form in place (beta) | ||
|
||
**NOTE:** This page contains beta features, meaning it's known that these features do not support some PDF forms but | ||
currently there are no plans and/or solutions to fix them. | ||
|
||
The `FormWrapper` class allows you to fill a PDF form in place as if you were filling it manually. The resulted filled | ||
PDF form will NOT be flattened and will still be editable. | ||
|
||
Similar to the `PdfWrapper` class, the `FormWrapper` also supports widgets including text fields, checkboxes, radio | ||
buttons, dropdowns, and paragraphs. However, it does NOT support signature widgets. | ||
|
||
Consider [this PDF](https://github.com/chinapandaman/PyPDFForm/raw/master/pdf_samples/dropdown/sample_template_with_dropdown.pdf): | ||
|
||
```python | ||
from PyPDFForm import FormWrapper | ||
|
||
filled = FormWrapper("sample_template_with_dropdown.pdf").fill( | ||
{ | ||
"test_1": "test_1", | ||
"test_2": "test_2", | ||
"test_3": "test_3", | ||
"check_1": True, | ||
"check_2": True, | ||
"check_3": True, | ||
"radio_1": 1, | ||
"dropdown_1": 1, | ||
}, | ||
) | ||
|
||
with open("output.pdf", "wb+") as output: | ||
output.write(filled.read()) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ nav: | |
- prepare.md | ||
- inspect.md | ||
- fill.md | ||
- simple_fill.md | ||
- style.md | ||
- button_style.md | ||
- draw.md | ||
|