Import / Export - XML Data with PDF

I have been evaluating the Pdf.Kit and created a PDF form using Adobe LiveCycle Designer - the Aspose included demo program to export XML data works OK - but if I try the import XML demo program the destination PDF does not include the XML data.

Hello Micvad,

Thanks for considering Aspose.

Please visit Import and Export into XML in order to have more clear understanding of how Aspose.Pdf.Kit deals with XML.
If it does not resolve your issue, kindly send us the resource files.

Hi,

in the first post I have attached the PDF file. With this post I attach the XML file created by the Export XML function.

The XML does not look like the ones you describe in the documentation.

After I have done the export til XML, I try to import the same XML file into the PDF - and this result in a new PDF file, but with no data included in the form fields.

I hope this helps you.

Thanks,

Michael

Hello Michael,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for considering Aspose.

We have received your resource files and currently we are looking into this matter, and we will shortly let you update in this regard.

Dear Michael,

Thanks for considering Aspose.Pdf.Kit.

The problem has been reproduced. Exporting is OK, but Importing did nothing. It has been registed in our bug system as PDFKITNET-5217, and the ETA is 2 weeks.

Best regards.

Thank you for the reply.

What about the format - in your example (demo) the XML is much more simple: FieldName and Value - could that also be the case for the example I send you?

Best regards,

Michael

Dear micvad,

The answer is YES. ExportXml/ImportXml have been upgraded for complex XML format adopted in XFA forms.

Best regards.

Hi,

another issue to the ExportXML - if you create a PDF form - with Abobe Acrobat - and the end-user uses Adobe Reader to fill out the form - it is not possible to save the form + data.

How can ExportXML then be used to get the information into a XML file? I suppose that for the function to work - the file must be saved to disk or ?

Thanks,

Michael

Dear Michael,

FYI, if the data won't be saved, ExportXml( ) can do nothing with the document. To export data, the file should be saved in the disk or just in a stream.

Best regards.

Hi,

how in a stream? does that mean that end-users must have Adobe Acrobat - and that Adobe Reader is insufficient?

Best regards,

Michael

Hello Michael,

Stream here means Stream object holding PDF file in open mode. It has no concern with the Adobe Acrobat or Acrobat Reader.

Hi,

how is that implemented - if I create at PDF form, and the end-user must fill-out the form, and then I have to use ExportXML to get the data that the end-user wrote into the form?

Best regards

Michael

Hello Michael,

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

As specified by lukeyoyo in above posts, ExportXML() only works if the File is saved or is in Output stream that can also be generated through some source Pdf, which in fact must be saved or some particular location. The scenario you mentioned is not supported. Data cannot be exported on the fly.

Dear Michael,

I am glad to inform you that this problem has been solved. It will be included in the next version. And any other question is sincerely welcomed.

Best regards.