summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/context/luatex/luatex-pdf.tex
blob: b698285e3232b9353907f862a2bfa3b86917e710 (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
% This is a pdftex compatibility file. We could use \ifprimitive instead.

\begingroup

\catcode`\{ = 1 % left  brace is begin-group character
\catcode`\} = 2 % right brace is end-group   character

\ifdefined\pdfextension

    % promoted

    \global\let\pdfpagewidth      \pagewidth
    \global\let\pdfpageheight     \pageheight

    \global\let\pdfadjustspacing  \adjustspacing
    \global\let\pdfprotrudechars  \protrudechars
    \global\let\pdfnoligatures    \ignoreligaturesinfont
    \global\let\pdffontexpand     \expandglyphsinfont
    \global\let\pdfcopyfont       \copyfont

    \global\let\pdfxform          \saveboxresource
    \global\let\pdflastxform      \lastsavedboxresourceindex
    \global\let\pdfrefxform       \useboxresource

    \global\let\pdfximage         \saveimageresource
    \global\let\pdflastximage     \lastsavedimageresourceindex
    \global\let\pdflastximagepages\lastsavedimageresourcepages
    \global\let\pdfrefximage      \useimageresource

    \global\let\pdfsavepos        \savepos
    \global\let\pdflastxpos       \lastxpos
    \global\let\pdflastypos       \lastypos

    \global\let\pdftexversion     \luatexversion
    \global\let\pdftexrevision    \luatexrevision
    \global\let\pdftexbanner      \luatexbanner

    \global\let\pdfoutput         \outputmode
    \global\let\pdfdraftmode      \draftmode

    \global\let\pdfpxdimen        \pxdimen

    \global\let\pdfinsertht       \insertht

    % also promoted

  % \global\let\pdfnormaldeviate  \normaldeviate
  % \global\let\pdfuniformdeviate \uniformdeviate
  % \global\let\pdfsetrandomseed  \setrandomseed
  % \global\let\pdfrandomseed     \randomseed
  %
  % \let\pdfprimitive      \primitive
  %
  % \global\let\expandafter\csname    ifpdfabsnum\expandafter\endcsname\csname    ifabsnum\endcsname
  % \global\let\expandafter\csname    ifpdfabsdim\expandafter\endcsname\csname    ifabsdim\endcsname
  % \global\let\expandafter\csname ifpdfprimitive\expandafter\endcsname\csname ifprimitive\endcsname

    % removed (also some others but already long ago)

    \ifdefined\newdimen
        \newdimen\pdfeachlineheight
        \newdimen\pdfeachlinedepth
        \newdimen\pdflastlinedepth
        \newdimen\pdffirstlineheight
        \newdimen\pdfignoreddimen
    \fi

    % commands

    \protected\gdef\pdfliteral              {\pdfextension literal}
    \protected\gdef\pdfcolorstack           {\pdfextension colorstack}
    \protected\gdef\pdfsetmatrix            {\pdfextension setmatrix}
    \protected\gdef\pdfsave                 {\pdfextension save\relax}
    \protected\gdef\pdfrestore              {\pdfextension restore\relax}
    \protected\gdef\pdfobj                  {\pdfextension obj }
    \protected\gdef\pdfrefobj               {\pdfextension refobj }
    \protected\gdef\pdfannot                {\pdfextension annot }
    \protected\gdef\pdfstartlink            {\pdfextension startlink }
    \protected\gdef\pdfendlink              {\pdfextension endlink\relax}
    \protected\gdef\pdfoutline              {\pdfextension outline }
    \protected\gdef\pdfdest                 {\pdfextension dest }
    \protected\gdef\pdfthread               {\pdfextension thread }
    \protected\gdef\pdfstartthread          {\pdfextension startthread }
    \protected\gdef\pdfendthread            {\pdfextension endthread\relax}
    \protected\gdef\pdfinfo                 {\pdfextension info }
    \protected\gdef\pdfcatalog              {\pdfextension catalog }
    \protected\gdef\pdfnames                {\pdfextension names }
    \protected\gdef\pdfincludechars         {\pdfextension includechars }
    \protected\gdef\pdffontattr             {\pdfextension fontattr }
    \protected\gdef\pdfmapfile              {\pdfextension mapfile }
    \protected\gdef\pdfmapline              {\pdfextension mapline }
    \protected\gdef\pdftrailer              {\pdfextension trailer }
    \protected\gdef\pdfglyphtounicode       {\pdfextension glyphtounicode }

    \chardef\pdfnofullbanner   =   1
    \chardef\pdfnofilename     =   2
    \chardef\pdfnopagenumber   =   4
    \chardef\pdfnoinfodict     =   8
    \chardef\pdfnocreator      =  16
    \chardef\pdfnocreationdate =  32
    \chardef\pdfnomoddate      =  64
    \chardef\pdfnoproducer     = 128
    \chardef\pdfnotrapped      = 256
    \chardef\pdfnoid           = 512

    % converted

    \gdef\pdftexversion       {\numexpr\pdffeedback version\relax}
    \gdef\pdftexrevision              {\pdffeedback revision}
    \gdef\pdflastlink         {\numexpr\pdffeedback lastlink\relax}
    \gdef\pdfretval           {\numexpr\pdffeedback retval\relax}
    \gdef\pdflastobj          {\numexpr\pdffeedback lastobj\relax}
    \gdef\pdflastannot        {\numexpr\pdffeedback lastannot\relax}
    \gdef\pdfxformname        {\numexpr\pdffeedback xformname\relax}
    \gdef\pdfcreationdate             {\pdffeedback creationdate}
    \gdef\pdffontname         {\numexpr\pdffeedback fontname\relax}
    \gdef\pdffontobjnum       {\numexpr\pdffeedback fontobjnum\relax}
    \gdef\pdffontsize         {\dimexpr\pdffeedback fontsize\relax}
    \gdef\pdfpageref          {\numexpr\pdffeedback pageref\relax}
    \gdef\pdfcolorstackinit           {\pdffeedback colorstackinit}

    % registers

    \xdef\pdfcompresslevel            {\pdfvariable compresslevel}
    \xdef\pdfobjcompresslevel         {\pdfvariable objcompresslevel}
    \xdef\pdfdecimaldigits            {\pdfvariable decimaldigits}
    \xdef\pdfgamma                    {\pdfvariable gamma}
    \xdef\pdfimageresolution          {\pdfvariable imageresolution}
    \xdef\pdfimageapplygamma          {\pdfvariable imageapplygamma}
    \xdef\pdfimagegamma               {\pdfvariable imagegamma}
    \xdef\pdfimagehicolor             {\pdfvariable imagehicolor}
    \xdef\pdfimageaddfilename         {\pdfvariable imageaddfilename}
    \xdef\pdfpkresolution             {\pdfvariable pkresolution}
    \xdef\pdfinclusioncopyfonts       {\pdfvariable inclusioncopyfonts}
    \xdef\pdfinclusionerrorlevel      {\pdfvariable inclusionerrorlevel}
    \xdef\pdfgentounicode             {\pdfvariable gentounicode}
    \xdef\pdfpagebox                  {\pdfvariable pagebox}
    \xdef\pdfmajorversion             {\pdfvariable majorversion}
    \xdef\pdfminorversion             {\pdfvariable minorversion}
    \xdef\pdfuniqueresname            {\pdfvariable uniqueresname}

    \xdef\pdfpkfixeddpi               {\pdfvariable pkfixeddpi}
    \xdef\pdfignoreunknownimages      {\pdfvariable ignoreunknownimages}

    \xdef\pdfhorigin                  {\pdfvariable horigin}
    \xdef\pdfvorigin                  {\pdfvariable vorigin}
    \xdef\pdflinkmargin               {\pdfvariable linkmargin}
    \xdef\pdfdestmargin               {\pdfvariable destmargin}
    \xdef\pdfthreadmargin             {\pdfvariable threadmargin}
    \xdef\pdfxformmargin              {\pdfvariable xformmargin}

    \xdef\pdfpagesattr                {\pdfvariable pagesattr}
    \xdef\pdfpageattr                 {\pdfvariable pageattr}
    \xdef\pdfpageresources            {\pdfvariable pageresources}
    \xdef\pdfxformattr                {\pdfvariable xformattr}
    \xdef\pdfxformresources           {\pdfvariable xformresources}
    \xdef\pdfpkmode                   {\pdfvariable pkmode}

    \xdef\pdfsuppressoptionalinfo     {\pdfvariable suppressoptionalinfo }
    \global\let\pdfsuppressptexinfo             \pdfsuppressoptionalinfo
    \xdef\pdftrailerid                {\pdfvariable trailerid }
    \xdef\pdfinfoomitdate             {\pdfvariable suppressoptionalinfo \numexpr32+64\relax}

    % initializations

    \global\pdfcompresslevel         9
    \global\pdfobjcompresslevel      1
    \global\pdfdecimaldigits         4
    \global\pdfgamma              1000
    \global\pdfimageresolution      72
    \global\pdfimageapplygamma       0
    \global\pdfimagegamma         2200
    \global\pdfimagehicolor          1
    \global\pdfimageaddfilename      1
    \global\pdfpkresolution         72
    \global\pdfinclusioncopyfonts    0
    \global\pdfinclusionerrorlevel   0
    \global\pdfgentounicode          0
    \global\pdfpagebox               0
  % \global\pdfmajorversion          1
    \global\pdfminorversion          4
    \global\pdfuniqueresname         0

    \global\pdfhorigin             1in
    \global\pdfvorigin             1in
    \global\pdflinkmargin          0pt
    \global\pdfdestmargin          0pt
    \global\pdfthreadmargin        0pt

\fi

\endgroup

\endinput