wesnick / fdf-utility
FDF File Utility for PDF Forms
Installs: 22 893
Dependents: 1
Suggesters: 0
Security: 0
Stars: 9
Watchers: 5
Forks: 3
Open Issues: 0
Requires
- php: >=7.1
- symfony/process: ^4.4 | ^5.4
Requires (Dev)
- ext-iconv: *
- phpunit/phpunit: ^7.5 | ^8.5 | ^9.5
- symfony/console: ^4.4 | ^5.4
README
This library produces FDF files for PDF Forms.
Left to finish
- add additional validation and tests for invalid configurations
- implement signature field support
Usage
Console Usage -
- Generate CSV Export from PDF
$ /path/to/fdf-utility/bin/fdf wesnick:fdf:csv-export /path/to/my/pdf.pdf path/to/my/csv/csv --pdftk=/path/to/pdftk
- Generate Example Filled PDF
$ /path/to/fdf-utility/bin/fdf wesnick:fdf:example-pdf /path/to/my/emtpy-pdf.pdf path/to/my/filled-pdf.pdf --pdftk=/path/to/pdftk
You can also use the lirbary's components directly. The class PdfForm is a useful reference point.
Installation
Use composer.
composer require wesnick/fdf-utility
Requirements
- PHP 7.1 or higher
- Symfony Process (>=4.4 or >=5.4)
- Symfony Console (dev, >=4.4 or >=5.4)
For PHP versions lower than 7.1 use the release v0.5.0
For Symfony versions between >=3.3 and <4.4 use the release v0.5.0
For Symfony versions between >=2.3 and <3.3 use the release v0.4.3
Acknowledgements
Much of the code for creating FDF files is based on Sid Steward's PDF work -- http://www.pdflabs.com The test pdf form is borrowed from active_pdftk, as well as some ideas about how to handle pdftk field dumps
Contributing
Fork and issue a Pull Request.
Running the Tests
$ phpunit
License
Released under the MIT License. See the bundled LICENSE file for details.