title: Wrong parsing with iText's PdfTextExtractor
body: <p>I'm facing a problem when I try to read the content of a PDF document. I'm using <strong>iText 2.1.7</strong> with Java, and I need to analyze the content of a PDF document: at first I was using the <strong>PdfTextExtractor</strong>'s <strong>getTextFromPage</strong> method and it was working right, but only when the page is just text, if it contains an image, then the String that I get with the getTextFromPage is a set of meaningless symbols (maybe a different character encoding?), and I lose the content of the whole page. I tried with the last version of iText and works fine, but if I'm not wrong the license wouldn't be totally free (I'm working in a web application for a commercial customer, which serves PDFs on the fly) so I can't use it. I would really appreciate if you have any suggestion.</p>
  
  <p>In case you need it, here is the code:</p>
  
  <pre><code>PdfReader pdf = new PdfReader(doc);  //doc is just a byte[]
  int pageCount = pdf.getNumberOfPages();
  for (int i = 1; i &lt;= pageCount; i++) {
      PdfTextExtractor pdfTextExtractor = new PdfTextExtractor(pdf);
      String pageText = pdfTextExtractor.getTextFromPage(i);
  </code></pre>
  
  <p>Thanks in advance, regards.</p>