Nov 12, 2013 It seems that I am not getting proper XML mapped document when I try to convert PDF to XML. You need to us the 'itextsharp. '.xml'); // Convert PDF. I have requirement like need to convert xml to PDF from my. Want to convert to a PDF? By using iTextSharp dll converting xml to pdf in table.
Itext Convert Html To Pdf
C# Itextsharp Html To Pdf
I'm trying to use the most recent version of ITextSharp to turn an XML file into a PDF. It isn't working.
Adobe Acrobat
The documentation on SourceForge doesn't seem to have kept up with the actual releases; the code in the provided example won't even compile under the newest version. Here is my test XML: BlueCross Maricopa 20156789 NPIGOESHERE Patient Name 000315 125.57 55.75 35 And here is the code I'm attempting to use to turn that into a PDF. Document doc = new Document(PageSize.LETTER, 36, 36, 36, 36); iTextSharp.text.pdf.PdfWriter.GetInstance(doc, new StreamWriter(fileOutputPath).BaseStream); doc.Open; SimpleXMLParser.Parse((ISimpleXMLDocHandler)doc, new StreamReader(fileInputPath).BaseStream); doc.Close; Now, I was pretty sure the (ISimpleXMLDocHandler)doc piece wasn't going to work, but I can't actually find anything in the source that both a) implements ISimleXMLDocHandler and b) will accept a standard XML document and parse it to PDF. FYI- I did try an older version which would compile using the example code from sourceforge, but it wasn't working either.
How to create pdf from an xml file using itextsharp in c#. My xml file is as follows: Sep-11-2012 P001 Brahma Acharya BBSR 0 Mar-26-2012 Male 65 inches 75 Kg 120/80 mm Hg Fasting Blood Sugar 85.0 mg/dl 70.0 - 110.0 S. Urea 26.0 mg/dl 15.0 - 40.0 Eye Color Black Black The header part is the header of the document and Tests should be in table format.
Thanks Nalini.