Hi,
I have downloaded the Aspose Demos for ImportXml and it worked perfectly fine if I used the example files but it did not import any data onto my template of PDF. I created the xml file myself to follow the example xml file. Would you kindly advise me to fix the template setting so that I can import data from my xml file?
**The code I used:*********************************************************
Case "ImportXml" //Select statemen in the KitDemo(default) class
templatePdf = "C:\student.pdf"
Dim xml As String = "C:\student.xml"
Response.AddHeader("content-disposition", "inline; filename=" + "studentOut.pdf")
Response.ContentType = "application/pdf"
FormDemos.ImportXml(templatePdf, xml, Response.OutputStream)
Response.End()
Exit Sub
Public Shared Sub ImportXml(ByVal templatePdf As String, ByVal xml As String, ByVal outputStream As System.IO.Stream) // a function in the FormDemos Class, will be called in the KitDemo class
'Assign an input pdf file.
Dim form As Form = New Form(templatePdf, outputStream)
'Open an existed fdf file.
Dim xmlInputStream As System.IO.FileStream = New FileStream(xml, FileMode.Open)
'Export all the pdf fields' value into the fdf file.
form.ImportXml(xmlInputStream)
form.Save()
xmlInputStream.Close()
End Sub
***************************************************************************
Attached are the files I replaced with:
PDF file: F21.pdf
Xml file: F21xml_Fromdatabase
Thanks in advance!
Mikan