title: itextsharp "the document has no pages" error when i have anchor tag
body: <p>I am converting some html to pdf. It is working fine but when i have anchor tag in my html i get error the document has no pages</p>
  
  <p>My code is </p>
  
  <pre><code> byte[] data;
   using (var sr = new StringReader(sw.ToString()))
   {
      var st = new StyleSheet();
  
      GetStyleSheetForUnicodeCharacters(st);
      using (var ms = new MemoryStream())
      {
         using (var pdfDoc = new Document())
         {                            
             using (var w = PdfWriter.GetInstance(pdfDoc, ms))
             {
                pdfDoc.Open();
                var parsedHtmlElements = HTMLWorker.ParseToList(sr, st);
                foreach (var htmlElement in parsedHtmlElements)
                {
                   pdfDoc.Add(htmlElement as IElement);
                }
                pdfDoc.Close();
                data = ms.ToArray();
             }
         }
      }
   }
  </code></pre>