title: Itextsharp text extraction
body: <p>I'm using itextsharp on vb.net to get the text content from a pdf file. The solution works fine for some files but not for other even quite simple ones. The problem is that the token stringvalue is set to null (a set of empty square boxes) </p>
  
  <pre><code>token = New iTextSharp.text.pdf.PRTokeniser(pageBytes)
      While token.NextToken()
          tknType = token.TokenType()
          tknValue = token.StringValue
  </code></pre>
  
  <p>I can meassure the length of the content but I cannot get the actual string content.</p>
  
  <p>I realized that this happens depending on the font of the pdf. If I create a pdf using either Acrobat or PdfCreator with Courier (that by the way is the default font in my visual studio editor) I can get all the text content. If the same pdf is built using a different font I got the empty square boxes.</p>
  
  <p>Now the question is, How can I extract text regardless of the font setting?</p>
  
  <p>Thanks</p>