title: PdfTextExtractor.GetTextFromPage is not returning correct text
body: <p>Using iTextSharp, I have the following code, that successfully pulls out the PDF's text for the majority of PDF's I'm trying to read...</p>
  
  <pre><code>PdfReader reader = new PdfReader(fileName);
  for (int i = 1; i &lt;= reader.NumberOfPages; i++)
  {
      text += PdfTextExtractor.GetTextFromPage(reader, i);
  }
  reader.Close();
  </code></pre>
  
  <p>However, some of my PDF's have XFA forms (which have already been filled out), and this causes the 'text' field to be filled with the following garbage...</p>
  
  <pre><code>"Please wait... \n  \nIf this message is not eventually replaced by the proper contents of the document, your PDF \nviewer may not be able to display this type of document. \n  \nYou can upgrade to the latest version of Adobe Reader for Windows®, Mac, or Linux® by \nvisiting  http://www.adobe.com/products/acrobat/readstep2.html. \n  \nFor more assistance with Adobe Reader visit  http://www.adobe.com/support/products/\nacrreader.html. \n  \nWindows is either a registered trademark or a trademark of Microsoft Corporation in the United States and/or other countries. Mac is a trademark \nof Apple Inc., registered in the United States and other countries. Linux is the registered trademark of Linus Torvalds in the U.S. and other \ncountries."
  </code></pre>
  
  <p>How can I work around this? I tried using the PdfStamper[1] from iTextSharp to flatten the PDF, but that didn't work - the resultant stream had the same garbage text.</p>
  
  <p>[1]<a href="https://stackoverflow.com/questions/1942357/how-to-flatten-already-filled-out-pdf-form-using-itextsharp">How to flatten already filled out PDF form using iTextSharp</a></p>