title: how to set auto increment feature into a pdf file using java?
body: <p>I have the Java code to generate a table in a PDF file, but it is not able to generate more than one page even if more fields were needed.</p>
  
  <p>How would I add auto increment feature for pages? </p>
  
  <p>This the code which I'm refering.</p>
  
  <pre><code>public static void main(String[] args) {
      PDDocument doc = new PDDocument();
      PDPage page = new PDPage();
      doc.addPage(page);
      PDPageContentStream contentStream = new PDPageContentStream(doc, page);
      String[][] content = { { "a", "b", "1" }, { "c", "d", "2" },
              { "e", "f", "3" }, { "g", "h", "4" }, { "i", "j", "5" } };
      drawTable(page, contentStream, 700, 100, content);
      contentStream.close();
      doc.save("test.pdf");
  }
  </code></pre>