1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18\writestatus{loading}{ConTeXt Backend Macros PDF}
19
20\registerctxluafile{lpdfini}{optimize}
21\registerctxluafile{lpdfnod}{}
22\registerctxluafile{lpdfeng}{optimize}
23\registerctxluafile{lpdfcol}{}
24\registerctxluafile{lpdfvfc}{}
25\registerctxluafile{lpdfxmp}{}
26\registerctxluafile{lpdfano}{}
27\registerctxluafile{lpdfres}{}
28\registerctxluafile{lpdfmis}{}
29\registerctxluafile{lpdfren}{}
30\registerctxluafile{lpdfgrp}{}
31\registerctxluafile{lpdfwid}{}
32\registerctxluafile{lpdffld}{}
33\registerctxluafile{lpdfmov}{}
34\registerctxluafile{lpdfu3d}{}
35\registerctxluafile{lpdfswf}{}
36\registerctxluafile{lpdftag}{}
37\registerctxluafile{lpdffmt}{}
38\registerctxluafile{lpdfpde}{}
39\registerctxluafile{lpdfepa}{}
40\registerctxluafile{lpdffnt}{}
41
42\registerctxluafile{backpdp}{}
43\registerctxluafile{backpdf}{}
44
45\loadmarkfile{backu3d}
46\loadmarkfile{backswf}
47
48\unprotect
49
50
51
52
53
54
55
56
57
58\unexpanded\def\pdfextension{\clf_pdfextension}
59 \def\pdffeedback {\clf_pdffeedback}
60
61
62
63
64\unexpanded\def\pdfliteral {\clf_pdfliteral}
65\unexpanded\def\pdfobj {\clf_pdfobj}
66\unexpanded\def\pdflastobj {\numexpr\clf_pdflastobj\relax}
67\unexpanded\def\pdfrefobj {\clf_pdfrefobj }
68
69\unexpanded\def\pdfrestore {\pdfextension restore}
70\unexpanded\def\pdfsave {\pdfextension save}
71\unexpanded\def\pdfsetmatrix{\pdfextension setmatrix}
72
73 \let\pdfxform \saveboxresource
74 \let\pdflastxform \lastsavedboxresourceindex
75 \let\pdfrefxform \useboxresource
76
77
78
79
80\unexpanded\def\nopdfcompression {\clf_setpdfcompression\zerocount\zerocount}
81\unexpanded\def\onlypdfobjectcompression{\clf_setpdfcompression\zerocount\plusthree}
82\unexpanded\def\maximumpdfcompression {\clf_setpdfcompression\plusnine \plusnine }
83\unexpanded\def\normalpdfcompression {\clf_setpdfcompression\plusthree\plusthree}
84
85
86
87\setupbackend
88 [xmpfile=]
89
90\appendtoks
91 \edef\p_file{\backendparameter{xmpfile}}
92 \ifx\empty\p_file\else
93 \clf_setxmpfile{\p_file}
94 \fi
95\to \everysetupbackend
96
97
98
99\appendtoks
100 \clf_setformat
101 format {\backendparameter\c!format}
102 level {\backendparameter\c!level}
103 option {\backendparameter\c!option}
104 profile {\backendparameter\c!profile}
105 intent {\backendparameter\c!intent}
106 file {\backendparameter\c!file}
107 \relax
108\to \everysetupbackend
109
110
111
112
113\unexpanded\def\pdfbackendsetcatalog #1#2{\clf_lpdf_addtocatalog{#1}{#2}}
114\unexpanded\def\pdfbackendsetinfo #1#2{\clf_lpdf_addtoinfo{#1}{#2}}
115\unexpanded\def\pdfbackendsetname #1#2{\clf_lpdf_addtonames{#1}{#2}}
116
117\unexpanded\def\pdfbackendsetpageattribute #1#2{\clf_lpdf_addtopageattributes{#1}{#2}}
118\unexpanded\def\pdfbackendsetpagesattribute#1#2{\clf_lpdf_addtopagesattributes{#1}{#2}}
119\unexpanded\def\pdfbackendsetpageresource #1#2{\clf_lpdf_addtopageresources{#1}{#2}}
120
121\unexpanded\def\pdfbackendsetextgstate #1#2{\clf_lpdf_adddocumentextgstate{#1}{#2}}
122\unexpanded\def\pdfbackendsetcolorspace #1#2{\clf_lpdf_adddocumentcolorspace{#1}{#2}}
123\unexpanded\def\pdfbackendsetpattern #1#2{\clf_lpdf_adddocumentpattern{#1}{#2}}
124\unexpanded\def\pdfbackendsetshade #1#2{\clf_lpdf_adddocumentshade{#1}{#2}}
125
126 \def\pdfbackendcurrentresources {\clf_lpdf_collectedresources}
127 \def\pdfcolor #1{\clf_lpdf_color\numexpr\thecolorattribute{#1}\relax}
128
129
130
131
132\def\TransparencyHack{\setupcolors[\c!pagecolormodel=\v!auto]}
133
134
135
136
137
138
139
140\unexpanded\def\pdfbackendactualtext#1#2
141 {\clf_startactualtext{#2}
142 #1
143 \clf_stopactualtext}
144
145\let\pdfactualtext\pdfbackendactualtext
146
147
148
149\ifdefined\pdfsavepos\else
150 \let\pdfsavepos \savepos
151 \let\pdflastxpos\lastxpos
152 \let\pdflastypos\lastypos
153\fi
154
155\protect \endinput
156 |