Debian Codegraph @

texmf-dist/doc/pdftex/tests/21-structdest/test-structdest.tex

raw
1 % $Id: test-structdest.tex 869 2021-11-04 21:46:36Z karl $
2 % Public domain. Originally by Marcel Kr\"uger, 2021.
3 % Make some structured destinations with various syntax combinations.
4 % Output is just checked by hand.
5
6 \pdfcompresslevel=0 \pdfobjcompresslevel=0
7 \pdfoutput=1
8 \catcode`\{=1 \catcode`\}=2
9 \output={\global\advance\count0 by 1 \shipout\box255 }
10
11 \def\eject{\par\penalty-10000 }
12 \def\space{ }
13
14 \pdfdest num 42 fit
15 % Assuming that 12345 0 R is a valid reference to the non-existing
16 % structure element at this location...
17 \pdfdest struct 12345 num 42 fit
18 Hello
19
20 \hfill\eject
21 \pdfdest name {earth} fit
22 \pdfdest struct 1337 name {earth} fit
23 World
24
25 \vfill\eject
26 \noindent
27 \pdfstartlink goto struct num 42 num 42 First\pdfendlink
28 \space
29 \pdfstartlink goto struct name {earth} num 42 Combination 1\pdfendlink
30 \space
31 \pdfstartlink goto struct num 42 name {earth} Combination 1\pdfendlink
32 \space
33 \pdfstartlink goto struct name {earth} name {earth} Second\pdfendlink
34 \space
35 \pdfstartlink goto struct name {i_dont_exists} name {me neither} Third\pdfendlink
36 \space
37 \pdfstartlink goto file {f.pdf} struct {[(external_element_id) /Fit]}
38 name {marcel} Forth\pdfendlink
39 \end