title: itextshart Font size too small: 0 error
body: <p>I am trying to create a pdf file from the html content. Yet, there is a matter that prevent it this is <strong>Font size too small: 0</strong> error when ı click the button in
         hw.Parse(new StringReader(HTML)); line. </p>
  
  <p>please help me how can ı solve this matter.</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Web;
  
   namespace PTCreportingProject.PDF
  {  
  public class CreatePDFReport
  {
      private string htmlContent = "";
  
      public string createReport()
      {
          string res = "";
          res = prepareHeader();
              return res;
      }
      private string prepareHeader()
      {
          string hed = "";
          System.Text.StringBuilder sbHtml = new System.Text.StringBuilder();
          sbHtml.Append("&lt;!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'&gt;");
          sbHtml.Append("&lt;html xmlns='http://www.w3.org/1999/xhtml'&gt;");
          sbHtml.Append("&lt;head&gt;&lt;title&gt;");
          sbHtml.Append("&lt;/title&gt;");
          sbHtml.Append(" &lt;style type='text/css'&gt;");
          sbHtml.Append("  .style16 { width: 80%;  margin-left: auto; margin-right: auto; border-color: red; }");
          sbHtml.Append(".style19  { border-color: red; }");
          sbHtml.Append(".style30 {  width: 35px;  border-color: red;  }");
          sbHtml.Append("  .style31 { border-color: red;  }");
          sbHtml.Append(".style41 { border-color: red; }");
          sbHtml.Append(" .style55  { height: 23px;  border-color: red; }");
          sbHtml.Append(".style56  { border-color: red; }");
          sbHtml.Append(".style59  { border-color: red; }");
          sbHtml.Append(" .style60  {  width: 66px; border-color: red; }");
          sbHtml.Append(".style62 {  height: 27px; border-color: red; }");
          sbHtml.Append(" .style63  {  height: 26px; border-color: red; }");
          sbHtml.Append(".style95 { width: 92px; border-color: red;}");
          sbHtml.Append(".style100 {  width: 123px;  border-color: red; }");
          sbHtml.Append(".style101{ width: 195px; border-color: red; }");
          sbHtml.Append(" .style102 { width: 192px;  border-color: red; }");
          sbHtml.Append(".style103 { border-color: red; }");
          sbHtml.Append(" .style104 { border-color: red; }");
          sbHtml.Append(" .style106 {  width: 113px; height: 7px;  border-color: red; }");
          sbHtml.Append("  .style107 { width: 169px; border-right: #ff0000 1pt solid; border-left-color: red; border-top-color: red; border-bottom-color: red; }");
          sbHtml.Append("  .style108 { width: 113px;  height: 12px; border-color: red; }");
          sbHtml.Append("  .style109 { width: 366px; height: 12px; border-color: red; }");
          sbHtml.Append(" .style110 { height: 7px; border-color: red; }");
          sbHtml.Append("   .style111 { width: 77px; border-color: red; }");
          sbHtml.Append("   .style112 { width: 506px; border-color: red; }");
          sbHtml.Append("   .style114 { width: 87px; border-color: red; }");
          sbHtml.Append(" .style116 { width: 82px; border-color: red; }");
          sbHtml.Append(" .style117 { width: 137px; border-color: red; }");
          sbHtml.Append(" .style150 { width: 83px; border-color: red; }");
          sbHtml.Append(" .style161 {  width: 165px; border-color: red; }");
          sbHtml.Append(".style167 { width: 138px; border-color: red; }");
          sbHtml.Append("  .style177 { width: 162px; border-color: red; }");
          sbHtml.Append(" .style181 { width: 157px; border-color: red; }");
          sbHtml.Append(" .style185 { width: 180px; border-color: red; }");
          sbHtml.Append(".style189 { width: 35px; border-color: red; }");
          sbHtml.Append(" .style190 { width: 100px;  border-color: red; }");
          sbHtml.Append(".style191 { width: 91px; border-color: red; }");
          sbHtml.Append(" .style192 { width: 35px; border-color: red; }");
          sbHtml.Append(" &lt;/style&gt;");
          sbHtml.Append("&lt;/head&gt;");
          sbHtml.Append("&lt;body&gt;");
          sbHtml.Append("&lt;form method='post' action='EngineeringChangeNoticeReport.aspx' id='form1'&gt;");
          sbHtml.Append(" &lt;table width='80%' align='center'&gt;");
          sbHtml.Append(" &lt;tr&gt;");
          sbHtml.Append("&lt;td&gt;");
          //sbHtml.Append("&lt;img id='Image1' src='images/mikes.png' style='height:51px;width:163px;' /&gt;");
          sbHtml.Append(" &lt;/td&gt;");
          sbHtml.Append("&lt;td&gt;");
          sbHtml.Append(" &lt;h2 &gt;");
          sbHtml.Append("&lt;span id='Label29' style='color:Red;'&gt;ENGINEERING CHANGE NOTICE&lt;/span&gt;");
          sbHtml.Append(" &lt;/h2&gt;");
          sbHtml.Append("&lt;/td&gt;");
          sbHtml.Append("&lt;/tr&gt;");
          sbHtml.Append(" &lt;/table&gt;");
          sbHtml.Append(" &lt;table class='style16' border='1' cellpadding = '0' cellspacing ='0'&gt;");
          sbHtml.Append("&lt;tr&gt;");
          sbHtml.Append("&lt;td class='style108'&gt;");
          sbHtml.Append("  &lt;span id='Label1' style='color:Red;'&gt;Class of Change&lt;/span&gt;");
          sbHtml.Append(" &lt;/td&gt;");
          sbHtml.Append(" &lt;td class='style109'&gt;");
          sbHtml.Append(" &lt;span id='Label2' style='color:Red;'&gt;Priority&lt;/span&gt;");
          sbHtml.Append(" &lt;/td&gt;");
          sbHtml.Append(" &lt;td class='style104' rowspan='2' colspan='2'&gt;  &lt;span id='Label3' style='color:Red;font-size:XX-Large;font-weight:bold;'&gt;ECN NO:&lt;/span&gt; &lt;span id='Label48' style='font-size:X-Large;'&gt;aaa&lt;/span&gt;  &lt;/td&gt;");
          sbHtml.Append(" &lt;/tr&gt;");
          sbHtml.Append(" &lt;tr&gt;");
          sbHtml.Append("&lt;td class='style108'&gt; &lt;input id='CheckBox1' type='checkbox' name='CheckBox1' checked='checked' /&gt;&lt;label for='CheckBox1'&gt;I&lt;/label&gt;  &lt;/td&gt;");
          sbHtml.Append(" &lt;td class='style109'&gt; &lt;span id='Label50'&gt;&lt;/span&gt;  &lt;/td&gt;");
          sbHtml.Append("&lt;/tr&gt;");
          sbHtml.Append(" &lt;tr&gt; &lt;td class='style106'&gt;  &lt;input id='CheckBox2' type='checkbox' name='CheckBox2' /&gt;&lt;label for='CheckBox2'&gt;II&lt;/label&gt; &lt;/td&gt;  &lt;td class='style110' colspan='3'&gt;  &amp;nbsp;&lt;/td&gt;  &lt;/tr&gt;");
          sbHtml.Append(" &lt;tr&gt; &lt;td class='style107' colspan='3'&gt; &lt;span id='Label4' style='color:Red;'&gt;Project Code/Name:&lt;/span&gt;  &lt;span id='Label51'&gt;aaa&lt;/span&gt; &lt;/td&gt;  &lt;td class='style19'&gt;  &lt;span id='Label5' style='color:Red;'&gt;Releted ECRs&lt;/span&gt;  &lt;span id='Label53'&gt;aaa&lt;/span&gt; &lt;/td&gt; &lt;/tr&gt;");
          sbHtml.Append(" &lt;tr&gt; &lt;td class='style107' colspan='3'&gt; &lt;span id='Label6' style='color:Red;'&gt;Requested by:&lt;/span&gt; &lt;span id='Label52'&gt;aaa&lt;/span&gt; &lt;/td&gt; &lt;td class='style19'&gt; &lt;span id='Label7' style='color:Red;'&gt;Date:&lt;/span&gt; &lt;span id='Label54'&gt;03.04.2012&lt;/span&gt; &lt;/td&gt; &lt;/tr&gt;");
          sbHtml.Append("&lt;/table&gt;");
  
  
          sbHtml.Append(" &lt;table class='style16' border='1' cellpadding = '0' cellspacing ='0'&gt;");
          sbHtml.Append(" &lt;tr&gt; &lt;td class='style55' colspan='6'&gt; &lt;span id='Label14' style='color:Red;'&gt;Material / Affected Item&lt;/span&gt; &lt;/td&gt; &lt;/tr&gt;");
          sbHtml.Append("  &lt;tr&gt; &lt;td class='style114'&gt; &lt;span id='Label15' style='color:Red;'&gt;PART NO&lt;/span&gt; &lt;/td&gt;");
          sbHtml.Append(" &lt;td class='style150'&gt; &lt;span id='Label16' style='color:Red;'&gt;on Order&lt;/span&gt; &lt;/td&gt;");
          sbHtml.Append(" &lt;td class='style116'&gt; &lt;span id='Label17' style='color:Red;'&gt;in Process&lt;/span&gt; &lt;/td&gt;");
          sbHtml.Append(" &lt;td class='style111'&gt; &lt;span id='Label18' style='color:Red;'&gt;in Stock&lt;/span&gt; &lt;/td&gt;");
          sbHtml.Append(" &lt;td class='style117'&gt; &lt;span id='Label19' style='color:Red;'&gt;in Next Higher Assy&lt;/span&gt; &lt;/td&gt;");
          sbHtml.Append(" &lt;td class ='style56'&gt; &lt;span id='Label20' style='color:Red;'&gt;Customer Accepted&lt;/span&gt; &lt;/td&gt; &lt;/tr&gt;");
          sbHtml.Append(" &lt;tr&gt; &lt;td class='style114'&gt; aaa &amp;nbsp;&lt;/td&gt;");
          sbHtml.Append(" &lt;td class='style150'&gt; aaa &amp;nbsp;&lt;/td&gt;");
          sbHtml.Append(" &lt;td class='style116'&gt; aaa &amp;nbsp;&lt;/td&gt;");
          sbHtml.Append(" &lt;td class='style111'&gt; aaa &amp;nbsp;&lt;/td&gt;");
          sbHtml.Append("&lt;td class='style117'&gt; aaa &amp;nbsp;&lt;/td&gt;");
          sbHtml.Append(" &lt;td class='style30'&gt; aaa &amp;nbsp;&lt;/td&gt; &lt;/tr&gt;");
          sbHtml.Append(" &lt;/table&gt;");
          sbHtml.Append(" &lt;table class='style16' border='1' cellpadding = '0' cellspacing ='0'&gt;");
          sbHtml.Append(" &lt;tr&gt; &lt;td class='style41' colspan='7'&gt; &lt;span id='Label21' style='color:Red;'&gt;Affected End Item/Seial Item&lt;/span&gt; &lt;/td&gt; &lt;/tr&gt;");
          sbHtml.Append("&lt;tr&gt; &lt;td class='style161'&gt; &lt;span id='Label22' style='color:Red;'&gt;Part No&lt;/span&gt; &lt;/td&gt;");
          sbHtml.Append(" &lt;td class='style177'&gt; &lt;span id='Label23' style='color:Red;'&gt;Conform&lt;/span&gt; &lt;/td&gt;");
          sbHtml.Append(" &lt;td class='style181'&gt; &lt;span id='Label24' style='color:Red;'&gt;Rework&lt;/span&gt; &lt;/td&gt;");
          sbHtml.Append(" &lt;td class='style185'&gt; &lt;span id='Label25' style='color:Red;'&gt;Use&lt;/span&gt; &lt;/td&gt;");
          sbHtml.Append(" &lt;td class='style167'&gt; &lt;span id='Label26' style='color:Red;'&gt;Retrofit&lt;/span&gt; &lt;/td&gt;");
          sbHtml.Append("&lt;td class='style189' align='center'&gt; &lt;span id='Label27' style='color:Red;'&gt;Old CS&lt;/span&gt; &lt;/td&gt;");
          sbHtml.Append(" &lt;td class='style189' align='center'&gt; &lt;span id='Label28' style='color:Red;'&gt;New CS&lt;/span&gt; &lt;/td&gt; &lt;/tr&gt;");
          sbHtml.Append(" &lt;tr&gt; &lt;td class='style161'&gt; aaa &amp;nbsp;&lt;/td&gt;");
          sbHtml.Append("&lt;td class='style177'&gt; aaa &amp;nbsp;&lt;/td&gt;");
          sbHtml.Append(" &lt;td class='style181'&gt; aaa &amp;nbsp;&lt;/td&gt;");
          sbHtml.Append("&lt;td class='style185'&gt; aaa &amp;nbsp;&lt;/td&gt;");
          sbHtml.Append("&lt;td class='style167'&gt; aaa &amp;nbsp;&lt;/td&gt;");
          sbHtml.Append(" &lt;td class='style189'&gt; aaa &amp;nbsp;&lt;/td&gt;");
          sbHtml.Append(" &lt;td class='style189'&gt; aaa &amp;nbsp;&lt;/td&gt; &lt;/tr&gt;");
          sbHtml.Append("&lt;/table&gt;");
          sbHtml.Append(" &lt;table class='style16' border='1' cellpadding = '0' cellspacing ='0'&gt;");
          sbHtml.Append(" &lt;tr&gt; &lt;td class='style31' colspan='5'&gt; &lt;span id='Label8' style='color:Red;'&gt;Documents&lt;/span&gt; &lt;/td&gt; &lt;/tr&gt;");
          sbHtml.Append("&lt;tr&gt; &lt;td class='style191'&gt; &lt;span id='Label9' style='color:Red;'&gt;Prefix&lt;/span&gt; &lt;/td&gt;");
          sbHtml.Append(" &lt;td class='style190'&gt; &lt;span id='Label10' style='color:Red;'&gt;Number&lt;/span&gt; &lt;/td&gt;");
          sbHtml.Append(" &lt;td class='style112'&gt; &lt;span id='Label11' style='color:Red;'&gt;Description&lt;/span&gt; &lt;/td&gt;");
          sbHtml.Append("&lt;td class='style192' align='center'&gt; &lt;span id='Label12' style='color:Red;'&gt;Old Rev&lt;/span&gt; &lt;/td&gt;");
          sbHtml.Append(" &lt;td class='style30' align='center'&gt; &lt;span id='Label13' style='color:Red;'&gt;New Rev&lt;/span&gt; &lt;/td&gt; &lt;/tr&gt;");
          sbHtml.Append("  &lt;tr&gt; &lt;td class='style191'&gt; aaa &amp;nbsp;&lt;/td&gt;");
          sbHtml.Append("&lt;td class='style190'&gt; aaa &amp;nbsp;&lt;/td&gt;");
          sbHtml.Append("  &lt;td class='style112'&gt; aaa &amp;nbsp;&lt;/td&gt;");
          sbHtml.Append(" &lt;td class='style192'&gt; aaa &amp;nbsp;&lt;/td&gt;");
          sbHtml.Append(" &lt;td class='style30'&gt; aaa &amp;nbsp;&lt;/td&gt; &lt;/tr&gt;");
          sbHtml.Append("&lt;/table&gt;");
          sbHtml.Append(" &lt;table class='style16' border='1' cellpadding = '0' cellspacing ='0'&gt;");
          sbHtml.Append(" &lt;tr&gt; &lt;td class ='style56'&gt; &lt;span id='Label30' style='color:Red;'&gt;Change Description&lt;/span&gt; &lt;span id='Label55'&gt;aaa&lt;/span&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;");
          sbHtml.Append(" &lt;table border='1' class='style16' cellpadding = '0' cellspacing ='0'&gt;");
          sbHtml.Append("&lt;tr&gt; &lt;td class='style59' colspan='6'&gt; &lt;span id='Label31' style='color:Red;'&gt;Classification of Reason for Change&lt;/span&gt; &lt;/td&gt; &lt;/tr&gt;");
          sbHtml.Append("&lt;tr&gt; &lt;td class='style60'&gt; &amp;nbsp;&lt;/td&gt; &lt;td class='style95' align='center'&gt; &lt;span id='Label35' style='color:Red;'&gt;Document&lt;/span&gt; &lt;/td&gt; &lt;td class='style116' align='center'&gt; &lt;span id='Label36' style='color:Red;'&gt;Design&lt;/span&gt; &lt;/td&gt; &lt;td class='style95' align='center'&gt; &lt;span id='Label37' style='color:Red;'&gt;Production&lt;/span&gt; &lt;/td&gt; &lt;td class='style116' align='center'&gt; &lt;span id='Label39' style='color:Red;'&gt;Purchasing&lt;/span&gt; &lt;/td&gt; &lt;td class='style100' align='center'&gt; &lt;span id='Label40' style='color:Red;'&gt;Customer Request&lt;/span&gt; &lt;/td&gt; &lt;/tr&gt;");
          sbHtml.Append(" &lt;tr&gt; &lt;td class='style60'&gt; &lt;span id='Label32' style='color:Red;'&gt;Improvement&lt;/span&gt; &lt;/td&gt; &lt;td class='style95' align='center'&gt; &lt;input id='CheckBox24' type='checkbox' name='CheckBox24' checked='checked' /&gt; &lt;/td&gt; &lt;td class='style116' align='center'&gt; &lt;input id='CheckBox25' type='checkbox' name='CheckBox25' /&gt; &lt;/td&gt; &lt;td class='style95' align='center'&gt; &lt;input id='CheckBox26' type='checkbox' name='CheckBox26' /&gt; &lt;/td&gt; &lt;td class='style116' align='center'&gt; &lt;input id='CheckBox28' type='checkbox' name='CheckBox28' /&gt; &lt;/td&gt; &lt;td class='style100' align='center' &lt;input id='CheckBox29' type='checkbox' name='CheckBox29' /&gt; &lt;/td&gt; &lt;/tr&gt;");
          sbHtml.Append("  &lt;tr&gt; &lt;td class='style60'&gt; &lt;span id='Label33' style='color:Red;'&gt;Error&lt;/span&gt; &lt;/td&gt; &lt;td class='style95' align='center'&gt; &lt;input id='CheckBox31' type='checkbox' name='CheckBox31' /&gt; &lt;/td&gt; &lt;td class='style116' align='center'&gt; &lt;input id='CheckBox32' type='checkbox' name='CheckBox32' checked='checked' /&gt; &lt;/td&gt; &lt;td class='style95' align='center'&gt; &lt;input id='CheckBox33' type='checkbox' name='CheckBox33' checked='checked' /&gt; &lt;/td&gt; &lt;td class='style116' align='center'&gt; &lt;input id='CheckBox35' type='checkbox' name='CheckBox35' /&gt; &lt;/td&gt; &lt;td class='style100' align='center'&gt; &lt;input id='CheckBox36' type='checkbox' name='CheckBox36' checked='checked' /&gt; &lt;/td&gt; &lt;/tr&gt;");
          sbHtml.Append(" &lt;tr&gt; &lt;td class='style60'&gt; &lt;span id='Label34' style='color:Red;'&gt;Requirement&lt;/span&gt; &lt;/td&gt; &lt;td class='style95' align='center'&gt; &lt;input id='CheckBox38' type='checkbox' name='CheckBox38' /&gt; &lt;/td&gt; &lt;td class='style116' align='center'&gt; &lt;input id='CheckBox39' type='checkbox' name='CheckBox39' /&gt; &lt;/td&gt; &lt;td class='style95' align='center'&gt; &lt;input id='CheckBox40' type='checkbox' name='CheckBox40' /&gt; &lt;/td&gt;  &lt;td class='style116' align='center'&gt; &lt;input id='CheckBox42' type='checkbox' name='CheckBox42' checked='checked' /&gt; &lt;/td&gt; &lt;td class='style100' align='center'&gt; &lt;input id='CheckBox43' type='checkbox' name='CheckBox43' /&gt; &lt;/td&gt;  &lt;/tr&gt;");
          sbHtml.Append("&lt;/table&gt;");
          sbHtml.Append(" &lt;table border='1' class='style16' cellpadding = '0' cellspacing ='0'&gt; &lt;tr&gt;");
          sbHtml.Append("  &lt;td class ='style56'&gt; &lt;span id='Label42' style='color:Red;'&gt;Explanition of Reson for Change&lt;/span&gt; &lt;span id='Label56'&gt;aaa&lt;/span&gt; &lt;br /&gt; &lt;/td&gt; &lt;/tr&gt;");
          sbHtml.Append(" &lt;/table&gt;");
          sbHtml.Append(" &lt;table border='1' class='style16' cellpadding = '0' cellspacing ='0'&gt;");
          sbHtml.Append(" &lt;tr&gt; &lt;td colspan='4' class ='style56'&gt; &lt;span id='Label43' style='color:Red;'&gt;Configuration Baseline Affected&lt;/span&gt; &lt;/td&gt; &lt;/tr&gt;");
          sbHtml.Append("  &lt;tr&gt; &lt;td class ='style56'&gt; &lt;input id='CheckBox6' type='checkbox' name='CheckBox6' checked='checked' /&gt;&lt;label for='CheckBox6'&gt;No&lt;/label&gt; &lt;/td&gt; &lt;td class='style101'&gt; &lt;input id='CheckBox7' type='checkbox' name='CheckBox7' checked='checked' /&gt;&lt;label for='CheckBox7'&gt;Functional&lt;/label&gt; &lt;/td&gt; &lt;td class='style102'&gt; &lt;input id='CheckBox8' type='checkbox' name='CheckBox8' /&gt;&lt;label for='CheckBox8'&gt;Allocated&lt;/label&gt; &lt;/td&gt; &lt;td class ='style56'&gt; &lt;input id='CheckBox9' type='checkbox' name='CheckBox9' /&gt;&lt;label for='CheckBox9'&gt;Product&lt;/label&gt; &lt;/td&gt; &lt;/tr&gt;");
          sbHtml.Append("   &lt;/table&gt;");
          sbHtml.Append(" &lt;table border='1' class='style16' cellpadding = '0' cellspacing ='0'&gt;");
          sbHtml.Append("  &lt;tr&gt; &lt;td class ='style56'&gt; &lt;span id='Label44' style='color:Red;'&gt;BOM Affected&lt;/span&gt; &lt;/td&gt; &lt;/tr&gt;");
          sbHtml.Append(" &lt;tr&gt; &lt;td class='style103'&gt; &lt;input id='CheckBox10' type='checkbox' name='CheckBox10' checked='checked' /&gt;&lt;label for='CheckBox10'&gt;Yes&lt;/label&gt; &lt;input id='CheckBox11' type='checkbox' name='CheckBox11' /&gt;&lt;label for='CheckBox11'&gt;No&lt;/label&gt; &lt;/td&gt; &lt;/tr&gt;");
          sbHtml.Append("&lt;/table&gt;");
          sbHtml.Append("&lt;table border='1' class='style16' cellpadding = '0' cellspacing ='0'&gt;");
          sbHtml.Append("&lt;tr&gt; &lt;td class ='style56'&gt; &lt;span id='Label45' style='color:Red;'&gt;Evaluation&lt;/span&gt; &lt;/td&gt; &lt;/tr&gt;");
          sbHtml.Append("&lt;tr&gt; &lt;td class ='style56'&gt; &lt;input id='CheckBox12' type='checkbox' name='CheckBox12' checked='checked' /&gt;&lt;label for='CheckBox12'&gt;Interchangeability effected&lt;/label&gt; &lt;/td&gt; &lt;/tr&gt;");
          sbHtml.Append(" &lt;tr&gt; &lt;td class ='style56'&gt; &lt;input id='CheckBox13' type='checkbox' name='CheckBox13' /&gt;&lt;label for='CheckBox13'&gt;Affects test/assembly tools&lt;/label&gt; &lt;/td&gt; &lt;/tr&gt;");
          sbHtml.Append(" &lt;tr&gt; &lt;td class ='style56'&gt; &lt;input id='CheckBox14' type='checkbox' name='CheckBox14' /&gt;&lt;label for='CheckBox14'&gt;Affects the articles of contract&lt;/label&gt; &lt;/td &gt; &lt;/tr&gt;");
          sbHtml.Append(" &lt;tr&gt; &lt;td class ='style56'&gt; &lt;input id='CheckBox15' type='checkbox' name='CheckBox15' /&gt;&lt;label for='CheckBox15'&gt;Affects the contract cost&lt;/label&gt; &lt;/td&gt; &lt;/tr&gt;");
          sbHtml.Append(" &lt;tr&gt; &lt;td class ='style56'&gt; &lt;input id='CheckBox16' type='checkbox' name='CheckBox16' /&gt;&lt;label for='CheckBox16'&gt;Affects the maintenace&lt;/label&gt; &lt;/td&gt; &lt;/tr&gt;");
          sbHtml.Append("&lt;tr&gt; &lt;td class ='style56'&gt; &lt;input id='CheckBox17' type='checkbox' name='CheckBox17' checked='checked' /&gt;&lt;label for='CheckBox17'&gt;Affects the software&lt;/label&gt; &lt;/td&gt; &lt;/tr&gt;");
          sbHtml.Append("  &lt;tr&gt; &lt;td class ='style56'&gt; &lt;input id='CheckBox18' type='checkbox' name='CheckBox18' /&gt;&lt;label for='CheckBox18'&gt;Affects the test software&lt;/label&gt; &lt;/td&gt; &lt;/tr&gt;");
          sbHtml.Append("&lt;tr&gt; &lt;td class ='style56'&gt; &lt;input id='CheckBox20' type='checkbox' name='CheckBox20' /&gt;&lt;label for='CheckBox20'&gt;Affects the performance, safety, security&lt;/label&gt; &lt;/td&gt; &lt;/tr&gt;");
          sbHtml.Append(" &lt;tr&gt; &lt;td class ='style56'&gt; &lt;input id='CheckBox22' type='checkbox' name='CheckBox22' /&gt;&lt;label for='CheckBox22'&gt;Affects reference documents (explain)&lt;/label&gt; &lt;/td&gt; &lt;/tr&gt;");
          sbHtml.Append(" &lt;tr&gt; &lt;td class ='style56'&gt; &lt;input id='CheckBox23' type='checkbox' name='CheckBox23' /&gt;&lt;label for='CheckBox23'&gt;Others (explain)&lt;/label&gt; &lt;/td&gt; &lt;/tr&gt;");
          sbHtml.Append(" &lt;tr&gt; &lt;td class='style62'&gt; &lt;span id='Label46' style='color:Red;'&gt;Attachments&lt;/span&gt; &lt;span id='Label57'&gt;aaa&lt;/span&gt; &lt;/td&gt; &lt;/tr&gt;");
          sbHtml.Append("  &lt;tr&gt; &lt;td class='style63'&gt; &lt;span id='Label47' style='color:Red;'&gt;Comments&lt;/span&gt; &lt;span id='Label58'&gt;aaa&lt;/span&gt; &lt;/td&gt; &lt;/tr&gt;");
          sbHtml.Append("&lt;/table&gt;&lt;/form&gt;&lt;/body&gt;&lt;/html&gt;");
  
          hed = sbHtml.ToString();
  
          return hed;
      }
  
  
  
  
  }
  }
  
  
      protected void Button1_Click(object sender, EventArgs e)
      {
          PDF.CreatePDFReport pdf = new PDF.CreatePDFReport();
          string reportContent = pdf.createReport();
         string pathFile = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory)  + "\\engineeringChangeNoticeReport1" + ".pdf";
  
         HTMLToPdf(reportContent, pathFile);
      }
      public void HTMLToPdf(string HTML, string FilePath)
      {
          Document document = new Document();
  
          PdfWriter.GetInstance(document, new FileStream(FilePath, FileMode.Create));
          document.Open();
          //Image pdfImage = Image.GetInstance(Server.MapPath("Penguins.jpg"));
  
          //pdfImage.ScaleToFit(100, 50);
  
          //pdfImage.Alignment = iTextSharp.text.Image.UNDERLYING; pdfImage.SetAbsolutePosition(180, 760);
  
          //document.Add(pdfImage);
          iTextSharp.text.html.simpleparser.StyleSheet styles = new iTextSharp.text.html.simpleparser.StyleSheet();
          iTextSharp.text.html.simpleparser.HTMLWorker hw = new iTextSharp.text.html.simpleparser.HTMLWorker(document);
          hw.Parse(new StringReader(HTML));
          document.Close();
          ShowPdf(FilePath);
      }
  
  
      private void ShowPdf(string s)
      {
          Response.ClearContent();
          Response.ClearHeaders();
          Response.AddHeader("Content-Disposition", "inline;filename=" + s);
          Response.ContentType = "application/pdf";
          Response.WriteFile(s);
          Response.Flush();
          Response.Clear();
      }
  </code></pre>