title: maximum page size in itextpdf
body: <p>I'm creating adf project and generating reports using itextpdf 5.1.3.
  For eg:- My table customer has 3000 rows.In my jspx page has customer table &amp; button has file downloader listner there i'm simply calling the report.
  Report is generating for only first 50 rows (maximum 4 pages) are only coming.
  Why the remaining rows are not coming in reports?</p>
  
  <pre><code>private void generatePDFFile(FacesContext facesContext, java.io.OutputStream outputStream) {
      try {
          DCBindingContainer dcBindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
          DCIteratorBinding iterBind1 = (DCIteratorBinding)dcBindings.get("CustomerView1Iterator");
  
          Document document = new Document();
          PdfWriter.getInstance(document, new FileOutputStream(FILE)); \\file path local disk D:\mywork\customer.pdf         
        document.open();
          Row[] rows= iterBind1.getAllRowsInRange();
          for(Row row:rows){   
          custcode = (String) row.getAttribute("CustomerCode");
          custname = (String) row.getAttribute("CustomerNameE");
          addgroup(document);
          }
          document.close();
          facesContext = facesContext.getCurrentInstance();
          ServletContext context = (ServletContext)facesContext.getExternalContext().getContext(); 
          File file = new File(FILE); 
          FileInputStream fileInputStream;
          byte[] b; 
          System.out.println(file.getCanonicalPath());
          System.out.println(file.getAbsolutePath());
          fileInputStream = new FileInputStream(file); 
          int n = fileInputStream.available();
          while (n &gt; 0) {
              b = new byte[n];
              //b = new byte[8192];
              int result = fileInputStream.read(b);
              outputStream.write(b, 0, b.length);
              if (result == -1)
                  break;
          }
          outputStream.flush(); 
      } catch (Exception e) {
          e.printStackTrace();
      }
  }
  private static void addgroup(Document document) throws DocumentException{
  
      Paragraph preface1 = new Paragraph();
      Paragraph preface2 = new Paragraph();
      preface1.add(new Chunk("\n"));
      preface1.add(new Chunk("Customer  : "+custcode+"      "+custname,BlueFont));
      preface1.add(new Chunk("\n"));
      document.add(preface1);
      document.add(preface2);
  
  }
  </code></pre>