title: Error in C# code while using ITextSharp
body: <p>I am using code from other <a href="https://stackoverflow.com/questions/2822843/itextsharp-html-to-pdf">question</a> and i am getting the error as</p>
  
  <blockquote>
    <p>Error 1   The non-generic type
    'iTextSharp.text.List' cannot be used
    with type arguments</p>
    
    <p>Error 2   The name 'HTMLWorker' does not
    exist in the current context  </p>
    
    <p>Error 3   The type or namespace name
    'HTMLWorker' could not be found (are
    you missing a using directive or an
    assembly reference?)</p>
  </blockquote>
  
  <p>My code so far is as follows:</p>
  
  <pre><code>protected void Button2_Click(object sender, EventArgs e)
  {
      //Extract data from Page (pd).
      Label16.Text = Editor1.Content; // Attribute    
  
      // makae ready HttpContext
      HttpContext.Current.Response.Clear();
      HttpContext.Current.Response.ContentType = "application/pdf";
  
      // Create PDF document
      Document pdfDocument = new Document(PageSize.A4, 80, 50, 30, 65);
      //PdfWriter pw = PdfWriter.GetInstance(pdfDocument, HttpContext.Current.Response.OutputStream);
      PdfWriter.GetInstance(pdfDocument, HttpContext.Current.Response.OutputStream);
  
      pdfDocument.Open();
      //WebClient wc = new WebClient();
      string htmlText = Editor1.Content;
  
      List&lt;IElement&gt; htmlarraylist = HTMLWorker.ParseToList(new StringReader(htmlText), null);
      for (int k = 0; k &lt; htmlarraylist.Count; k++)
      {
          pdfDocument.Add((IElement)htmlarraylist[k]);
      }
  
      //pdfDocument.Add(new Paragraph(IElement));
      pdfDocument.Close();
      HttpContext.Current.Response.End();
  </code></pre>
  
  <p>}</p>
  
  <p>Please Help me to resolve the error. What i am trying is to get the contents (non html) from htmleditor and display in a pdf file. please confirm me whether what i am trying to do is correct or not.</p>