I am struggling with processing PDF forms that contain XFA (XML Forms Architecture) elements. My current task involves automating the filling of these forms using Python. The main challenge I face is finding a library that can effectively handle both the extraction and filling of form fields in XFA forms.
The key requirements for the library are:
- It must support both static and dynamic XFA forms.
- After filling, the form must remain in XFA format and should allow further editing of the form fields.
I have already experimented with several libraries, including:
- PyPDF2
- pdfrw
- PyMuPDF
- Spire.PDF
- PDFMiner
- PikePDF
- Aspose.PDF
- PyPDFForm
While PikePDF initially appeared to be a viable solution, it ultimately fell short because the filled PDFs become flattened and non-editable, which does not meet my needs. Therefore, I am seeking recommendations for a Python library that can fulfill these requirements effectively.
Although solutions in Python are preferable, I am open to suggestions involving C# or JavaScript libraries, as these technologies are also involved in the project.
Any guidance or suggestions would be greatly appreciated.
Diana Sihuta is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.