title: Encoding of PDF text string
body: <p>I am working on parser for PDF (text extraction).</p>
  
  <p>When page need to be <em>Flate Decoded</em> (from zlib compression), my code is able to decompress content streams, and then I have output (stream object) something like below:</p>
  
  <pre><code>BT
  56.8 721.3 Td 
  /F2 12 Tf
  [&lt;01&gt;2&lt;0203&gt;2&lt;04&gt;-10&lt;0503&gt;2&lt;04&gt;-2&lt;0506070809&gt;2&lt;0A&gt;1&lt;0B&gt;]TJ
  ET
  </code></pre>
  
  <p>I am interested in the string array (operand of TJ).</p>
  
  <p>It seems like there are multiple hex encoded strings contained in this array but corresponding hex values do not make sense. Instead it appears a sequence like 010203... sort of lz77 compression.</p>
  
  <ul>
  <li>Do PDFs have multiple levels of compression?</li>
  <li>How can I get plain text from above string array? </li>
  </ul>