Aspose.Pdf.Kit.Form ImportXML sample file

Hi

I am trying to import xml data to a pdf form. I have nodes with the name same as that of form fields but I get the error “Invalid xml element :Not Field!” . How do i map the form fields to xml nodes.

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

Importing XML data to Pdf form is pretty much simple using ImportXml function. Problem might be due to the fact that XML elements might not be properly tagged. Following code sample gives a simple illustration of importing data from XML file to

//Assign input and output PDF documents

Form form = new Form("student.pdf", "studentOut.pdf");

//Create an XML file as a FileStream that contains the contents of the PDF document

System.IO.FileStream xmlInputStream = new FileStream("student.xml", FileMode.Open);

//Import the values from the XML file to the PDF form

form.ImportXml(xmlInputStream);

//Save the output PDF document

form.Save();

//Close the input XML stream

xmlInputStream.Close();

For more information Kindly visit Import and Export into XML.Incase problem persists, please send your Xml.

Hi,

Can you please provide us with the xml file, pdf file and the source code that you are using so that we can test it.

Thanks.