title: Java iText Footer
body: <p>I’m trying to generate a PDF using a JSP page and my coding outline as follows,</p>
  
  <pre><code>Document document           = new Document(PageSize.A4,70/*Left*/,70/*Right*/,140/*Top*/,30/*Bottom*/);
  
  response.setContentType("application/pdf" );
  response.setHeader("Content-Disposition","inline; filename=vishwa-mandate.pdf");
  
  PdfWriter.getInstance(document, response.getOutputStream());
  document.open();
  
  HeaderFooter footer = new HeaderFooter(new Phrase("This is page "), true);
  document.setFooter(footer);
  
  /* PAGE 01 */
  
  document.newPage(); 
  
  /* PAGE 02 + */
  
  document.close();
  </code></pre>
  
  <p>Page footer doesn’t apply to PAGE 01 once I explicitly call <code>document.newPage();</code><br>
  How can I get the footer though out the whole document? </p>