code: static public void listContentStream(File pdfFile, PrintWriter out) throws IOException {
          PdfReader reader = new PdfReader(pdfFile.getCanonicalPath());
              
          int maxPageNum = reader.getNumberOfPages();
          
          for (int pageNum = 1; pageNum <= maxPageNum; pageNum++){
              listContentStreamForPage(reader, pageNum, out);
          }       
              
      }
docs: Writes information about each page in a PDF file to the specified output stream.
  @since 2.1.5
  @param pdfFile	a File instance referring to a PDF file
  @param out       the output stream to send the content to
  @throws IOException