Djfrederick
New Member
Suppose I have an xml file say myXML.xml and I have to convert it into pdf file say myPDF.pdf. I am trying to use itextsharp dll, but not able to do so.XML file has following contents\[code\]<Person1> <Name>ABC</Name> <Age>34</Age></Person1><Person2> <Name>XYZ</Name> <Age>22</Age></Person2> \[/code\]Please suggest me the solutionUpdate: I am using following code:\[code\]protected void Page_Load(object sender, EventArgs e) { Document document = new Document(); PdfWriter.GetInstance(document, new FileStream("ExampleDoc.pdf", FileMode.Create)); ITextHandler xmlHandler = new ITextHandler(document); xmlHandler.Parse("ExampleDoc.xml"); }\[/code\]But I am getting error here: \[code\]ITextHandler xmlHandler = new ITextHandler(document);\[/code\]Errro is: missing directive or assembly referenceI am using following directives\[code\]using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using System.IO;using iTextSharp;using iTextSharp.text;using iTextSharp.text.xml;using iTextSharp.text.pdf;\[/code\]