Skip to content

hesrerem/pdffill

Repository files navigation

pdffill

pdffill is a Python library/tool to fill any PDF template page with text and simple graphics. It requires pdfrw (to read pdf) and reportlab (to print on and write out PDF). The position of the insert spots and the content can either be simple text files or python dictionaries. A common use case is generating a PDF using a template and content/decisions from an HTML form, which can easily be done with an CGI program.

The ODT source (tpl.odt) and generated PDF (tpl.pdf) of a simple template is provided. With the position information (tpl.pos) data (tpl.dat) can be put on that PDF template. A sample out.pdf is generated by executing $ python pdffill.py which accepts commandline arguments and is a shortcut for $ python pdffill.py tpl.dat tpl.pos tpl.pdf out.pdf In addition, there is a pdffill.cgi and tpl.html which demonstrates the usage as CGI-program. tpl.dat is replaced by tplcgi.dat, which includes more information that is filtered by the CGI-processing and may include choice-information that will not be rendered but just processed.

Hopefully, the examples are self explanatory. There is no command overview. However, the examples should cover all of what is available.

Have fun

Sources

About

pdffill to fill PDF templates with text and simple graphics from the command line, python or an HTTP POST request (a form) with CGI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published