title: Not applying the CSS while generating PDF using iTextsharp.dll
body: <p>I am generating PDF using iTextSharp.dll, but the problem is that I am not able to apply that CSS. I have one div:</p>
  
  <pre><code> &lt;div id="personal" class="headerdiv"&gt;
        Personal Data
   &lt;/div&gt;
  </code></pre>
  
  <p>now my .aspx.cs code is like this:</p>
  
  <pre><code>   iTextSharp.text.html.simpleparser.StyleSheet styles = new         iTextSharp.text.html.simpleparser.StyleSheet();
  
      styles.LoadTagStyle("#headerdiv", "height", "30px");
      styles.LoadTagStyle("#headerdiv", "font-weight", "bold");
      styles.LoadTagStyle("#headerdiv", "font-family", "Cambria");
      styles.LoadTagStyle("#headerdiv", "font-size", "20px");
      styles.LoadTagStyle("#headerdiv", "background-color", "Blue");
      styles.LoadTagStyle("#headerdiv", "color", "White");
      styles.LoadTagStyle("#headerdiv", "padding-left", "5px");
  
      HTMLWorker worker = new HTMLWorker(document);
      worker.SetStyleSheet(styles);
  
  
      // step 4: we open document and start the worker on the document 
      document.Open();
      worker.StartDocument();
      // step 5: parse the html into the document      
      worker.Parse(reader);
      // step 6: close the document and the worker     
      worker.EndDocument();
      worker.Close();
      document.Close();
  </code></pre>