title: How to continue data writing on a new pdf page if it exceeds the page size in iTextShartp pdf
body: <p>I have gone through this site but could not find the relative solution to my problem.</p>
  
  <p>Here is my problem
   I am creating a PDF file using iTextSharp and the file is being created very well. I am creating a table and assigning it a gridview data as follows.</p>
  
  <pre><code>//Add Actual columns from the datatable
  for (int j = 0; j &lt; dt.Columns.Count; j++) {
      PdfPCell cellHeader = new PdfPCell(FormatHeaderPhrase(dt.Columns[j].ColumnName.ToString()));
      cellHeader.HorizontalAlignment = 1;
      table3.AddCell(cellHeader);// adds the header with proeprties
  }
  //Add the actual rows from the datatable
  for (int i = 0; i &lt; dt.Rows.Count; i++) {
      for (int k = 0; k &lt; dt.Columns.Count; k++) {
          PdfPCell cellRows = new PdfPCell(FormatPhrase(dt.Rows[i][k].ToString().Replace("&lt;br/&gt;","\n").Replace("&lt;sup&gt;","")));
          if (k != 2) {
              cellRows.HorizontalAlignment = 1;
              cellRows.VerticalAlignment = Element.ALIGN_MIDDLE;
          }
          else {
              cellRows.HorizontalAlignment = 0;
          }
          table3.AddCell(cellRows);
          table3.SplitRows = true;
          table3.SplitLate = true;
      }
  }
  </code></pre>
  
  <p>I have a A3 page size. The concern here is, when my data in the table exceeds  the page size, it trims the exceeded part and just shows the data which fits in one page. How to make it multipage(auto page break) based on the content of the table. Currently I am seeing the data which fits into one page of pdf. It should have generated more than one pages. How can I achieve this.</p>
  
  <p>Please let me know your inputs. I would appreciate them. Thank you.</p>