title: Unable to read a PDF file using PDFBOX
body: <p>I am trying to fill in a PDF form using JAVA, but when I tried to get the fields using the below code the list is empty.</p>
  
  <pre><code>PDDocument pdDoc = PDDocument.load(filename);
  PDAcroForm pdform = pdDoc.getDocumentCatalog().getAcroForm();
  List&lt;PDField&gt; field = pdform.getFields();
  </code></pre>
  
  <p>Then I tried to read the file using PDFStripper </p>
  
  <pre><code>PDFTextStripper stripper = new PDFTextStripper();
  System.out.println(stripper.getText(pdDoc));
  </code></pre>
  
  <p>and the ouput was as follows</p>
  
  <p>"Please wait... </p>
  
  <p>If this message is not eventually replaced by the proper contents of the document, your PDF 
  viewer may not be able to display this type of document. </p>
  
  <p>You can upgrade to the latest version of Adobe Reader for Windows®, Mac, or Linux® by 
  visiting  <a href="http://www.adobe.com/go/reader_download" rel="nofollow">http://www.adobe.com/go/reader_download</a>. </p>
  
  <p>For more assistance with Adobe Reader visit  <a href="http://www.adobe.com/go/acrreader" rel="nofollow">http://www.adobe.com/go/acrreader</a>. </p>
  
  <p>Windows is either a registered trademark or a trademark of Microsoft Corporation in the United States and/or other countries. Mac is a trademark 
  of Apple Inc., registered in the United States and other countries. Linux is the registered trademark of Linus Torvalds in the U.S. and other 
  countries."</p>
  
  <p>But I'm able to open the file manually and fill the fields as well. I've tried other tools like iText also. But again I wasn't able to get the fields.
  How can I resolve this issue?</p>