[pdftex] cm not reset after a figure inclusion

TeX Guy pdftexlist at gmail.com
Mon May 14 22:23:51 CEST 2007


Hi,

it appears that the cm is not reset after a figure inclusion if
nothing else follows after the figure on the same page, or
equivalently the state is not saved and restored around a figure
inclusion. This has adverse side effects on page overlays.

For example

\documentclass[11pt]{article}
\pdfoutput=1
\pdfcompresslevel=0
\usepackage{graphics}
\begin{document}

\thispagestyle{empty}

\begin{figure}
\includegraphics{figure.jpg}
\end{figure}

%some trailling text
\end{document}


results in a page object
4 0 obj <<
/Length 75
>>
stream
1 0 0 1 125.798 371.528 cm
q
1 0 0 1 0 0 cm
q
93 0 0 42 0 0 cm
/Im1 Do
Q
Q
endstream
endobj

which has x-y offset in cm according to the first cm line. Note that
\thispagestyle{empty} is crucial here, because a trailing page number
does revert that offset and leaves the page in a good state as does
any text following after the figure, e.g.

4 0 obj <<
/Length 181
>>
stream
1 0 0 1 125.798 620.217 cm
q
1 0 0 1 0 0 cm
q
93 0 0 42 0 0 cm
/Im1 Do
Q
Q
1 0 0 1 -125.798 -620.217 cm
BT
/F15 10.9091 Tf 142.735 589.333 Td [(some)-333(trailling)-334(text)]TJ
ET
endstream
endobj


This is a problem, because when I overlay (via manipulation of PDF
files) another page (with same MediaBox) onto the first one (think
watermarking), e.g. /Type /Page /Contents [ 4 0 R 12 0 R ] etc.

the positioning of the overlay is affected by the (undefined?) state
of the other page.

Shouldn't the page objects be independent?

Cheers
T.


More information about the pdftex mailing list