# [pdftex] pdftex "page" colorstack interferre with "page" pdfliteral

Petr Olsak petr at olsak.net
Fri Jul 3 21:28:22 CEST 2015

Hello,

I've found a buggy behavior of pdftex. Suppose the (minimal) example:

\chardef\Color=\pdfcolorstackinit page {0 g 0 G}

\shipout\vbox{
\pdfcolorstack\Color push {1 0 0 rg}
}

\shipout\vbox{
\pdfliteral page {q 0 1 0 0 k 0 0 100 100 re f Q}
}

\end

First box (first page) is empty. Second page should include the rectangle
at left-bottom of the page, because "page" option is specified. But this
is not true. You can try it: second page has its rectangle at the top.

If you comment out the \pdfcolorstack line in the first \vbox, then the
first page is really empty and the second page includes its rectangle at
the right position.

Where is a problem?

I tested this by pdfTeX from TeXlive 2015.

Petr Olsak