[pdftex] q..Q rules again

Paweł Jackowski P.Jackowski at gust.org.pl
Tue May 8 11:09:48 CEST 2007


Hello,

there is something which still puzzles me in \pdfliteral regarding q..Q 
rules. Lets take

	\def\test{\vrule width12bp height12bp depth0pt }

To make some graphic-safe stuff in old pdfTeX one could to say

	\test
	\pdfliteral{q}%
	\test
	\pdfliteral{Q 1 0 0 1 12 0 cm}%
	\test

Starting from pdfTeX 1.30 one can accomplish that using `page' keyword, 
which results in better content stream

	\test
	\pdfliteral page{q}%
	\test
	\pdfliteral page{Q}%
	\test

But once we use both (which is not quite useless!) we finish somewhere 
outside the page;

	\test
	\pdfliteral page{q}% some graphic operators
	\pdfliteral{q}% some transform
	\test
	\pdfliteral{Q 1 0 0 1 12 0 cm}%
	\pdfliteral page{Q}%
	\test

The reason is that last the matrix (translating coordinates back to the 
lower-left corner) is placed after the _second_ Q. But I'd rather expect 
  that transform after the first (inner) one. What is the reason for that?


-- 
Pawe/l Jackowski
P.Jackowski at gust.org.pl


More information about the pdftex mailing list