Low-level Interface¶
Low-level library function to fill pdf forms.
Note
This function returns a generator.
If you don’t iterate the results, it won’t do anything.
- pdfforms.fill.fill_forms(prefix, field_defs, data, flatten=True)¶
Fill pdf forms.
- Parameters
prefix (str) – prefix for saving filled pdf files
field_defs – field definitions dictionary loaded from fields.json file
data (Mapping[str, Mapping[str, str]]) – a mapping of <pdfpath> -> (mapping of <field num> -> <data value>)
flatten (bool) – flatten output pdf files
- Returns
a generator of filled form file names. Be sure to iterate it or nothing will happen.
- Return type
Iterator[str]