summaryrefslogtreecommitdiff
path: root/systems/doc/pdftex/tests/21-structdest/test-structdest.tex
blob: 69326730a51879b6d7f3818f3f914349f613e71e (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
39
% $Id: test-structdest.tex 869 2021-11-04 21:46:36Z karl $
% Public domain. Originally by Marcel Kr\"uger, 2021.
% Make some structured destinations with various syntax combinations.
% Output is just checked by hand.

\pdfcompresslevel=0 \pdfobjcompresslevel=0
\pdfoutput=1
\catcode`\{=1 \catcode`\}=2
\output={\global\advance\count0 by 1 \shipout\box255 }

\def\eject{\par\penalty-10000 }
\def\space{ }

\pdfdest num 42 fit
% Assuming that 12345 0 R is a valid reference to the non-existing
% structure element at this location...
\pdfdest struct 12345 num 42 fit 
Hello

\hfill\eject
\pdfdest name {earth} fit
\pdfdest struct 1337 name {earth} fit 
World

\vfill\eject
\noindent
\pdfstartlink goto struct num 42 num 42 First\pdfendlink
\space
\pdfstartlink goto struct name {earth} num 42 Combination 1\pdfendlink
\space
\pdfstartlink goto struct num 42 name {earth} Combination 1\pdfendlink
\space
\pdfstartlink goto struct name {earth} name {earth} Second\pdfendlink
\space
\pdfstartlink goto struct name {i_dont_exists} name {me neither} Third\pdfendlink
\space
\pdfstartlink goto file {f.pdf} struct {[(external_element_id) /Fit]}
                   name {marcel} Forth\pdfendlink
\end