Quantcast
Channel: Adobe Community : Popular Discussions - PDF Language and Specifications
Viewing all articles
Browse latest Browse all 46145

CTM and BT

$
0
0
So.. I have two PDFs. I'm trying to find the positions of characters in these PDFs.

For the BT operator, I am doing this:

TextMatrix = new Matrix();
TextLineMatrix = new Matrix();
//CTM = new Matrix();

Now, those three lines as written let me render the first pdf perfectly. However the second pdf, I uncomment the third line, and then it is rendered perfectly.

Reading the spec, I assume that the third line is not supposed to be there. So I'm taking that line out. Here's the first few lines of the pdf that still does not work. Any ideas? Could the gs operator possibly affect the CTM?

q
0 0 m
425.2 0 l
425.2 595.3 l
0 595.3 l
h
W n
1 0 0 -1 212.60001 297.64999 cm
/CS0 cs 1 scn
0 i
/GS0 gs
-262.25 -298.55 m
-262.25 297.14999 l
212.10001 297.14999 l
212.10001 -298.55 l
-262.25 -298.55 l
h
f*
/CS0 CS 1 SCN
1 w 4 M 0 j 0 J []0 d
-262.25 -298.55 m
-262.25 297.14999 l
212.10001 297.14999 l
212.10001 -298.55 l
-262.25 -298.55 l
h
S
1 0 0 1 -189.90001 -55.71121 cm
0 0 0 1 K
1.02539 w 10 M
/GS1 gs
131.5416 1.4834 m
248.25839 1.4834 l
S
1 0 0 -1 -22.7 353.36121 cm
0 0 0 1 k
BT
/C2_0 1 Tf
0 Tc 0 Tw 0 Ts 100 Tz 0 Tr 12 0 0 12 121.3168 463.7612 Tm
[<0014>74<0014001300030053004F0044004600480003004700480003004F00B6002 4004A005200550044000300100003>]TJ

Viewing all articles
Browse latest Browse all 46145

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>