Insert XDP into a PDF document

Hello,
I need to incorporate into an existing PDF document an XML structure similar to this one:

<xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">
      <xfa:data>
      ....
      </xfa:data>
</xfa:datasets>

Could you please confirm that the procedure explained [here](("[[BL]]https://docs.aspose.com/pdf/net/import-data-from-xml-into-pdf-file/[[/BL]]) is suitable to my needs?

Thank you

@maurit

Thanks for contacting support.

In order to import data from XML into PDF Forms using Aspose.Pdf, the XML structure should be as follows:

<?xml version="1.0" encoding="utf-8"?>
<fields>
<field name="textfield">
<value />
</field>
<field name="checkboxfield">
<value>Off</value>
</field>
<field name="comboboxfield">
<value />
</field>
<field name="listboxfield">
<value />
</field>
</fields>

However, we will really appreciate if you can please share the sample PDF document along with complete XML, so that we can log an investigation ticket in our issue tracking system and share our feedback with you accordingly.

I don’t have a pdf sample at the moment but it doesn’t really matter, since it could be any pdf file.
The XML structure though, has to be this one:

<xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">
<xfa:data>
<ClinicalDocument xmlns="urn:hl7-org:v3" ... >
...
</ClinicalDocument>
</xfa:data>
</xfa:datasets>

The specific content for each PDF will be inserted into the ClinicalDocument block.
It’s a XFA structure (Adobe XML Forms Architecture).

Thanks

@maurit,

The ImportXml method of the Form class has support of processing XFA structure (Adobe XML Forms Architecture). You can get a 30 day temporary license from the purchase portal and its option is available in step 5. A temporary license is a time-restricted full license that lets you test every aspect of the API before buying it. The evaluation version has a limitation to process only 4 elements of each collection. Please refer to these helping links: Apply license to Aspose.Pdf for .NET API and Download the latest version 17.12 of Aspose.Pdf for .NET API

Kindly let us know in case of any further assistance or queries.