I have a dynamic XFA-based form that was developed in LiveCycle Designer. It was created using an XML structure as the data connection, and the fields are data-bound to that XML.
How should I use these approaches with an XFA form? Could you explain further what the process would be?
Yes, thanks, I had already looked at that link. The only solution I see offered there for filling a field on an XFA form is to manually assign values, which is why I asked the question to confirm. I didn’t see anything there about how to use the existing data binding information already present in the XFA form to fill fields when given an XML tree containing the data & wanted to be certain I hadn’t missed something.
Importing XML to XFA based forms
Do we have this functionality yet with a single call? OP had asked this on '15 so checking.
Yes, Aspose.PDF offers this functionality and you can find sample code in shared links as well. In case you need further assistance or facing any issue, please let us know.
Hi Asad, Can you post a working example for XFA form please? Non of the sample code allow me to fill XFA forms. Thanks
Would you kindly share your sample XML and PDF document with us. We will test the scenario in our environment using same code snippet in the shared links and let you know about our feedback. If there is any issue, we will log it and share the issue ID with you so that you can track it for resolution.
Please check following code snippet which we used with Aspose.PDF for .NET 20.11 and obtained the attached PDF document as output. You can notice that form fields are filled in the attached PDF.
var doc = new Document(dataDir + "MIR_form_v7.2.1b.pdf"); var form = new Facades.Form(); form.BindPdf(doc); form.ImportXml(new FileStream(dataDir + "sample.xml", FileMode.Open)); form.Save(dataDir + "output.pdf"); form.Dispose();
output.pdf (177.9 KB)
@asad.ali Thank you for quick turnaround. We were on holiday break so could not respond sooner.
Pls look at section 2.6 in particular.
@asad.ali I think I know where the problem is. Let me evaluate more and I will get back if there is anything else I have question about.
Sure, please take your time to evaluate the API and let us know if you need some assistance.
A post was merged into an existing topic: Cannot check checkbutton in XFA form