I have created a basic form in Designer 8 and saved the form as type Acrobat 7. The form contains 2 text fields and a submit button that submits data as XML. Following is my XML the form submits:
<?xml version="1.0" encoding="UTF-16"?>textatextb
When using the below routine, Aspose ImportXml() throws exception "Invalid xml format: expected FIELDS node element!" This seems that ImportXml is trying to import XFDF. Is this a possible bug?
private void ImportMyXml()
{
string inputFilePath = @"D:\qatest.m.qa-00208.pdf";
string outputFilePath = inputFilePath.Replace(".pdf", "_out.pdf");
string xmlFilePath = inputFilePath.Replace(".pdf", ".xml");
FileStream xmlInputStream = new FileStream(xmlFilePath, FileMode.Open);
Aspose.Pdf.Kit.Form form = new Aspose.Pdf.Kit.Form(inputFilePath, outputFilePath);
//Import the values from the XML file to the PDF form
form.ImportXml(xmlInputStream);
//Save the output PDF document
form.Save();
xmlInputStream.Close();
}