Debian Codegraph @

texmf-dist/tex/plain/pdftoolbox/pdfDstruct/ptb-layout.tex

raw
1 \input ptb-utils
2
3 \_checkloaded{layout}
4
5 \input pdfData/ptb-key-value
6
7 \def\setlayout#1{%
8 \mapkeys{%
9 page width={%
10 name=_width,
11 default=\novalue%
12 },
13 page height={%
14 name=_height,
15 default=\novalue%
16 },
17 horizontal margin={%
18 name=_hmargin,
19 default=\novalue%
20 },
21 vertical margin={%
22 name=_vmargin,
23 default=\novalue%
24 }%
25 }{#1}%
26 \unless\ifx\_width\novalue%
27 \pdfpagewidth=\_width\relax%
28 \fi%
29 \unless\ifx\_height\novalue%
30 \pdfpageheight=\_height\relax%
31 \fi%
32 \unless\ifx\_hmargin\novalue%
33 \hoffset=\dimexpr\_hmargin-\pdfhorigin\relax%
34 \hsize=\dimexpr\pdfpagewidth - \_hmargin * 2\relax%
35 \fi%
36 \unless\ifx\_vmargin\novalue%
37 \voffset=\dimexpr\_vmargin-\pdfvorigin\relax%
38 \vsize=\dimexpr\pdfpageheight - \_vmargin * 2\relax%
39 \fi%
40 }
41