title: How to increase the table height from the code behind file in ASP.Net while using StringWriter?
body: <p>I am generating one PDF from the Code Behind File using StringWriter and HtmlTextWriter.
  The Coding is given below:</p>
  
  <pre><code>System.IO.StringWriter sw = new System.IO.StringWriter();
  HtmlTextWriter hw = new HtmlTextWriter(sw);
  GridView gv = new GridView();
  gv.BorderStyle = BorderStyle.None; 
  gv.DataSource = dt2;
  gv.DataBind();
  gv.RenderControl(hw);
  string str = sw.ToString();
  string str1 = "&lt;table width='100%' border='1'&gt;&lt;tr&gt;&lt;td&gt;&lt;img src='" + Server.MapPath("App_Themes/Ribo/ribologo.bmp") + "' alt='' width=75px height=75px /&gt;&lt;/td&gt;&lt;td align='center' colspan='8' font size='3'&gt;&lt;h2&gt;&lt;b&gt;MATERIAL RECEIPT CUM INSPECTION REPORT(MRIR)&lt;/b&gt;&lt;/h2&lt;/td&gt;&lt;/tr&gt;";
  str1 += "&lt;tr&gt;&lt;td font size='3'&gt;MRIR NO&lt;/td&gt;&lt;td font size='3'&gt;Date&lt;/td&gt;&lt;td align='center' font size='3'&gt;JOB DESCRIPTION&lt;/td&gt;&lt;td font size='3'&gt;SUPPLIER NAME&lt;/td&gt;&lt;td font size='3'&gt;DC NO&lt;/td&gt;&lt;td font size='3'&gt;DATE&lt;/td&gt;&lt;td font size='3'&gt;LWB NO/DATE&lt;/td&gt;&lt;td font size='3'&gt;INVOICE NO&lt;/td&gt;&lt;td font size='3'&gt;DATE&lt;/td&gt;&lt;/tr&gt;";
  str1 += "&lt;tr&gt;&lt;td font size='3'&gt;" + txtMRVNumber.Text + "&lt;/td&gt;&lt;td font size='3'&gt;&lt;/td&gt;&lt;td font size='3'&gt;&lt;/td&gt;&lt;td font size='3'&gt;" + TDSSVendor.Text + "&lt;/td&gt;&lt;td font size='3'&gt;" + txtDCNumber.Text + "&lt;/td&gt;&lt;td font size='3'&gt;&lt;/td&gt;&lt;td font size='3'&gt;" + txtLWBNo.Text + "&lt;/td&gt;&lt;td font size='3'&gt;" + txtInvoiceNo.Text + "&lt;/td&gt;&lt;td font size='3'&gt;&lt;/td&gt;&lt;/tr&gt;";
  str1 += "&lt;tr&gt;&lt;td rowspan='2' font size='3'&gt;DESCRIPTION&lt;/td&gt;&lt;td font size='3' colspan='2' align='center'&gt;SIZE(mm)&lt;/td&gt;&lt;td colspan='6'&gt;&lt;/td&gt;&lt;/tr&gt;";
  str1 += "&lt;tr&gt;&lt;td font size='3' colspan='2'&gt;" + sw + "&lt;/td&gt;&lt;td colspan='6'&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;";           
  
  if (str.StartsWith("&lt;div&gt;"))
  {
      str = str1;
  }
  System.IO.StringReader sr = new System.IO.StringReader(str);
  iTextSharp.text.Document pdfDoc = new iTextSharp.text.Document(iTextSharp.text.PageSize.A3.Rotate(), 40f, 10f, 40f, 2f);
  iTextSharp.text.html.simpleparser.HTMLWorker htmlparser = new iTextSharp.text.html.simpleparser.HTMLWorker(pdfDoc);
  iTextSharp.text.pdf.PdfWriter.GetInstance(pdfDoc, Response.OutputStream);
  </code></pre>
  
  <p>Here, I generated my desired PDF. But the table is displaying at the top of the PDF. So I want to display at the centre of the PDF as well as I want to increase the height of the Table. How to do this?</p>
  
  <p>I tried like the below:</p>
  
  <pre><code> string str1 = "&lt;table **height='100%'** width='100%' border='1'&gt;&lt;tr&gt;.....
  </code></pre>
  
  <p>But it displays as the same. How to increase the height of the table? I need all your suggestions please.</p>