title: Getting text position while parsing pdf with Quartz 2D
body: <p>another question regarding pdf parsing...
  Just read PDF Reference version 1.7 "5.3.1 Text-Positioning Operators" and I am a little bit confused.</p>
  
  <p>I wrote some code to get transformation matrix and initial text position.</p>
  
  <pre><code>        CGPDFOperatorTableSetCallback (table, "MP", &amp;op_MP);//Define marked-content point
      CGPDFOperatorTableSetCallback (table, "DP", &amp;op_DP);//Define marked-content point with property list
      CGPDFOperatorTableSetCallback (table, "BMC", &amp;op_BMC);//Begin marked-content sequence
      CGPDFOperatorTableSetCallback (table, "BDC", &amp;op_BDC);//Begin marked-content sequence with property list
      CGPDFOperatorTableSetCallback (table, "EMC", &amp;op_EMC);//End marked-content sequence
  
      //Text State operators
      CGPDFOperatorTableSetCallback(table, "Tc", &amp;op_Tc);
      CGPDFOperatorTableSetCallback(table, "Tw", &amp;op_Tw);
      CGPDFOperatorTableSetCallback(table, "Tz", &amp;op_Tz);
      CGPDFOperatorTableSetCallback(table, "TL", &amp;op_TL);
      CGPDFOperatorTableSetCallback(table, "Tf", &amp;op_Tf);
      CGPDFOperatorTableSetCallback(table, "Tr", &amp;op_Tr);
      CGPDFOperatorTableSetCallback(table, "Ts", &amp;op_Ts);
  
      //text showing operators
      CGPDFOperatorTableSetCallback(table, "TJ", &amp;op_TJ);
      CGPDFOperatorTableSetCallback(table, "Tj", &amp;op_Tj);
      CGPDFOperatorTableSetCallback(table, "'", &amp;op_apostrof);
      CGPDFOperatorTableSetCallback(table, "\"", &amp;op_double_apostrof);
  
      //text positioning operators        
      CGPDFOperatorTableSetCallback(table, "Td", &amp;op_Td);
      CGPDFOperatorTableSetCallback(table, "TD", &amp;op_TD);
      CGPDFOperatorTableSetCallback(table, "Tm", &amp;op_Tm);
      CGPDFOperatorTableSetCallback(table, "T*", &amp;op_T);
  
      //text object operators
      CGPDFOperatorTableSetCallback(table, "BT", &amp;op_BT);//Begin text object
      CGPDFOperatorTableSetCallback(table, "ET", &amp;op_ET);//End text object
  </code></pre>
  
  <p>So this is the output after application lunch:</p>
  
  <pre><code>    2010-09-02 15:09:23.041 testSearch[8251:207] op_BT begin
      Integer value: 0
      2010-09-02 15:09:23.043 testSearch[8251:207] op_BT end
      2010-09-02 15:09:23.043 testSearch[8251:207] op_Tf begin
      Integer value: 1
      2010-09-02 15:09:23.044 testSearch[8251:207] op_Tf end
      2010-09-02 15:09:23.044 testSearch[8251:207] op_Tm begin
      Float value: 557.364197
      2010-09-02 15:09:23.045 testSearch[8251:207] op_Tm end
      2010-09-02 15:09:23.045 testSearch[8251:207] op_TJ begin
      2010-09-02 15:09:23.046 testSearch[8251:207] Array string value [0]: F
      2010-09-02 15:09:23.046 testSearch[8251:207] Array integer value [1]: 94985208
      2010-09-02 15:09:23.047 testSearch[8251:207] Array string value [2]: r
      2010-09-02 15:09:23.047 testSearch[8251:207] Array integer value [3]: 94985208
      2010-09-02 15:09:23.048 testSearch[8251:207] Array string value [4]: o
      2010-09-02 15:09:23.048 testSearch[8251:207] Array integer value [5]: 94985208
      2010-09-02 15:09:23.049 testSearch[8251:207] Array string value [6]: m s
      2010-09-02 15:09:23.049 testSearch[8251:207] Array integer value [7]: 94985208
      2010-09-02 15:09:23.049 testSearch[8251:207] Array string value [8]: a
      2010-09-02 15:09:23.050 testSearch[8251:207] Array integer value [9]: 94985208
      2010-09-02 15:09:23.050 testSearch[8251:207] Array string value [10]: m
      2010-09-02 15:09:23.051 testSearch[8251:207] Array integer value [11]: 94985208
      2010-09-02 15:09:23.051 testSearch[8251:207] Array string value [12]: p
      2010-09-02 15:09:23.052 testSearch[8251:207] Array integer value [13]: 94985208
      2010-09-02 15:09:23.053 testSearch[8251:207] Array string value [14]: l
      2010-09-02 15:09:23.054 testSearch[8251:207] Array integer value [15]: 94985208
      2010-09-02 15:09:23.055 testSearch[8251:207] Array string value [16]: e t
      2010-09-02 15:09:23.055 testSearch[8251:207] Array integer value [17]: 94985208
      2010-09-02 15:09:23.057 testSearch[8251:207] Array string value [18]: o r
      2010-09-02 15:09:23.057 testSearch[8251:207] Array integer value [19]: 94985208
      2010-09-02 15:09:23.058 testSearch[8251:207] Array string value [20]: e
      2010-09-02 15:09:23.058 testSearch[8251:207] Array integer value [21]: 94985208
      2010-09-02 15:09:23.059 testSearch[8251:207] Array string value [22]: s
      2010-09-02 15:09:23.059 testSearch[8251:207] Array integer value [23]: 94985208
      2010-09-02 15:09:23.060 testSearch[8251:207] Array string value [24]: u
      2010-09-02 15:09:23.061 testSearch[8251:207] Array integer value [25]: 94985208
      2010-09-02 15:09:23.061 testSearch[8251:207] Array string value [26]: l
      2010-09-02 15:09:23.062 testSearch[8251:207] Array integer value [27]: 94985208
      2010-09-02 15:09:23.062 testSearch[8251:207] Array string value [28]: t
      2010-09-02 15:09:23.063 testSearch[8251:207] op_TJ end
  </code></pre>
  
  <p>If someone is familiar with text matrix and text positioning operators it would be nice to explain how all those thing work.</p>
  
  <p>How to calculate text position (or glyph?) using Tm (transformation matrix and other data)?</p>