title: how to preserve the look and feel when converting HTML to PDF
body: <p>I have been using iTextSharp to do a HTML to PDF conversion, overall it works fairly well, but it doesn't seem to be like most of the formatting.  </p>
  
  <p>Bold, Italic, and Underline are all working, however, none of the font sizes, styles or other information is respected, therefore the export doesn't look much at all like the HTML that was used to create the format.</p>
  
  <p>Does anyone know how to either</p>
  
  <ul>
  <li>fix the way the iTextSharp exports (below is a sample of my code)</li>
  <li>Or know of a different product that is out there that provides this functionality, and will not break the bank?</li>
  </ul>
  
  <p>This is my code:</p>
  
  <pre><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();
  }
  </code></pre>