Pdf Forms - Export XML - Difference with Adobe Reader

Hello,


I have problem with Export PDF Form to XML.
The file from Aspose is different compare to createing manually from Adobe Reader.

My code:
var formTest = new Form(new MemoryStream(file_bytes));
formTest.ExportXml(myStream);

I would like to know if it is ok and I have to create mapping our XML.

I attached my PDF file and two exports - from Aspose and from Adobe Reader.

Thanks in advance :slight_smile:

Hi Mateusz,

Thanks for contacting support.

Can you please share some details on how you are export PDF form data to XML format using Adobe Acrobat. Please note that I have tried exporting data to XML using Adobe Acrobat but I am getting Insufficient permission error.

Please share the details, so that we can further test the scenario in our environment. We are sorry for this inconvenience.

[C#]

Aspose.Pdf.Facades.Form form = new Aspose.Pdf.Facades.Form();

form.BindPdf("c:/pdftest/pdf-forms.pdf");

form.ExportXml(new System.IO.FileStream("c:/pdftest/ExportedXML.xml", FileMode.OpenOrCreate));

form.Close();

Hi,


It’s two options to export data like I want (no “save as” like did you).
In the newest Adobe Reader DC:
Menu Edit -> Form option -> Export data
or in a little older:
Extension Tab -> Form -> Export data

Hi Mateusz,


Thanks for sharing the details.

I have tested the scenario and have managed to reproduce same problem. For the sake of correction, I have logged it as PDFNET-42240 in our issue tracking system. We will further look into the details of this problem and will keep you posted on the status of correction. Please be patient and spare us little time. We are sorry for this inconvenience.

Hi,

What is the progress? I have the similar problem.

My easy work around:

[C#]

var sign = new PdfFileSignature();

sign.BindPdf(form.Document);

sign.RemoveUsageRights();

var dataSet = form.Document.Form.XFA.Datasets;

var xDocument = XDocument.Parse(Xml);

dataSet.ChildNodes[0].InnerXml = xDocument.ToString();

But when I’ll open the pdf in AdobeReader I can’t save changes. Is it document security?

I can do this in PDF-XChange Viewer (https://www.howtogeek.com/howto/29434/how-to-save-fillable-form-data-in-pdfs/)

Thanks in advance

Hi Hezi,

Thanks for contacting support.

I am afraid the earlier reported issue is pending for review and is not yet resolved. However your above stated details are associated with issue details and product team will surely consider them during the investigation phase. As soon as we have some further updates, we will let you know. Please be patient and spare us little time. We are sorry for this inconvenience.