blob: 3d21e00450cc3b19c52194f02c800431a5d69ed5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
% $Id: test-shipout.tex 910 2023-08-26 17:47:24Z karl $
% Public domain. Originally by Phelype Oleinik, 2023.
% Test `shipout' keyword on \special and \pdfliteral to delay expansion.
\catcode`\{=1 \catcode`\}=2
\output={\global\advance\count0 by 1 \shipout\box255 }
\pdfoutput=1
\pdfcompresslevel=0
\pdfobjcompresslevel=0
\hsize=4.6cm
\pdfpagewidth=\hsize
\hoffset=-1in
\topskip=10pt
\baselineskip=12pt
\vsize=\dimexpr\topskip+3\baselineskip\relax
\pdfpageheight=\vsize
\voffset=-1in
\parindent=0pt
\font\f = cmr10 \f
\def\!{\ifodd\count0 0\else 1\fi}
\def\0{\pdfliteral {0 g}}
\def\text{%
\pdfliteral direct {\! 1 0 0 k}1hello\01 %
\special {PDF:direct:\! g}2hello\02 %
\pdfliteral shipout direct {\! 1 0 0 k}3hello\03 %
\special shipout {PDF:direct:\! g}4hello\04 %
}
\text \text \text \text
\text \text \text \text
\text \text \text \text
\text \text \text \text
\end
|