Other utilities⚓︎
PyPDFForm offers additional utilities similar to other PDF libraries.
This section of the documentation uses this PDF as an example.
Blank PDFs⚓︎
Use the BlankPage class with PdfWrapper to create blank PDFs.
The following example generates a PDF with a single blank page:
By default, BlankPage creates a letter-size blank page (612 x 792 points, or 8.5 x 11 inches). To change the dimensions, specify width and height in points:
Extract pages⚓︎
The PdfWrapper object has a .pages attribute, which is a PdfArray containing one PdfWrapper object per page:
Merge multiple PDFs⚓︎
Note
When merging PDF forms with duplicate field names, PyPDFForm automatically renames conflicting fields by appending a unique, randomly generated suffix. This means some field names in the merged PDF will differ from their original names.
To avoid automatic renaming, give duplicate fields unique names across all input PDFs before merging. See Change field name.
Change PDF version⚓︎
PyPDFForm allows you to set the PDF version to any supported value up to 2.0: