I'm trying to highlight text in a PDF document but I found a Tm operator with the following operands:
0 7.98 -7.98 0 90.8898 715.4183 Tm
The Tm operator is supposed to replace the text matrix and the text line matrix solely on its operands. According to the Pdf Reference, the following operations can be done:
The format of the operands doesn't match any of the above transformations, which led to the following questions.
What is the previously mentioned text matrix supposed to do?
Your matrix
0 7.98 -7.98 0 90.8898 715.4183
(which is the PDF short form for
⌈ 0 7.98 0 ⌉
| -7.98 0 0 |
⌊ 90.8898 715.4183 1 ⌋
and unfortunately it is difficult to draw big brackets indeed)
is a combination of a 90° rotation, a scaling by 7.98, and a translation operation by 90.8898, 715.4183. I'll approximate those numbers in the following, 7.98 ≅8, 90.8898 ≅ 91, and 715.4183 ≅ 715:
⌈ 0 8 0 ⌉ ⌈ 0 8 0 ⌉ ⌈ 1 0 0 ⌉
| -8 0 0 | = | -8 0 0 | x | 0 1 0 |
⌊ 91 715 1 ⌋ ⌊ 0 0 1 ⌋ ⌊ 91 715 1 ⌋
⌈ 8 0 0 ⌉ ⌈ 0 1 0 ⌉ ⌈ 1 0 0 ⌉
= | 0 8 0 | x | -1 0 0 | x | 0 1 0 |
⌊ 0 0 1 ⌋ ⌊ 0 0 1 ⌋ ⌊ 91 715 1 ⌋
How would a several transformations look like? For example Scaling and rotation
We have such an example in the decomposition above,
⌈ 0 8 0 ⌉ ⌈ 8 0 0 ⌉ ⌈ 0 1 0 ⌉
| -8 0 0 | = | 0 8 0 | x | -1 0 0 |
⌊ 0 0 1 ⌋ ⌊ 0 0 1 ⌋ ⌊ 0 0 1 ⌋
a combination of a scaling by 8 and a rotation by 90°.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With