So I have been using iTextSharp to do a HTML -> PDF conversion, overall it works fairly well, but it doesn't seem to be liking most of the formatting. Bold, Italic, and Underline are all working, however, none of the font sizes, styles or other information is being followed, therefore the export doesn't look much at all like the HTML that was used to create the format.
Does anyone know how to either, fix the way the iTextSharp is exporting, below is a sample of my code. Or know of a different product that is out there that provides this functionality, and will not break the bank?
My Code
//Do the PDF thing
Document document = new Document(PageSize.A4);
using (Stream output = new FileStream(Server.MapPath(relDownloadDoc), FileMode.Create, FileAccess.Write, FileShare.None))
using (Stream htmlStream = new FileStream(Server.MapPath(relProcessingDoc), FileMode.Open, FileAccess.Read, FileShare.Read))
using (XmlTextReader reader = new XmlTextReader(htmlStream))
{
reader.WhitespaceHandling = WhitespaceHandling.None;
PdfWriter.GetInstance(document, output);
document.Open();
Console.ReadLine();
HtmlParser.Parse(document, reader);
document.Close();
}