# [pdftex] CTM changed with \pdfxform

Andreas Matthias amat at kabsi.at
Sun Jun 1 17:13:37 CEST 2003

The following example draws two arrows. The first uses a \pdfxform,
whereas the second inserts the code of the former \pdfxform directly.
But the result is not the same since the CTM is modified by
\pdfxform. (The CTM is changed just before the form is inserted
by the operator Do):

1 0 0 1 0 -10 cm
/Fm1 Do

In the Form XObject itself the CTM is not modified!

Can someone explain me this box alignment?
Why is the CTM changed with \pdfxform?

,----[ test.tex ]
| \pdfcompresslevel0
|
| \setbox0=\vbox to 10bp{\vfill\hbox to 15bp{%
|   \pdfliteral{0 0 m 15 5 l 0 10 l 4 5 l f}}}
| \pdfxform 0
|
| \edef\arrow{\pdflastxform}
|
| test\vskip50pt
|
| \pdfliteral{0 0 m 50 0 l S q 1 0 0 1 50 0 cm}\pdfrefxform\arrow\pdfliteral{Q}
|
| \vskip50pt
| \pdfliteral{0 0 m 50 0 l S q 1 0 0 1 50 0 cm 0 0 m 15 5 l 0 10 l 4 5 l f Q}
|
| \end
----

Merry Christmas!

Ciao
Andreas

`