Hi Shahzad,
I have tried with a small example as per your instruction with version 4.3.0 and here is my souce code
public static void ImportXml()
{
Form form = new Form(@"C:\Temp\WebApplication1\WebApplication1\PTO-SB-01 v04-09.pdf", @"C:\Temp\WebApplication1\WebApplication1\PTO-SB-01 v04-09OUT.pdf");
//Create an XML file as a FileStream that contains the contents of the PDF document
System.IO.FileStream xmlInputStream = new FileStream(@"C:\Temp\WebApplication1\WebApplication1\InputXml.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();
}
I am attaching the output PDF file(PTO-SB-01 v04-09OUT.pdf) along with template PDF (PTO-SB-01 v04-09.pdf) and input Xml (InputXml.xml). You can see that output PDF has all fields filled excepting checkboxes.
In my templatePDF, all the checkboxes are defined with the same name "CheckBox1". Could this be the cause of problem?
Also, I have noticed the format of XML in the demo suggested by you is something like this
<?xml version="1.0" encoding="utf-8" ?>
<fields>
<field name="Telephone">
<value>888.277.6734</value>
</field>
...
...
</fields>
Whereas my input xml used in the above example is in format as below
<?xml version="1.0" encoding="utf-8"?>
http://www.w3.org/1999/XSL/Format">
PAT-0001-US-PSP
...
...
Off
...
On
...
...
http://www.xfa.org/schema/xfa-data/1.0/" />
Please advice if this is valid input xml.
Thanks & Regards,
Dinesh