title: Ordered lists in HTML to PDF conversion using iTextSharp (C#, MVC)
body: <p>I'm trying to convert some HTML code into PDF file using iTextSharp. And It's working with one problem. I have some ordered lists and they are displaying but without bullets/numbers (I tested both OL and UL) and I can't figure out how to do this without manually parsing HTML code and inserting numbers at the beginning of each li element.</p>
  
  <pre><code>_topic.Body = "&lt;ol&gt;&lt;li&gt;First&lt;/li&gt;&lt;li&gt;Second&lt;/li&gt;&lt;/ol&gt;";
  
  using (FileStream msOutput = new FileStream("file.pdf", FileMode.Create))
  {
      TextReader reader = new StringReader(_topic.Body);
      Document document = new Document(PageSize.A4, 30, 30, 30, 30);
      PdfWriter writer = PdfWriter.GetInstance(document, msOutput);
      HTMLWorker worker = new HTMLWorker(document);
  
      document.Open();
      worker.StartDocument();
      worker.Parse(reader);
      worker.EndDocument();
      worker.Close();
      document.Close();
  }
  </code></pre>