title: Determine whether a PDF page contains text or is purely picture
body: <p>How to determine whether a PDF page contains text or is purely picture, using Java?</p>
  
  <p>I searched through many forums and websites, but I can not find an answer yet .</p>
  
  <p>Is it possible to extract text from PDF, to know if the page is in the format picture or text?</p>
  
  <pre><code>PdfReader reader = new PdfReader(INPUTFILE);  
          PrintWriter out = new PrintWriter(new FileOutputStream(OUTPUTFILE));              
          for (int i = 1; i &lt;= reader.getNumberOfPages(); i++) { 
           // here I want to test the structure of the page !!!! if it's possible                         
           out.println(PdfTextExtractor.getTextFromPage(reader, i));  
          }
  </code></pre>