| 1 |
%% This is part of the OpTeX project, see http://petr.olsak.net/optex |
| 2 |
|
| 3 |
\_codedecl \pdfprimitive {LuaTeX initialization code <2024-02-29>} % preloaded in format |
| 4 |
|
| 5 |
\_let\_pdfpagewidth \pagewidth |
| 6 |
\_let\_pdfpageheight \pageheight |
| 7 |
\_let\_pdfadjustspacing \adjustspacing |
| 8 |
\_let\_pdfprotrudechars \protrudechars |
| 9 |
\_let\_pdfnoligatures \ignoreligaturesinfont |
| 10 |
\_let\_pdffontexpand \expandglyphsinfont |
| 11 |
\_let\_pdfcopyfont \copyfont |
| 12 |
\_let\_pdfxform \saveboxresource |
| 13 |
\_let\_pdflastxform \lastsavedboxresourceindex |
| 14 |
\_let\_pdfrefxform \useboxresource |
| 15 |
\_let\_pdfximage \saveimageresource |
| 16 |
\_let\_pdflastximage \lastsavedimageresourceindex |
| 17 |
\_let\_pdflastximagepages \lastsavedimageresourcepages |
| 18 |
\_let\_pdfrefximage \useimageresource |
| 19 |
\_let\_pdfsavepos \savepos |
| 20 |
\_let\_pdflastxpos \lastxpos |
| 21 |
\_let\_pdflastypos \lastypos |
| 22 |
\_let\_pdfoutput \outputmode |
| 23 |
\_let\_pdfdraftmode \draftmode |
| 24 |
\_let\_pdfpxdimen \pxdimen |
| 25 |
\_let\_pdfinsertht \insertht |
| 26 |
\_let\_pdfnormaldeviate \normaldeviate |
| 27 |
\_let\_pdfuniformdeviate \uniformdeviate |
| 28 |
\_let\_pdfsetrandomseed \setrandomseed |
| 29 |
\_let\_pdfrandomseed \randomseed |
| 30 |
\_let\_pdfprimitive \primitive |
| 31 |
\_let\_ifpdfprimitive \ifprimitive |
| 32 |
\_let\_ifpdfabsnum \ifabsnum |
| 33 |
\_let\_ifpdfabsdim \ifabsdim |
| 34 |
|
| 35 |
\_public |
| 36 |
\pdfpagewidth \pdfpageheight \pdfadjustspacing \pdfprotrudechars |
| 37 |
\pdfnoligatures \pdffontexpand \pdfcopyfont \pdfxform \pdflastxform |
| 38 |
\pdfrefxform \pdfximage \pdflastximage \pdflastximagepages \pdfrefximage |
| 39 |
\pdfsavepos \pdflastxpos \pdflastypos \pdfoutput \pdfdraftmode \pdfpxdimen |
| 40 |
\pdfinsertht \pdfnormaldeviate \pdfuniformdeviate \pdfsetrandomseed |
| 41 |
\pdfrandomseed \pdfprimitive \ifpdfprimitive \ifpdfabsnum \ifpdfabsdim ; |
| 42 |
|
| 43 |
\_directlua {tex.enableprimitives('pdf',{'tracingfonts'})} |
| 44 |
|
| 45 |
\_protected\_def \_pdftexversion {\_numexpr 140\_relax} |
| 46 |
\_def \_pdftexrevision {7} |
| 47 |
\_protected\_def \_pdflastlink {\_numexpr\_pdffeedback lastlink\_relax} |
| 48 |
\_protected\_def \_pdfretval {\_numexpr\_pdffeedback retval\_relax} |
| 49 |
\_protected\_def \_pdflastobj {\_numexpr\_pdffeedback lastobj\_relax} |
| 50 |
\_protected\_def \_pdflastannot {\_numexpr\_pdffeedback lastannot\_relax} |
| 51 |
\_def \_pdfxformname {\_pdffeedback xformname} |
| 52 |
\_def \_pdfcreationdate {\_pdffeedback creationdate} |
| 53 |
\_def \_pdffontname {\_pdffeedback fontname} |
| 54 |
\_def \_pdffontobjnum {\_pdffeedback fontobjnum} |
| 55 |
\_def \_pdffontsize {\_pdffeedback fontsize} |
| 56 |
\_def \_pdfpageref {\_pdffeedback pageref} |
| 57 |
\_def \_pdfcolorstackinit {\_pdffeedback colorstackinit} |
| 58 |
\_protected\_def \_pdfliteral {\_pdfextension literal} |
| 59 |
\_protected\_def \_pdfcolorstack {\_pdfextension colorstack} |
| 60 |
\_protected\_def \_pdfsetmatrix {\_pdfextension setmatrix} |
| 61 |
\_protected\_def \_pdfsave {\_pdfextension save\_relax} |
| 62 |
\_protected\_def \_pdfrestore {\_pdfextension restore\_relax} |
| 63 |
\_protected\_def \_pdfobj {\_pdfextension obj } |
| 64 |
\_protected\_def \_pdfrefobj {\_pdfextension refobj } |
| 65 |
\_protected\_def \_pdfannot {\_pdfextension annot } |
| 66 |
\_protected\_def \_pdfstartlink {\_pdfextension startlink } |
| 67 |
\_protected\_def \_pdfendlink {\_pdfextension endlink\_relax} |
| 68 |
\_protected\_def \_pdfoutline {\_pdfextension outline } |
| 69 |
\_protected\_def \_pdfdest {\_pdfextension dest } |
| 70 |
\_protected\_def \_pdfthread {\_pdfextension thread } |
| 71 |
\_protected\_def \_pdfstartthread {\_pdfextension startthread } |
| 72 |
\_protected\_def \_pdfendthread {\_pdfextension endthread\_relax} |
| 73 |
\_protected\_def \_pdfinfo {\_pdfextension info } |
| 74 |
\_protected\_def \_pdfcatalog {\_pdfextension catalog } |
| 75 |
\_protected\_def \_pdfnames {\_pdfextension names } |
| 76 |
\_protected\_def \_pdfincludechars {\_pdfextension includechars } |
| 77 |
\_protected\_def \_pdffontattr {\_pdfextension fontattr } |
| 78 |
\_protected\_def \_pdfmapfile {\_pdfextension mapfile } |
| 79 |
\_protected\_def \_pdfmapline {\_pdfextension mapline } |
| 80 |
\_protected\_def \_pdftrailer {\_pdfextension trailer } |
| 81 |
\_protected\_def \_pdfglyphtounicode {\_pdfextension glyphtounicode } |
| 82 |
\_protected\_def \_pdfrunninglinkoff {\_pdfextension linkstate 1 } |
| 83 |
\_protected\_def \_pdfrunninglinkon {\_pdfextension linkstate 0 } |
| 84 |
|
| 85 |
\_protected\_edef\_pdfcompresslevel {\_pdfvariable compresslevel} |
| 86 |
\_protected\_edef\_pdfobjcompresslevel {\_pdfvariable objcompresslevel} |
| 87 |
\_protected\_edef\_pdfdecimaldigits {\_pdfvariable decimaldigits} |
| 88 |
\_protected\_edef\_pdfgamma {\_pdfvariable gamma} |
| 89 |
\_protected\_edef\_pdfimageresolution {\_pdfvariable imageresolution} |
| 90 |
\_protected\_edef\_pdfimageapplygamma {\_pdfvariable imageapplygamma} |
| 91 |
\_protected\_edef\_pdfimagegamma {\_pdfvariable imagegamma} |
| 92 |
\_protected\_edef\_pdfimagehicolor {\_pdfvariable imagehicolor} |
| 93 |
\_protected\_edef\_pdfimageaddfilename {\_pdfvariable imageaddfilename} |
| 94 |
\_protected\_edef\_pdfpkresolution {\_pdfvariable pkresolution} |
| 95 |
\_protected\_edef\_pdfinclusioncopyfonts {\_pdfvariable inclusioncopyfonts} |
| 96 |
\_protected\_edef\_pdfinclusionerrorlevel {\_pdfvariable inclusionerrorlevel} |
| 97 |
\_protected\_edef\_pdfgentounicode {\_pdfvariable gentounicode} |
| 98 |
\_protected\_edef\_pdfpagebox {\_pdfvariable pagebox} |
| 99 |
\_protected\_edef\_pdfmajorversion {\_pdfvariable majorversion} |
| 100 |
\_protected\_edef\_pdfminorversion {\_pdfvariable minorversion} |
| 101 |
\_protected\_edef\_pdfuniqueresname {\_pdfvariable uniqueresname} |
| 102 |
\_protected\_edef\_pdfhorigin {\_pdfvariable horigin} |
| 103 |
\_protected\_edef\_pdfvorigin {\_pdfvariable vorigin} |
| 104 |
\_protected\_edef\_pdflinkmargin {\_pdfvariable linkmargin} |
| 105 |
\_protected\_edef\_pdfdestmargin {\_pdfvariable destmargin} |
| 106 |
\_protected\_edef\_pdfthreadmargin {\_pdfvariable threadmargin} |
| 107 |
\_protected\_edef\_pdfpagesattr {\_pdfvariable pagesattr} |
| 108 |
\_protected\_edef\_pdfpageattr {\_pdfvariable pageattr} |
| 109 |
\_protected\_edef\_pdfpageresources {\_pdfvariable pageresources} |
| 110 |
\_protected\_edef\_pdfxformattr {\_pdfvariable xformattr} |
| 111 |
\_protected\_edef\_pdfxformresources {\_pdfvariable xformresources} |
| 112 |
\_protected\_edef\_pdfpkmode {\_pdfvariable pkmode} |
| 113 |
|
| 114 |
\_public |
| 115 |
\pdftexversion \pdftexrevision \pdflastlink \pdfretval \pdflastobj |
| 116 |
\pdflastannot \pdfxformname \pdfcreationdate \pdffontname \pdffontobjnum |
| 117 |
\pdffontsize \pdfpageref \pdfcolorstackinit \pdfliteral \pdfcolorstack |
| 118 |
\pdfsetmatrix \pdfsave \pdfrestore \pdfobj \pdfrefobj \pdfannot |
| 119 |
\pdfstartlink \pdfendlink \pdfoutline \pdfdest \pdfthread \pdfstartthread |
| 120 |
\pdfendthread \pdfinfo \pdfcatalog \pdfnames \pdfincludechars \pdffontattr |
| 121 |
\pdfmapfile \pdfmapline \pdftrailer \pdfglyphtounicode |
| 122 |
\pdfcompresslevel \pdfrunninglinkoff \pdfrunninglinkon |
| 123 |
\pdfobjcompresslevel \pdfdecimaldigits \pdfgamma \pdfimageresolution |
| 124 |
\pdfimageapplygamma \pdfimagegamma \pdfimagehicolor \pdfimageaddfilename |
| 125 |
\pdfpkresolution \pdfinclusioncopyfonts \pdfinclusionerrorlevel |
| 126 |
\pdfgentounicode \pdfpagebox \pdfmajorversion \pdfminorversion \pdfuniqueresname |
| 127 |
\pdfhorigin \pdfvorigin \pdflinkmargin \pdfdestmargin \pdfthreadmargin \pdfpagesattr |
| 128 |
\pdfpageattr \pdfpageresources \pdfxformattr \pdfxformresources \pdfpkmode ; |
| 129 |
|
| 130 |
\_pdfmajorversion = 1 |
| 131 |
\_pdfminorversion = 7 % was 5, see https://tug.org/pipermail/tex-live/2025-February/ |
| 132 |
\_pdfobjcompresslevel = 2 |
| 133 |
\_pdfcompresslevel = 9 |
| 134 |
\_pdfdecimaldigits = 3 |
| 135 |
\_pdfpkresolution = 600 |
| 136 |
|
| 137 |
\_endcode |
| 138 |
|
| 139 |
Common pdf\TeX/ primitives equivalents are declared here. Initial values are set. |
| 140 |
|
| 141 |
\_endinput |
| 142 |
|
| 143 |
2025-02-11 default \pdfminorversion changed from 5 to 7 |
| 144 |
2024-02-29 \pdfrunninglinkoff \pdfrunninglinkon added |
| 145 |
2020-02-21 released |