-
I'm just curious, is this a limitation of PDFs in general or specific to MuPDF? I can accomplish what I want to accomplish by reading all the field data from one file, and then adding brand new fields to the PDF that I need them added to after inserting the blank page. Obviously it would be a tiny bit less cumbersome if form fields could just be copied directly from the source PDF. Not expecting anything to change in PyMuPDF, just curious about why the docs mention, "Form fields can never be copied", and where that limitation comes from. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Form fields, like annotations, are specific to the page for which they are defined. |
Beta Was this translation helpful? Give feedback.
Form fields, like annotations, are specific to the page for which they are defined.
But in contrast to them, widgets also are listed document-wide in a central dictionary called
/AcroForm
in the PDF's catalog. The fact that the array/AcroForm/Fields
is not empty determines whether the PDF is a Form PDF. Other information may also be present in AcroForm like inter-field relationships and more.Bottom line, like all document-wide, non-page related information and objects, widget-related information cannot be copied by a page-wise operation line
.insert_pdf()
- it is impossible to convert the receiving PDF into a Form PDF.The same is true for a number of other document-wide objects and pro…