PdfFormFiller
Source Code: https://github.com/diafygi/pdfformfiller
Documentation: https://pdfformfiller.readthedocs.org/
This is a library that lets you easy insert text into a pdf. It is super useful when you need to prefill an existing pdf template (for example, a grant application form) with your own data.
pip install pdfformfiller
Once installed, you can add text fields to any pdf. You specify the bounding box of the field, and the text will auto-resize to fit within that rectangle.
from pdfformfiller import PdfFormFiller
filler = PdfFormFiller("myform.pdf")
filler.add_text(text, pagenum, (x1, y1), (x2, y2))
filler.write(outfile)
In order to determine the correct (x1, y1), (x2, y2) coordinates for your test field bounding box, we recommend dumping your existing pdf template to images with 72 dpi and using an image editor (like GIMP) to find the pixel coordinates of the rectangle you want your bounding box to be.
pdftoppm -png -r 72 myform.pdf myform-pages
Metadata
Release files for PdfFormFiller 0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| PdfFormFiller-0.4.tar.gz | 4.4 kB | Without provenance | Details for PdfFormFiller-0.4.tar.gz |
Release files / PdfFormFiller-0.4.tar.gz
| Download URL | PdfFormFiller-0.4.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d0da7e3abee4144035e68de3baadf8ba1edf243f064f63f449abd3a8394c75d3
|
|
BLAKE2b-256 checksum How to use checksums |
5c6d3a2f5d9d0f65130075c778d0f88e6cfdeef432fe864f2c1fb41423279dc5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for PdfFormFiller 0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.