summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlgs/Resource/Init/pdf_draw.ps
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/tlgs/Resource/Init/pdf_draw.ps')
-rw-r--r--Master/tlpkg/tlgs/Resource/Init/pdf_draw.ps738
1 files changed, 321 insertions, 417 deletions
diff --git a/Master/tlpkg/tlgs/Resource/Init/pdf_draw.ps b/Master/tlpkg/tlgs/Resource/Init/pdf_draw.ps
index d1b6ac909d3..e8ca213bbae 100644
--- a/Master/tlpkg/tlgs/Resource/Init/pdf_draw.ps
+++ b/Master/tlpkg/tlgs/Resource/Init/pdf_draw.ps
@@ -68,14 +68,14 @@ pdfdict begin
% Stack: filepos fndict data
exch dup /DataSource 4 -1 roll put
exch PDFfile exch setfileposition
-} bind executeonly def
+} bdef
/.resolvefn2 {
dup length dict .copydict
dup /C0 2 copy knownoget { put } { pop pop } ifelse
dup /C1 2 copy knownoget { put } { pop pop } ifelse
dup /N 2 copy knownoget { put } { pop pop } ifelse
-} bind executeonly def
+} bdef
/.resolvefn3 {
dup length dict .copydict
@@ -85,7 +85,7 @@ pdfdict begin
oforce .resolvefn
} forall
counttomark -1 roll astore exch pop put
-} bind executeonly def
+} bdef
/.resolvefn4 {
PDFfile fileposition exch % filepos fndict
@@ -102,31 +102,31 @@ pdfdict begin
.bind
1 index /Function 3 -1 roll put
exch PDFfile exch setfileposition
-} bind executeonly def
+} bdef
/.resolvefn { % <fndict> .resolvefn <fndict'>
dup length dict .copydict
dup /Domain 2 copy knownoget { put } { pop pop } ifelse
dup /Range 2 copy knownoget { put } { pop pop } ifelse
dup /FunctionType oget //fnrdict exch get exec
-} bind executeonly def
+} bdef
/resolvefunction { % <fndict> resolvefunction <function>
.resolvefn
PDFDEBUG { pdfdict /PDFSTEPcount .knownget { 1 le } { //true } ifelse { (%Function: ) print dup === flush } if } if
-} bind executeonly def
+} bdef
/resolvefnproc { % <fndict> resolvefnproc <proc>
resolvefunction .buildfunction
-} bind executeonly def
+} bdef
/resolveidfnproc { % <fndict> resolveidfnproc <proc>
dup /Identity eq { pop { } } { resolvefnproc } ifelse
-} bind executeonly def
+} bdef
/resolvedefaultfnproc { % <fndict> <default> resolved'fnproc <proc>
1 index /Default eq { exch pop } { pop resolveidfnproc } ifelse
-} bind executeonly def
+} bdef
%% A BBox where width or height (or both) is 0 should still paint one pixel
%% See the ISO 32000-2:2017 spec, section 8.7.4.3, p228 'BBox' and 8.7.3.1
@@ -140,7 +140,7 @@ pdfdict begin
2 index 0.000001 add exch pop
}if
5 -1 roll astore
-}bind executeonly def
+}bind def
% ---------------- Shadings ---------------- %
@@ -159,25 +159,25 @@ pdfdict begin
} repeat
5 -1 roll
astore
- } bind executeonly
+ } bind
/BBox {
dup dup dup aload pop normrect_elems
5 -1 roll astore
FixPatternBBox
- } bind executeonly
+ } bind
/ColorSpace {
resolvecolorspace
- } bind executeonly
+ } bind
/Function {
dup type /dicttype eq {
resolvefunction
} {
[ exch { oforce resolvefunction } forall ]
} ifelse
- } bind executeonly
+ } bind
/Extend {
mark exch {oforce} forall ]
- } bind executeonly
+ } bind
.dicttomark readonly def
/resolveshading { % <shadingstream> resolveshading <shading>
@@ -201,7 +201,7 @@ pdfdict begin
exch PDFfile exch setfileposition
dup 3 1 roll /.shading_dict exch put
} ifelse
-} bind executeonly def
+} bdef
/resolvesh { % <shname> resolvesh <shading>
% <shname> resolvesh <null>
Page /Shading rget {
@@ -218,7 +218,7 @@ pdfdict begin
} {
//null
}ifelse
-} bind executeonly def
+} bdef
% ---------------- Halftones ---------------- %
@@ -229,7 +229,7 @@ pdfdict begin
} {
1 sub dup mul exch 1 sub dup mul add 1 sub
} ifelse
- } bind executeonly
+ } bind
/Diamond {
abs exch abs 2 copy add .75 le {
dup mul exch dup mul add 1 exch sub
@@ -240,7 +240,7 @@ pdfdict begin
1 sub dup mul exch 1 sub dup mul add 1 sub
} ifelse
} ifelse
- } bind executeonly
+ } bind
/Ellipse {
abs exch abs 2 copy 3 mul exch 4 mul add 3 sub dup 0 lt {
pop dup mul exch .75 div dup mul add 4 div 1 exch sub
@@ -252,27 +252,27 @@ pdfdict begin
.5 exch sub exch pop exch pop
} ifelse
} ifelse
- } bind executeonly
- /EllipseA { dup mul .9 mul exch dup mul add 1 exch sub } bind executeonly
- /InvertedEllipseA { dup mul .9 mul exch dup mul add 1 sub } bind executeonly
- /EllipseB { dup 5 mul 8 div mul exch dup mul exch add sqrt 1 exch sub } bind executeonly
- /EllipseC { dup mul .9 mul exch dup mul add 1 exch sub } bind executeonly
- /InvertedEllipseC { dup mul .9 mul exch dup mul add 1 sub } bind executeonly
- /Line { exch pop abs neg } bind executeonly
- /LineX { pop } bind executeonly
- /LineY { exch pop } bind executeonly
- /Square { abs exch abs 2 copy lt { exch } if pop neg } bind executeonly
- /Cross { abs exch abs 2 copy gt { exch } if pop neg } bind executeonly
- /Rhomboid { abs exch abs 0.9 mul add 2 div } bind executeonly
- /DoubleDot { 2 {360 mul sin 2 div exch } repeat add } bind executeonly
- /InvertedDoubleDot { 2 {360 mul sin 2 div exch } repeat add neg } bind executeonly
- /SimpleDot { dup mul exch dup mul add 1 exch sub } bind executeonly
- /InvertedSimpleDot { dup mul exch dup mul add 1 sub } bind executeonly
- /CosineDot { 180 mul cos exch 180 mul cos add 2 div } bind executeonly
- /Double { exch 2 div exch 2 { 360 mul sin 2 div exch } repeat add } bind executeonly
+ } bind
+ /EllipseA { dup mul .9 mul exch dup mul add 1 exch sub } bind
+ /InvertedEllipseA { dup mul .9 mul exch dup mul add 1 sub } bind
+ /EllipseB { dup 5 mul 8 div mul exch dup mul exch add sqrt 1 exch sub } bind
+ /EllipseC { dup mul .9 mul exch dup mul add 1 exch sub } bind
+ /InvertedEllipseC { dup mul .9 mul exch dup mul add 1 sub } bind
+ /Line { exch pop abs neg } bind
+ /LineX { pop } bind
+ /LineY { exch pop } bind
+ /Square { abs exch abs 2 copy lt { exch } if pop neg } bind
+ /Cross { abs exch abs 2 copy gt { exch } if pop neg } bind
+ /Rhomboid { abs exch abs 0.9 mul add 2 div } bind
+ /DoubleDot { 2 {360 mul sin 2 div exch } repeat add } bind
+ /InvertedDoubleDot { 2 {360 mul sin 2 div exch } repeat add neg } bind
+ /SimpleDot { dup mul exch dup mul add 1 exch sub } bind
+ /InvertedSimpleDot { dup mul exch dup mul add 1 sub } bind
+ /CosineDot { 180 mul cos exch 180 mul cos add 2 div } bind
+ /Double { exch 2 div exch 2 { 360 mul sin 2 div exch } repeat add } bind
/InvertedDouble {
exch 2 div exch 2 { 360 mul sin 2 div exch } repeat add neg
- } bind executeonly
+ } bind
.dicttomark readonly def
/.resolveht1 {
@@ -309,13 +309,13 @@ pdfdict begin
} if
} ifelse
} forall .dicttomark
-} bind executeonly def
+} bdef
/.resolveht5 {
mark exch {
oforce dup type /dicttype eq { resolvehalftone } if
} forall .dicttomark
-} bind executeonly def
+} bdef
/.resolveht6 {
%% resolvestream will reposition PDFfile. If we are in the middle
@@ -332,7 +332,7 @@ pdfdict begin
1 index exch /TransferFunction exch put
} if
exch PDFfile exch setfileposition
-} bind executeonly def
+} bdef
/htrdict mark
1 //.resolveht1
@@ -357,15 +357,15 @@ currentdict /.resolveht6 undef
( Output may be incorrect.\n) pdfformaterror
gsave .setdefaulthalftone currenthalftone grestore
} ifelse
-} bind executeonly def
+} bdef
% ---------------- Graphics state management ---------------- %
/cmmatrix matrix def
drawopdict begin
% Graphics state stack
- /q { q } executeonly def
- /Q { Q } executeonly def
+ /q { q } def
+ /Q { Q } def
% Graphics state setting
/cm { //cmmatrix astore
.getpath
@@ -380,25 +380,25 @@ drawopdict begin
currentdict /qTextSaveMatrix .knownget {
//cmmatrix exch dup concatmatrix pop
} if
- } bind executeonly def
+ } bdef
- /i { 1 .min setflat } bind executeonly def
+ /i { 1 .min setflat } bdef
/J { setlinecap } bind 0 get def
/d { setdash } bind 0 get def
/j { setlinejoin } bind 0 get def
/w { setlinewidth } bind 0 get def
- /M { 1 .max setmiterlimit } bind executeonly def
- /gs { gs } executeonly def
+ /M { 1 .max setmiterlimit } bdef
+ /gs { gs } def
end
% Each entry in this dictionary is
% <gsres> <value> -proc- <gsres>
/gsbg {
/BGDefault load resolvedefaultfnproc setblackgeneration
-} bind executeonly def
+} bdef
/gsucr {
/UCRDefault load resolvedefaultfnproc setundercolorremoval
-} bind executeonly def
+} bdef
/gstr {
dup type /arraytype eq {
{ oforce /TRDefault load resolvedefaultfnproc } forall
@@ -406,17 +406,17 @@ end
} {
/TRDefault load resolvedefaultfnproc settransfer
} ifelse
-} bind executeonly def
+} bdef
/gsparamdict mark
- /SA { setstrokeadjust } executeonly
- /OP { 1 index /op known not { dup op } if OP } executeonly
+ /SA { setstrokeadjust }
+ /OP { 1 index /op known not { dup op } if OP }
% The PDF 1.3 specification says that the name /Default is only
% recognized for {BG,UCR,TR}2. However, PDF 1.3 files produced
% by Adobe Acrobat Distiller 4.0 for Windows use the name /Default
% with the older keys, so we have to implement this.
- /BG { 1 index /BG2 known { pop } { gsbg } ifelse } executeonly
- /UCR { 1 index /UCR2 known { pop } { gsucr } ifelse } executeonly
- /TR { 1 index /TR2 known { pop } { gstr } ifelse } executeonly
+ /BG { 1 index /BG2 known { pop } { gsbg } ifelse }
+ /UCR { 1 index /UCR2 known { pop } { gsucr } ifelse }
+ /TR { 1 index /TR2 known { pop } { gstr } ifelse }
% Some functions used to implement phases of HT and HTP
/sethalftones {
@@ -425,10 +425,10 @@ end
} {
resolvehalftone sethalftone
} ifelse
- } bind executeonly def
+ } bdef
/sethalftonephases {
/sethalftonephase where { pop aload pop sethalftonephase } { pop } ifelse
- } bind executeonly def
+ } bdef
/HT {
dup sethalftones .swapcolors sethalftones .swapcolors
@@ -442,51 +442,51 @@ end
/dup /Default eq { oforce gsparamdict /TR get exec } { pop } ifelse
} if
} ifelse
- } executeonly
+ }
/HTP {
% HTP may be present even if this isn't a DPS interpreter.
dup sethalftonephases .swapcolors sethalftonephases .swapcolors
- } executeonly
+ }
% PDF 1.3
% The font is an indirect reference, not a resource name
/Font { aload pop exch oforce resourcefont exch Tf }
- /LW { setlinewidth } executeonly
- /LC { setlinecap } executeonly
- /LJ { setlinejoin } executeonly
- /ML { 1 .max setmiterlimit } executeonly
- /D { aload pop setdash } executeonly
- /RI { ri } executeonly
- /op { op } executeonly
- /OPM { OPM } executeonly
- /BG2 { gsbg } executeonly
- /UCR2 { gsucr } executeonly
- /TR2 { gstr } executeonly
- /FL { 1 .min setflat } executeonly
+ /LW { setlinewidth }
+ /LC { setlinecap }
+ /LJ { setlinejoin }
+ /ML { 1 .max setmiterlimit }
+ /D { aload pop setdash }
+ /RI { ri }
+ /op { op }
+ /OPM { OPM }
+ /BG2 { gsbg }
+ /UCR2 { gsucr }
+ /TR2 { gstr }
+ /FL { 1 .min setflat }
/SM {
% SM may be present even if this is only a Level 2 interpreter.
/setsmoothness where { pop setsmoothness } { pop } ifelse
- } executeonly
+ }
% PDF 1.4
% All of these require the "transparency" feature in the interpreter.
- /ca { ca } executeonly
- /CA { CA } executeonly
+ /ca { ca }
+ /CA { CA }
/SMask {
{gssmask} PDFSTOPONERROR { exec //false } { stopped } ifelse
{
pop (\n **** Error in SMask during ExtGState. Ignoring the mask, output may be incorrect.\n)
pdfformaterror
} if
- } executeonly
- /AIS { AIS } executeonly
- /BM { BM } executeonly
- /TK { TK } executeonly
- /UseBlackPtComp { UseBlackPtComp } executeonly
+ }
+ /AIS { AIS }
+ /BM { BM }
+ /TK { TK }
+ /UseBlackPtComp { UseBlackPtComp }
/HTO {
% PDF 2.0, supposed to be 'similar' to halftone phase but using a different
% co-ordiate system. Treat the same for now and fix if anyone ever complains.
aload pop transform cvi exch cvi exch 2 array astore
dup sethalftonephases .swapcolors sethalftonephases .swapcolors
- } executeonly
+ }
.dicttomark readonly def
/gs { % <gsres> gs -
Page /ExtGState rget {
@@ -496,7 +496,7 @@ end
oforce exch gsparamdict exch .knownget { exec } { pop } ifelse
} forall pop
} if
-} bind executeonly def
+} bdef
% ------ Transparency support ------ %
@@ -583,7 +583,7 @@ end
exit
} loop
SMask
-} bind executeonly def
+} bdef
% Functions specific to the Device* colorspaces to force the switch to
% the Device* colorspace so that the SMask will not get a CIEBased* colorspace
@@ -592,7 +592,7 @@ end
/forceDefaultCS <<
{
currentcolorspace setcolorspace % this will switch to Device colorspace
- } bind executeonly
+ } bind
/DeviceGray exch
/DeviceRGB 1 index
/DeviceCMYK 1 index
@@ -664,7 +664,7 @@ def
setmatrix
end % restore colorspace, color and ExtGState (end)
.currentSMask /Processed //true put % special setting to tell us it has been rendered
-} bind executeonly def
+} bdef
% Paint a Form+Group XObject, either for a transparency mask or for a Do.
/.execgroup { % [colour values] <colour space> <resdict> <stream> .execgroup -
@@ -699,7 +699,7 @@ def
.pdfruncontext
end grestore
/pdfemptycount exch store
-} bind executeonly def
+} bdef
/.beginformgroup { % groupdict bbox .beginformgroup -
exch mark exch % bbox mark groupdict
@@ -710,7 +710,7 @@ def
% Stack: bbox paramdict
exch aload pop
.begintransparencygroup
-} bind executeonly def
+} bdef
% .paintgroupform implements the Form PaintProc in the case where the
% Form XObject dictionary includes a Group key. See .paintform below.
@@ -725,7 +725,7 @@ def
.beginformgroup
.execgroup
.endtransparencygroup
-} bind executeonly def
+} bdef
% Make an ImageType 103 (soft-masked) image.
/makesoftmaskimage { % <datasource> <imagemask> <SMask> makesoftmaskimage
@@ -759,7 +759,7 @@ def
.currentalphaisshape
{ /ShapeMaskDict } { /OpacityMaskDict } ifelse exch def
/ColorSpace DataDict /ColorSpace get def
-} bind executeonly def
+} bdef
% ---------------- Color setting ---------------- %
@@ -769,17 +769,17 @@ def
% The keys here are resolved (PostScript, not PDF) color space names.
/csncompdict 9 dict begin
- /DeviceGray { pop 1 } bind executeonly def
- /DeviceRGB { pop 3 } bind executeonly def
- /DeviceCMYK { pop 4 } bind executeonly def
+ /DeviceGray { pop 1 } bdef
+ /DeviceRGB { pop 3 } bdef
+ /DeviceCMYK { pop 4 } bdef
/CIEBasedA //DeviceGray def
/CIEBasedABC //DeviceRGB def
/CalGray //DeviceGray def
/CalRGB //DeviceRGB def
/Lab //DeviceRGB def
- /ICCBased { 1 oget /N oget } bind executeonly def
+ /ICCBased { 1 oget /N oget } bdef
/Separation //DeviceGray def
- /DeviceN { 1 oget length } bind executeonly def
+ /DeviceN { 1 oget length } bdef
/Indexed //DeviceGray def
currentdict end readonly def
@@ -787,7 +787,7 @@ currentdict end readonly def
/csncomp {
dup dup type /arraytype eq { 0 oget } if
//csncompdict exch get exec
-} bind executeonly def
+} bdef
currentdict /csncompdict undef
@@ -832,26 +832,26 @@ currentdict /csncompdict undef
} {
pop % remove colorspace dictionary
} ifelse
-} bind executeonly def
+} bdef
/csrdict 13 dict begin
- /DeviceGray { } bind executeonly def
- /DeviceRGB { } bind executeonly def
- /DeviceCMYK { } bind executeonly def
+ /DeviceGray { } bdef
+ /DeviceRGB { } bdef
+ /DeviceCMYK { } bdef
- /CalGray { 1 oget [ exch /CalGray exch ] } bind executeonly def
- /CalRGB { 1 oget [ exch /CalRGB exch ] } bind executeonly def
- /Lab { 1 oget [ exch /Lab exch ] } bind executeonly def
+ /CalGray { 1 oget [ exch /CalGray exch ] } bdef
+ /CalRGB { 1 oget [ exch /CalRGB exch ] } bdef
+ /Lab { 1 oget [ exch /Lab exch ] } bdef
/CalCMYK {
pop /DeviceCMYK % not defined by Adobe
- } bind executeonly def
+ } bdef
/ICCBased {
dup 1 get type /dicttype ne { % don't resolve more than once
ICCBased-resolve
} if
- } bind executeonly def
+ } bdef
/Separation {
aload pop exch oforce resolvecolorspace
@@ -863,7 +863,7 @@ currentdict /csncompdict undef
3 -1 roll oforce 3 1 roll
4 array astore
- } bind executeonly def
+ } bdef
/DeviceN {
[ exch aload pop ] % Copy into a new array
@@ -890,7 +890,7 @@ currentdict /csncompdict undef
} if
4 exch put % Put resolved or new attributes dict
} if
- } bind executeonly def
+ } bdef
/Indexed {
aload pop
@@ -959,7 +959,7 @@ currentdict /csncompdict undef
} if
} if
} if pop
- } bind executeonly def
+ } bdef
/I { % Bug 689815
( **** Error: The name /Indexed cannot be abbreviated to /I in the color space\n)
@@ -967,7 +967,7 @@ currentdict /csncompdict undef
( Output may be incorrect.\n) pdfformaterror
dup 0 /Indexed put
//Indexed exec
- } bind executeonly def
+ } bdef
/Pattern {
dup type /nametype ne {
@@ -976,7 +976,7 @@ currentdict /csncompdict undef
/Pattern exch 2 array astore
} if
} if
- } bind executeonly def
+ } bdef
currentdict end readonly def
@@ -984,7 +984,7 @@ currentdict end readonly def
% <csname> cssubst false
dup resolvecolorspace
dup 1 index ne { exch pop //true } { pop pop //false } ifelse
-} bind executeonly def
+} bdef
/csnames mark
/DeviceGray dup /DeviceRGB dup /DeviceCMYK dup /Pattern dup
@@ -1012,7 +1012,7 @@ currentdict end readonly def
} ifelse
} ifelse
} ifelse
-} bind executeonly def
+} bdef
/resolvecolorspace { % <cspace> resolvecolorspace <cspace'>
dup type /dicttype eq {
@@ -1043,7 +1043,7 @@ currentdict end readonly def
} ifelse
} ifelse
} if
-} bind executeonly def
+} bdef
/scresolve { % <c0> ... scresolve <multi>
% We can't really make sc[n] and SC[N] work, because
@@ -1061,7 +1061,7 @@ currentdict end readonly def
} {
.pdfcount 1 gt
} ifelse
-} bind executeonly def
+} bdef
%% Bug #696017 When we begin a text block, we switch to a special set of marking operations
%% for paths, these ops don't use the current CTM, but the 'SavedTextMatrix', in order to
@@ -1158,24 +1158,19 @@ currentdict end readonly def
Q
PDFDEBUG { pdfdict /PDFSTEPcount .knownget { 1 le } { //true } ifelse { (%End PaintProc) print dup === flush } if } if
PDFfile exch setfileposition
-} bind executeonly def
+} bdef
/.pdfpaintproc {
%% Get the /m from pdfopdict (must be present)
%% and check its a packedarray
pdfopdict /m get dup type /packedarraytype eq {
- %% The non-text version of /m is executeonly, so if we can't read it, its not a text block.
- dup rcheck {
- %% get the initial element of the packedarray
- %% and check its a name
- 0 get dup type /nametype eq {
- %% If the name is inside_text_m then we are in a text block
- /inside_text_m eq
- }{
- pop false
- } ifelse
+ %% get the initial element of the packedarray
+ %% and check its a name
+ 0 get dup type /nametype eq {
+ %% If the name is inside_text_m then we are in a text block
+ /inside_text_m eq
}{
- pop false
+ pop false
} ifelse
}{
pop false
@@ -1189,7 +1184,7 @@ currentdict end readonly def
{
switch_to_text_marking_ops
} if
-}bind executeonly def
+}bdef
/resolvepattern { % <patternstreamdict> resolvepattern <patterndict>
% Don't do the resolvestream now: just capture the data
@@ -1228,7 +1223,7 @@ currentdict end readonly def
dup /BBox 2 copy knownoget { normrect FixPatternBBox put } { pop pop } ifelse
dup /.pattern_uses_transparency 1 index patternusestransparency put
PDFDEBUG { pdfdict /PDFSTEPcount .knownget { 1 le } { //true } ifelse { (%Pattern: ) print dup === flush } if } if
-} bind executeonly def
+} bdef
/ignore_color_op ( **** Error: Ignoring a color operation in a cached context.\n Output may be incorrect.\n) readonly def
@@ -1238,28 +1233,28 @@ drawopdict begin
} {
/DeviceGray cssubst { cs sc1 } { g } ifelse
} ifelse
- } bind executeonly def
+ } bdef
/rg { .incachedevice {
pop pop pop //ignore_color_op pdfformaterror
} {
/DeviceRGB cssubst { cs sc* } { rg } ifelse
} ifelse
- } bind executeonly def
+ } bdef
/k { .incachedevice {
pop pop pop pop //ignore_color_op pdfformaterror
} {
k
} ifelse
- } bind executeonly def
+ } bdef
/cs { .incachedevice {
pop //ignore_color_op pdfformaterror
} {
csresolve { cs } if
} ifelse
- } bind executeonly def
+ } bdef
/sc { .incachedevice {
.pdfcount { pop } repeat //ignore_color_op pdfformaterror
@@ -1271,7 +1266,7 @@ drawopdict begin
{ sc*_and_set } { sc1_and_set } ifelse
} ifelse
} ifelse
- } bind executeonly def
+ } bdef
/scn /sc load def
@@ -1280,35 +1275,35 @@ drawopdict begin
} {
/DeviceGray cssubst { CS SC1 } { G } ifelse
} ifelse
- } bind executeonly def
+ } bdef
/RG { .incachedevice {
pop pop pop //ignore_color_op pdfformaterror
} {
/DeviceRGB cssubst { CS SC* } { RG } ifelse
} ifelse
- } bind executeonly def
+ } bdef
/K { .incachedevice {
pop pop pop pop //ignore_color_op pdfformaterror
} {
K
} ifelse
- } bind executeonly def
+ } bdef
/CS { .incachedevice {
pop //ignore_color_op pdfformaterror
} {
csresolve { CS } if
} ifelse
- } bind executeonly def
+ } bdef
/ri { .incachedevice {
pop //ignore_color_op pdfformaterror
} {
ri
} ifelse
- } bind executeonly def
+ } bdef
/SC { .incachedevice {
.pdfcount { pop } repeat //ignore_color_op pdfformaterror
@@ -1320,7 +1315,7 @@ drawopdict begin
{ SC*_and_set } { SC1_and_set } ifelse
}ifelse
} ifelse
- } bind executeonly def
+ } bdef
/SCN /SC load def
end
@@ -1331,36 +1326,36 @@ currentdict /ignore_color_op undef
drawopdict begin
% Path construction
- /m { { moveto } stopped { count pdfemptycount sub 2 .min { pop } repeat 0 0 moveto } if } bind executeonly def
- /l { { lineto } stopped { count pdfemptycount sub 2 .min { pop } repeat } if } bind executeonly def
- /c { { curveto } stopped { count pdfemptycount sub 6 .min { pop } repeat } if } bind executeonly def
+ /m { { moveto } stopped { count pdfemptycount sub 2 .min { pop } repeat 0 0 moveto } if } bdef
+ /l { { lineto } stopped { count pdfemptycount sub 2 .min { pop } repeat } if } bdef
+ /c { { curveto } stopped { count pdfemptycount sub 6 .min { pop } repeat } if } bdef
/v { count pdfemptycount sub 4 ge {
{ currentpoint 6 2 roll curveto } stopped { count pdfemptycount sub 6 .min { pop } repeat } if
} {
count pdfemptycount sub { pop } repeat
} ifelse
- } bind executeonly def
- /y { { 2 copy curveto } stopped { count pdfemptycount sub 6 .min { pop } repeat } if } bind executeonly def
+ } bdef
+ /y { { 2 copy curveto } stopped { count pdfemptycount sub 6 .min { pop } repeat } if } bdef
/re {
4 2 roll moveto exch dup 0 rlineto 0 3 -1 roll rlineto neg 0 rlineto
closepath
- } bind executeonly def
+ } bdef
/h { closepath } bind 0 get def
% Path painting and clipping
- /n { n } executeonly def
- /S { S } executeonly def
- /s { s } executeonly def
- /f { f } executeonly def
- /f* { f* } executeonly def
- /B { B } executeonly def
- /b { b } executeonly def
- /B* { B* } executeonly def
- /b* { b* } executeonly def
- /W { W } executeonly def
- /W* { W* } executeonly def
+ /n { n } def
+ /S { S } def
+ /s { s } def
+ /f { f } def
+ /f* { f* } def
+ /B { B } def
+ /b { b } def
+ /B* { B* } def
+ /b* { b* } def
+ /W { W } def
+ /W* { W* } def
/sh_save 1 array def
/sh_group << /Subtype /Group /Isolated //true >> readonly def
@@ -1370,14 +1365,15 @@ drawopdict begin
{ dup /.shading .knownget {
exch pop
} {
- .buildshading_and_shfill
+ .buildshading
} ifelse
+ .shfill
} stopped {
pop
( **** Error: Ignoring invalid smooth shading object, output may be incorrect.\n)
pdfformaterror
} if
- } bind executeonly def
+ } bdef
/sh {
OFFlevels length 0 eq {
@@ -1421,43 +1417,43 @@ drawopdict begin
} {
pop
} ifelse
- } bind executeonly def
+ } bdef
currentdict dup /sh_save undef /sh_group undef
end
% ---------------- XObjects ---------------- %
/xobjectprocs mark % <dict> -proc- -
- /Image { DoImage } executeonly
- /Form { DoForm } executeonly
- /PS { DoPS } executeonly
+ /Image { DoImage }
+ /Form { DoForm }
+ /PS { DoPS }
.dicttomark readonly def
% Note that the keys in defaultdecodedict are resolved (PostScript, not PDF)
% color space names.
/defaultdecodedict mark
- /DeviceGray { pop //01_1 } bind executeonly
- /DeviceRGB { pop //01_3 } bind executeonly
- /DeviceCMYK { pop //01_4 } bind executeonly
- /CIEBasedA { 1 get /RangeA knownoget not { //01_1 } if } bind executeonly
- /CIEBasedABC { 1 get /RangeABC knownoget not { //01_3 } if } bind executeonly
- /CalGray { pop //01_1 } bind executeonly
- /CalRGB { pop //01_3 } bind executeonly
- /Lab { 1 get /Range knownoget not { [-100 100 -100 100] } {aload pop 0 100 6 2 roll 6 array astore}ifelse } bind executeonly
+ /DeviceGray { pop //01_1 } bind
+ /DeviceRGB { pop //01_3 } bind
+ /DeviceCMYK { pop //01_4 } bind
+ /CIEBasedA { 1 get /RangeA knownoget not { //01_1 } if } bind
+ /CIEBasedABC { 1 get /RangeABC knownoget not { //01_3 } if } bind
+ /CalGray { pop //01_1 } bind
+ /CalRGB { pop //01_3 } bind
+ /Lab { 1 get /Range knownoget not { [-100 100 -100 100] } {aload pop 0 100 6 2 roll 6 array astore}ifelse } bind
/ICCBased {
1 oget dup /Range knownoget {
exch pop
}{
/N get [ exch {0 1} repeat ] readonly
} ifelse
- } bind executeonly
- /Separation { pop //01_1 } bind executeonly
+ } bind
+ /Separation { pop //01_1 } bind
/DeviceN {
1 oget length [ exch {0 1} repeat ] readonly
- } bind executeonly
+ } bind
/Indexed {
pop [ 0 1 BitsPerComponent bitshift 1 sub ]
- } bind executeonly
+ } bind
.dicttomark readonly def
/checkaltimage { % <resdict> checkaltimage <resdict[']>
@@ -1476,23 +1472,23 @@ end
} forall
} if
} if
-} bind executeonly def
+} bdef
% <string> <index> getu16 <integer>
/getu16 {
2 copy get 8 bitshift 3 1 roll 1 add get add
-} bind executeonly def
+} bind def
% <string> <index> getu32 <integer>
/getu32 {
2 copy getu16 16 bitshift 3 1 roll 2 add getu16 add
-} bind executeonly def
+} bind def
/jp2_csp_dict mark
12 { /DeviceCMYK } % CMYK
14 { [ /Lab << /WhitePoint [ 0.9505 1 1.0890 ] readonly >> ] } % LAB, WhitePoint == D65
- 16 { /sRGBICC /ColorSpace findresource } bind executeonly
- 17 { /sGrayICC /ColorSpace findresource } bind executeonly
+ 16 { /sRGBICC /ColorSpace findresource } bind
+ 17 { /sGrayICC /ColorSpace findresource } bind
18 3 index % YCC is converted to RGB
% 19 % CIEJab not supportec by PDF 1.7
% 20 % e-sRGB
@@ -1506,7 +1502,7 @@ end
/jp2h { % descend into a sub-stream, don't return.
() /SubFileDecode filter 0
- } bind executeonly def
+ } bdef
/ihdr {
14 sub % file len-14
@@ -1523,7 +1519,7 @@ end
dup 12 eq { pop 16 } if
/BitsPerComponent exch def % file len-14
} {pop} ifelse
- } bind executeonly def
+ } bdef
%% if the ihdr has a BPC of 255 then we get a bpcc box which
%% gives the bpc for each component individually. We cannot
@@ -1544,7 +1540,7 @@ end
pop
/BitsPerComponent BitsPerComponent 1 add def
- } bind executeonly def
+ } bdef
/colr {
currentdict /ColorSpace known not {
@@ -1573,7 +1569,7 @@ end
} ifelse
} ifelse
} if
- } bind executeonly def
+ } bdef
% Palette colors are decoded by the library.
/pclr {
@@ -1581,7 +1577,7 @@ end
1 index (1234) readstring pop
3 get 16#7F and 1 add
/BitsPerComponent exch def
- } bind executeonly def
+ } bdef
/cdef {
pop
@@ -1597,7 +1593,7 @@ end
} ifelse
} repeat
0
- } bind executeonly def
+ } bdef
currentdict end readonly def
@@ -1639,7 +1635,7 @@ currentdict end readonly def
} ifelse
} loop
pop
-} bind executeonly def
+} bind def
currentdict /jp2_tag_dict .undef
currentdict /jp2_csp_dict .undef
@@ -1681,7 +1677,7 @@ currentdict /jp2_csp_dict .undef
} ifelse
1 index exch
/DecodeParms exch put % <resdict>
-} bind executeonly def
+} bdef
/last-ditch-bpc-csp {
currentdict /BitsPerComponent oknown not {
@@ -1753,7 +1749,7 @@ currentdict /jp2_csp_dict .undef
} if
} if
/ColorSpace exch def
-} bind executeonly def
+} bdef
/get-smask-in-data { % <dict> -> <int>
/SMaskInData knownoget {
@@ -1763,7 +1759,7 @@ currentdict /jp2_csp_dict .undef
} {
0
} ifelse
-} bind executeonly def
+} bdef
/makeimagedict { % <resdict> <newdict> makeimagedict <imagemask?>
% On return, newdict' is currentdict
@@ -1774,7 +1770,7 @@ currentdict /jp2_csp_dict .undef
/BitsPerComponent 2 copy knownoget { cvi def } { pop } ifelse
/Interpolate 2 copy knownoget { def } { pop } ifelse
makeimagekeys
-} bind executeonly def
+} bdef
/makeimagekeys { % <resdict> makeimagekeys <imagemask>
% newdict is currentdict
@@ -2038,7 +2034,7 @@ currentdict /jp2_csp_dict .undef
//false resolvestream /DataSource exch def
//false
} ifelse
-} bind executeonly def
+} bdef
currentdict /add-to-last-param undef
currentdict /last-ditch-bpc-csp undef
@@ -2076,7 +2072,7 @@ currentdict /last-ditch-bpc-csp undef
} if
1 index /Mask knownoget { 1 index exch /Mask exch put } if
makeimagedict doimagesmask
-} bind executeonly def
+} bdef
/makemaskimage { % <datasource> <imagemask> <Mask> makemaskimage
% <datasource> <imagemask>, updates currentdict =
% imagedict
@@ -2178,7 +2174,7 @@ currentdict /last-ditch-bpc-csp undef
/MaskDict exch def
/ColorSpace DataDict /ColorSpace get def
} ifelse
-} bind executeonly def
+} bdef
/doimagesmask { % <imagemask> doimagesmask -
PDFusingtransparency {
@@ -2228,14 +2224,14 @@ currentdict /last-ditch-bpc-csp undef
{ doimage }
ifelse
} ifelse
-} bind executeonly def
+} bdef
% For development needs we define a special option for running with a new handler
% for images with a soft mask.
//systemdict /NEW_IMAGE3X .knownget not { //false } if {
/doimagesmask { % <imagemask> doimagesmask -
doimage
- } bind executeonly def
+ } bdef
} if
/ValidateDecode { % <<image dict>> -imagemask- ValidateDecode <<image dict>>
@@ -2274,7 +2270,7 @@ currentdict /last-ditch-bpc-csp undef
} {
exch pop
}ifelse
-}bind executeonly def
+}bdef
/doimage { % <imagemask> doimage -
% imagedict is currentdict, gets popped from dstack
@@ -2336,7 +2332,7 @@ currentdict /last-ditch-bpc-csp undef
.endtransparencygroup
OPsavedict dup /saveOA get .setopacityalpha /saveBM get .setblendmode
} if
-} bind executeonly def
+} bdef
/.paintform { % <formdict> <resdict> <stream> .paintform -
1 index /FormResDict gput % For broken forms that inherit resources from the context.
@@ -2345,7 +2341,7 @@ currentdict /last-ditch-bpc-csp undef
} {
pop pdfopdict .pdfruncontext
} ifelse
-} bind executeonly def
+} bdef
/IncrementAppearanceNumber {
pdfdict /AppearanceNumber .knownget {
@@ -2353,7 +2349,7 @@ currentdict /last-ditch-bpc-csp undef
}{
pdfdict /AppearanceNumber 0 .forceput
} ifelse
-}bind executeonly def
+}bdef
/MakeAppearanceName {
pdfdict /AppearanceNumber get
@@ -2362,12 +2358,12 @@ currentdict /last-ditch-bpc-csp undef
dup 3 -1 roll
9 exch putinterval
dup dup length 1 sub (\}) putinterval
-} bind executeonly def
+} bdef
/MakeNewAppearanceName {
IncrementAppearanceNumber
MakeAppearanceName
-}bind executeonly def
+}bdef
/DoAppearance {
%% Might need to rethink this. The problem is that if the page has a CropBox, we apply
@@ -2382,7 +2378,7 @@ currentdict /last-ditch-bpc-csp undef
DoForm
pdfdict /.PreservePDFForm 3 -1 roll .forceput
grestore
-} bind executeonly def
+} bdef
/DoForm {
%% save the current value, if its true we will set it to false later, in order
@@ -2541,7 +2537,7 @@ currentdict /last-ditch-bpc-csp undef
end
} if
pdfdict /.PreservePDFForm 3 -1 roll .forceput
-} bind executeonly def
+} bdef
/_dops_save 1 array def
@@ -2554,7 +2550,7 @@ currentdict /last-ditch-bpc-csp undef
}
{ pop }
ifelse
-} bind executeonly def
+} bdef
currentdict /_dops_save undef
@@ -2567,7 +2563,7 @@ currentdict /_dops_save undef
pop
} ifelse
} forall
- } bind executeonly def
+ } bdef
/AnyOn {
//false exch {
oforce dup type /dicttype eq {
@@ -2576,13 +2572,13 @@ currentdict /_dops_save undef
pop
} ifelse
} forall
- } bind executeonly def
+ } bdef
/AnyOff {
//AllOn exec not
- } bind executeonly def
+ } bdef
/AllOff {
//AnyOn exec not
- } bind executeonly def
+ } bdef
currentdict end readonly def
% Check whether OCG or OCMD is visible
@@ -2658,7 +2654,7 @@ currentdict end readonly def
} {
/OFF known not % OFF is inserted by process_trailer_attrs
} ifelse
-} bind executeonly def
+} bdef
drawopdict begin
/Do { % /Name
@@ -2748,7 +2744,7 @@ drawopdict begin
% Otherwise ignore it and tidy up the stacks
pop pop
} ifelse
- } bind executeonly def
+ } bdef
end
currentdict /xobjectprocs .undef
@@ -2782,12 +2778,12 @@ currentdict /ocg_pocs .undef
.dicttomark readonly def
/unabbrevvalue { % <obj> unabbrevvalue <obj'>
oforce //unabbrevtypedict 1 index type .knownget { exec } if
-} bind executeonly def
+} bdef
/is_space_dict << 0 0 9 9 10 10 12 12 13 13 32 32 >> readonly def
drawopdict begin
- /BI { mark } bind executeonly def
+ /BI { mark } bdef
/ID {
gsave
%% Bug 696547, related to Bug 695897 (see /Do above) This file has an inline image inside
@@ -2856,7 +2852,7 @@ drawopdict begin
} ifelse
} loop
grestore
- } bind executeonly def
+ } bdef
end
currentdict /is_space_dict undef
@@ -2865,26 +2861,26 @@ currentdict /is_space_dict undef
drawopdict begin
% Text control
- /BT { BT } executeonly def
- /ET { ET } executeonly def
- /Tc { Tc } executeonly def
- /TL { TL } executeonly def
- /Tr { Tr } executeonly def
- /Ts { Ts } executeonly def
- /Tw { Tw } executeonly def
- /Tz { Tz } executeonly def
+ /BT { BT } def
+ /ET { ET } def
+ /Tc { Tc } def
+ /TL { TL } def
+ /Tr { Tr } def
+ /Ts { Ts } def
+ /Tw { Tw } def
+ /Tz { Tz } def
% Text positioning
- /Td { Td } executeonly def
- /TD { TD } executeonly def
- /Tm { Tm } executeonly def
- /T* { T* } executeonly def
+ /Td { Td } def
+ /TD { TD } def
+ /Tm { Tm } def
+ /T* { T* } def
% Text painting
- /Tj { Tj } executeonly def
- /' { ' } executeonly def
- /" { " } executeonly def
- /TJ { TJ } executeonly def
+ /Tj { Tj } def
+ /' { ' } def
+ /" { " } def
+ /TJ { TJ } def
- /Tform { Tform } executeonly def % Text formatting and painting for AcroForm
+ /Tform { Tform } def % Text formatting and painting for AcroForm
% without appearance streams.
end
@@ -2896,14 +2892,14 @@ drawopdict begin
( **** Error: invalid operator QBT processed as Q BT .\n)
pdfformaterror % Bug 690089
( Output may be incorrect.\n) pdfformaterror
- } executeonly def
+ } def
/. {
0.
( **** Error: invalid operator . processed as number 0. .\n)
pdfformaterror % Bug 690730
( Output may be incorrect.\n) pdfformaterror
- } executeonly def
+ } def
end
% ============================== Annotations ============================== %
@@ -2923,14 +2919,14 @@ end
dup /Parent oknown not {
2 copy exch /ParentField exch put
} if
-} bind executeonly def
+} bdef
% Get and normalize an annotation's rectangle.
/annotrect { % <annot> annotrect <x> <y> <w> <h>
/Rect oget oforce_recursive aload pop
exch 3 index sub dup 0 lt { dup 5 -1 roll add 4 1 roll neg } if
exch 2 index sub dup 0 lt { dup 4 -1 roll add 3 1 roll neg } if
-} bind executeonly def
+} bdef
% Set an annotation color.
% If the /C array is empty we don't want to draw the annotation
@@ -2959,7 +2955,7 @@ end
} ifelse
}
{ 0 setgray true} ifelse
-} bind executeonly def
+} bdef
% Set an annotation color.
% If the /C array is empty we don't want to draw the annotation
@@ -2988,7 +2984,7 @@ end
} ifelse
}
{ 0 setgray true} ifelse
-} bind executeonly def
+} bdef
% Draw the border. Currently, we ignore requests for beveling, and we
% don't round the corners of rectangles.
@@ -3009,7 +3005,7 @@ end
} {
pop pop pop
}ifelse
-} bind executeonly def
+} bdef
% Draw an annotation border.
/drawborder { % <annot> drawborder -
@@ -3053,7 +3049,7 @@ end
1 {} strokeborder
} ifelse
grestore
-} bind executeonly def
+} bdef
% stroke the path of an annotation border.
/strokeborderpath { % <annot> strokeborderpath -
@@ -3102,7 +3098,7 @@ end
} ifelse
pop
grestore
-} bind executeonly def
+} bdef
/fillborderpath { % <annot> fillborderpath -
gsave
@@ -3110,7 +3106,7 @@ end
annotsetinteriorcolor
{fill} if
grestore
-}bind executeonly def
+}bdef
%
% The PDF annotation F (flags) integer is bit encoded.
@@ -3139,12 +3135,12 @@ end
} {
pop pop //false % Hidden
} ifelse
-} bind executeonly def
+} bdef
/set_bc_color <<
- 1 { 0 get oforce setgray } bind executeonly
- 3 { { oforce } forall setrgbcolor } bind executeonly
- 4 { { oforce } forall setcmykcolor } bind executeonly
+ 1 { 0 get oforce setgray } bind
+ 3 { { oforce } forall setrgbcolor } bind
+ 4 { { oforce } forall setcmykcolor } bind
>> readonly def
% Get an inherited attribute from a node through /Parent and /ParentField
@@ -3168,7 +3164,7 @@ end
} ifelse
} ifelse
} loop
- } bind executeonly def
+ } bind def
% <annot> foo <annot>
/make_tx_da {
@@ -3222,7 +3218,7 @@ end
/File File 0 Length getinterval def
closefile % <annot>
end
-} bind executeonly def
+} bdef
/can-regenerate-ap { % <annot> -> <bool>
//false exch
@@ -3243,7 +3239,7 @@ end
} if
} if
pop
-} bind executeonly def
+} bdef
/drawwidget { % <scalefactor_x> <scalefactor_y> <annot> drawwidget -
@@ -3363,7 +3359,7 @@ end
} if
} ifelse
pop pop pop
-} bind executeonly def
+} bdef
currentdict /set_bc_color undef
@@ -3413,7 +3409,7 @@ currentdict /set_bc_color undef
( Output may be incorrect.\n) pdfformaterror
pop 1 1
} ifelse
-} bind executeonly def
+} bdef
% Draw an annotation.
/drawannottypes 20 dict begin
@@ -3437,13 +3433,13 @@ currentdict /set_bc_color undef
% } ifelse
.begintransparencygroup
} if
- }bind executeonly def
+ }bdef
/endannottransparency {
PDFusingtransparency {
.endtransparencygroup
} if
- }bind executeonly def
+ }bdef
% x0 y0 x1 y1 x2 y2 x3 y3 -> x0 y0 x1-x0 y1-y0 x2-x0 y2-y0
/quadpoints2basis {
@@ -3486,7 +3482,7 @@ currentdict /set_bc_color undef
4 index sub exch % x0 y0 x2-x0 y2-y0 y1-y0 x1
5 index sub exch % x0 y0 x2-x0 y2-y0 x1-x0 y1-y0
4 2 roll % x0 y0 x1-x0 y1-y0 x2-x0 y2-y0
- } bind executeonly def
+ } bdef
/Square {
dup /AP oknown {
@@ -3510,7 +3506,7 @@ currentdict /set_bc_color undef
//endannottransparency exec
grestore
}ifelse
- } bind executeonly def
+ } bdef
%% Width Height drawellipse -
/drawellipse {
@@ -3529,7 +3525,7 @@ currentdict /set_bc_color undef
% Stack: yrad xrad xmag ymag
exch neg 4 1 roll 3 -1 roll neg 3 1 roll exch neg exch
neg 1 index 0 curveto % xmag neg yrad neg xrad neg ymag neg 0 curveto
-}bind executeonly def
+}bdef
/Circle {
dup /AP oknown {
@@ -3546,7 +3542,7 @@ currentdict /set_bc_color undef
grestore
//false
} ifelse
- } bind executeonly def
+ } bdef
/Polygon {
dup /AP oknown {
@@ -3595,7 +3591,7 @@ currentdict /set_bc_color undef
//false
grestore
} ifelse
- } bind executeonly def
+ } bdef
/LineEnd_dict 10 dict begin
%% Stack contains <annot>
@@ -3628,7 +3624,7 @@ currentdict /set_bc_color undef
dup neg lineto
closepath
strokeborderpath
- } bind executeonly def
+ } bdef
/Circle {
dup
/BS knownoget {
@@ -3651,7 +3647,7 @@ currentdict /set_bc_color undef
0 moveto
0 0 3 -1 roll 0 360 arc
strokeborderpath
- } bind executeonly def
+ } bdef
/Diamond {
dup
/BS knownoget {
@@ -3679,7 +3675,7 @@ currentdict /set_bc_color undef
0 lineto
closepath
strokeborderpath
- } bind executeonly def
+ } bdef
/OpenArrow {
dup
gsave
@@ -3696,7 +3692,7 @@ currentdict /set_bc_color undef
dup 6 mul neg exch 4 mul lineto
strokeborderpath
grestore
- } bind executeonly def
+ } bdef
/ClosedArrow {
dup
gsave
@@ -3722,8 +3718,8 @@ currentdict /set_bc_color undef
dup /CA knownoget {.setopacityalpha} if
fillborderpath
grestore
- } bind executeonly def
- /None {} bind executeonly def
+ } bdef
+ /None {} bdef
/Butt {
dup
/BS knownoget {
@@ -3736,7 +3732,7 @@ currentdict /set_bc_color undef
}ifelse
3 mul dup neg 0 exch moveto 0 exch lineto
strokeborderpath
- } bind executeonly def
+ } bdef
/ROpenArrow {
gsave
dup
@@ -3754,7 +3750,7 @@ currentdict /set_bc_color undef
dup 6 mul neg exch 4 mul lineto
strokeborderpath
grestore
- } bind executeonly def
+ } bdef
/RClosedArrow {
gsave
dup
@@ -3781,7 +3777,7 @@ currentdict /set_bc_color undef
dup /CA knownoget {.setopacityalpha} if
fillborderpath
grestore
- } bind executeonly def
+ } bdef
/Slash {
gsave
dup
@@ -3797,7 +3793,7 @@ currentdict /set_bc_color undef
3 mul dup neg 0 exch moveto 0 exch lineto
strokeborderpath
grestore
- } bind executeonly def
+ } bdef
currentdict end readonly def
@@ -3841,7 +3837,7 @@ currentdict /set_bc_color undef
//false
grestore
} ifelse
- } bind executeonly def
+ } bdef
/PolyLine {
dup /AP oknown {
@@ -3899,7 +3895,7 @@ currentdict /set_bc_color undef
//false
grestore
} ifelse
- } bind executeonly def
+ } bdef
/Link { % <annot> -> <false>
//startannottransparency exec
@@ -3912,7 +3908,7 @@ currentdict /set_bc_color undef
( Output may be incorrect.\n) pdfformaterror
}ifelse
//endannottransparency exec
- } bind executeonly def
+ } bdef
/Ink { % <annot> -> <annot> <true>
% <annot> -> <false>
@@ -3964,7 +3960,7 @@ currentdict /set_bc_color undef
//endannottransparency exec
//false
} ifelse
- } bind executeonly def
+ } bdef
/Underline {
dup /AP oknown {
@@ -4003,7 +3999,7 @@ currentdict /set_bc_color undef
} if
//false
} ifelse
- } bind executeonly def
+ } bdef
/StrikeOut {
dup /AP oknown {
@@ -4042,7 +4038,7 @@ currentdict /set_bc_color undef
} if
//false
} ifelse
- } bind executeonly def
+ } bdef
% Connect 2 points with an arc that has max distance from the line
% segment to the ark equal 1/4 of the radius.
@@ -4062,7 +4058,7 @@ currentdict /set_bc_color undef
atan % x0 y0 x1 y1 xc yc r a1 a2
exch arcn % x0 y0 x1 y1
pop pop pop pop
- } bind executeonly def
+ } bind def
/emptydict 0 dict readonly def
@@ -4097,7 +4093,7 @@ currentdict /set_bc_color undef
} if
//false
% } ifelse
- } bind executeonly def
+ } bdef
currentdict /emptydict undef
currentdict /highlight-arc undef
@@ -4157,7 +4153,7 @@ currentdict /set_bc_color undef
//endannottransparency exec
//false
} ifelse
- } bind executeonly def
+ } bdef
/Text {
dup /AP oknown {
@@ -4199,7 +4195,7 @@ currentdict /set_bc_color undef
//endannottransparency exec
//false
} ifelse
- } bind executeonly def
+ } bdef
/FreeText {
dup /AP knownoget {
@@ -4386,7 +4382,7 @@ currentdict /set_bc_color undef
{
//true
} ifelse
- } bind executeonly def
+ } bdef
/frame {
{ 255 div } forall setrgbcolor
@@ -4410,7 +4406,7 @@ currentdict /set_bc_color undef
}
gsave 1 -1 translate 0.75 setgray dup exec grestore
exec
- } bind executeonly def
+ } bdef
% (text) y h -> -
/text {
@@ -4429,7 +4425,7 @@ currentdict /set_bc_color undef
PDFusingtransparency {
.endtransparencytextgroup
} if
- } bind executeonly def
+ } bdef
/red <ef4023> readonly def
/green <3fae49> readonly def
@@ -4439,44 +4435,44 @@ currentdict /set_bc_color undef
/Approved {
//green //frame exec
(APPROVED) 13 30 //text exec
- } bind executeonly def
+ } bdef
/AsIs {
//red //frame exec
(AS IS) 13 30 //text exec
- } bind executeonly def
+ } bdef
/Confidential {
//red //frame exec
(CONFIDENTIAL) 17 20 //text exec
- } bind executeonly def
+ } bdef
/Departmental {
//blue //frame exec
(DEPARTMENTAL) 17 20 //text exec
- } bind executeonly def
+ } bdef
/Draft {
//red //frame exec
(DRAFT) 13 30 //text exec
- } bind executeonly def
+ } bdef
/Experimental {
//blue //frame exec
(EXPERIMENTAL) 17 20 //text exec
- } bind executeonly def
+ } bdef
/Expired {
//red //frame exec
(EXPIRED) 13 30 //text exec
- } bind executeonly def
+ } bdef
/Final {
//red //frame exec
(FINAL) 13 30 //text exec
- } bind executeonly def
+ } bdef
/ForComment {
//green //frame exec
(FOR COMMENT) 17 20 //text exec
- } bind executeonly def
+ } bdef
/ForPublicRelease {
//green //frame exec
(FOR PUBLIC) 26 18 //text exec
(RELEASE) 8.5 18 //text exec
- } bind executeonly def
+ } bdef
/NotApproved {
//red //frame exec
(NOT APPROVED) 17 20 //text exec
@@ -4485,15 +4481,15 @@ currentdict /set_bc_color undef
//red //frame exec
(NOT FOR) 26 18 //text exec
(PUBLIC RELEASE) 8.5 18 //text exec
- } bind executeonly def
+ } bdef
/Sold {
//blue //frame exec
(SOLD) 13 30 //text exec
- } bind executeonly def
+ } bdef
/TopSecret {
//red //frame exec
(TOP SECRET) 14 26 //text exec
- } bind executeonly def
+ } bdef
currentdict end readonly def
{/text/frame/red/green/blue} {currentdict exch undef} forall
@@ -4528,7 +4524,7 @@ currentdict /set_bc_color undef
//endannottransparency exec
//false
} ifelse
- } bind executeonly def
+ } bdef
/Popup {
dup /Open oknown {
@@ -4617,7 +4613,7 @@ currentdict /set_bc_color undef
} {
pop //false
}ifelse
- } bind executeonly def
+ } bdef
/Redact {
%% Redact annotations are part of a process, a Redact annotation is only present
@@ -4629,7 +4625,7 @@ currentdict /set_bc_color undef
} {
//false
} ifelse
- } bind executeonly def
+ } bdef
currentdict /startannottransparency undef
currentdict /endannottransparency undef
@@ -4654,7 +4650,7 @@ currentdict end readonly def
}
{pop pop //true}
ifelse
-} bind executeonly def
+} bind def
/drawannot { % <annot> drawannot -
dup annotvisible {
@@ -4685,7 +4681,7 @@ currentdict end readonly def
} ifelse
grestore
} if pop % annotvisible
-} bind executeonly def
+} bdef
currentdict /drawannottypes undef
% Draw an annotation.
@@ -4743,7 +4739,6 @@ currentdict /drawannottypes undef
dup {oforce} stopped not {exch pop} if
2 index 3 1 roll put
} forall
- Removepdfobj#
} if
dup type /arraytype eq {
0 1 2 index length 1 sub{
@@ -4753,7 +4748,7 @@ currentdict /drawannottypes undef
} if
} if
} forall
-} bind executeonly def
+} bdef
/ApplyCTMToQuadPoints {
@@ -4786,13 +4781,13 @@ currentdict /drawannottypes undef
exch pop % the mark
grestore
-} bind executeonly def
+} bdef
/preserveannottypes 20 dict begin
-/Circle {mark exch loadannot /ANN pdfmark false} bind executeonly def
-/FileAttachment {mark exch loadannot /ANN pdfmark false} bind executeonly def
-/FreeText {mark exch loadannot /ANN pdfmark false} bind executeonly def
+/Circle {mark exch loadannot /ANN pdfmark false} bdef
+/FileAttachment {mark exch loadannot /ANN pdfmark false} bdef
+/FreeText {mark exch loadannot /ANN pdfmark false} bdef
/Highlight {
mark exch
@@ -4802,9 +4797,9 @@ currentdict /drawannottypes undef
put
} if
loadannot /ANN pdfmark false
-} bind executeonly def
+} bdef
-/Ink {mark exch loadannot /ANN pdfmark false} bind executeonly def
+/Ink {mark exch loadannot /ANN pdfmark false} bdef
/Line {
mark exch dup /L .knownget {
@@ -4813,101 +4808,15 @@ currentdict /drawannottypes undef
1 index /L 3 -1 roll put
} if
loadannot /ANN pdfmark false
-} bind executeonly def
+} bdef
-/Link {
- /NO_PDFMARK_DESTS where {pop NO_PDFMARK_DESTS not}{true}ifelse
- {
- mark exch
- dup /BS knownoget { << exch { oforce } forall >> /BS exch 3 -1 roll } if
- dup /F knownoget { /F exch 3 -1 roll } if
- dup /C knownoget { /Color exch 3 -1 roll } if
- dup /Rect knownoget { /Rect exch 3 -1 roll } if
- dup /Border knownoget {
- dup type /arraytype eq {
- dup length 3 lt
- } {
- //true
- } ifelse {
- pop [ 0 0 0 ] % Following AR5 use invisible border.
- } if
- /Border exch 3 -1 roll
- } if
- dup /A knownoget {
- dup /URI known {
- /A mark 3 2 roll % <<>> /A [ <<action>>
- { oforce } forall
- .dicttomark
- 3 2 roll
- } {
- dup /S knownoget {
- %% Because we process GoTo Destinations into absolute references in the PDF file
- %% we need to resolve the /D or /Dest. However, we must *not* do this for
- %% GoToR Destinations because (obviously) those are in a different file and
- %% we cannot resolve them into absolute references. We don't need to anyway
- %% because that file must already have a named destination.
- dup /GoTo eq {
- pop
- dup /D knownoget {
- exch pop exch dup length dict copy dup /Dest 4 -1 roll put
- } if
- }{
- dup /GoToR eq {
- pop /A mark % <<..action dict..>> /A [
- 3 2 roll % /A [ <<..action dict..>>
- { oforce } forall
- .dicttomark
- 3 2 roll
- }{
- dup /Launch eq {
- pop /A mark % <<..action dict..>> /A [
- 3 2 roll % /A [ <<..action dict..>>
- { oforce } forall
- .dicttomark
- 3 2 roll
- }{
- /Named eq {
- /N knownoget {
- namedactions exch .knownget {
- exec {
- pop
- ( **** Warning: Ignoring a named action pointing out of the document page range.\n)
- pdfformatwarning
- } {
- /Page exch 3 -1 roll
- } ifelse
- } if
- } if
- } if
- }ifelse
- } ifelse
- } ifelse
- } if
- } ifelse
- } if
- { linkdest } stopped {
- cleartomark
- ( **** Warning: Link annotation points out of the document page range.\n)
- pdfformatwarning
- } {
- pop
- {
- %% Need to remove any '/.gs.pdfobj# key/value pairs from any dictionaries
- counttomark array astore dup length 1 sub 0 1 3 -1 roll {
- dup 2 index exch get Removepdfobj# 2 index 3 1 roll put
- } for aload pop
- /LNK pdfmark
- } stopped {cleartomark} if
- } ifelse
- }{pop} ifelse
- false
-} bind executeonly def
+/Link {mark exch {drawannot} PDFSTOPONERROR {exec}{stopped {(Error: Ignoring invalid annotation, output may be incorrect.\n) pdfformaterror} if} ifelse cleartomark false} bdef
-/Movie {mark exch loadannot /ANN pdfmark false} bind executeonly def
-/Popup {mark exch loadannot /ANN pdfmark false} bind executeonly def
-/Sound {mark exch loadannot /ANN pdfmark false} bind executeonly def
-/Square {mark exch loadannot /ANN pdfmark false} bind executeonly def
-/Stamp {mark exch loadannot /ANN pdfmark false} bind executeonly def
+/Movie {mark exch loadannot /ANN pdfmark false} bdef
+/Popup {mark exch loadannot /ANN pdfmark false} bdef
+/Sound {mark exch loadannot /ANN pdfmark false} bdef
+/Square {mark exch loadannot /ANN pdfmark false} bdef
+/Stamp {mark exch loadannot /ANN pdfmark false} bdef
/StrikeOut {
mark exch
@@ -4917,7 +4826,7 @@ currentdict /drawannottypes undef
put
} if
loadannot /ANN pdfmark false
-} bind executeonly def
+} bdef
/Squiggly {
mark exch
@@ -4927,10 +4836,10 @@ currentdict /drawannottypes undef
put
} if
loadannot /ANN pdfmark false
-} bind executeonly def
+} bdef
-/Text {mark exch loadannot /ANN pdfmark false} bind executeonly def
-/TrapNet {mark exch loadannot /ANN pdfmark false} bind executeonly def
+/Text {mark exch loadannot /ANN pdfmark false} bdef
+/TrapNet {mark exch loadannot /ANN pdfmark false} bdef
/Underline {
mark exch
@@ -4940,23 +4849,18 @@ currentdict /drawannottypes undef
put
} if
loadannot /ANN pdfmark false
-} bind executeonly def
+} bdef
%% Widget annotations are only used with AcroForms, and since we don't preserve AcroForms
%% we don't want to preserve widget annotations either, because the consumer of the new
%% PDF won't know what values they should take. So we draw widget annotations instead. If we
%% ever preserve AcroForms then we should alter this to preserve Widgets as well.
%% simply chane "drawannot" to "mark exch loadannot /ANN pdfmark"
-/Widget {mark exch {drawannot} PDFSTOPONERROR {exec}{stopped {(Error: Ignoring invalid annotation, output may be incorrect.\n) pdfformaterror} if} ifelse cleartomark false} bind executeonly def
+/Widget {mark exch {drawannot} PDFSTOPONERROR {exec}{stopped {(Error: Ignoring invalid annotation, output may be incorrect.\n) pdfformaterror} if} ifelse cleartomark false} bdef
currentdict end readonly def
/preserveannot { % <annot> preserveannot -
-
- dup /.gs.pdfobj# known {
- dup /.gs.pdfobj# undef
- } if
-
dup annotvisible {
gsave
dup dup /Subtype knownoget {
@@ -4984,7 +4888,7 @@ currentdict end readonly def
} ifelse
grestore
} if pop % annotvisible
-} bind executeonly def
+} bdef
currentdict /preserveannottypes undef
currentdict /.PDFDrawAnnotType? undef
@@ -4998,7 +4902,7 @@ currentdict /.PDFDrawAnnotType? undef
} {
oget
} ifelse
-} bind executeonly def
+} bdef
% All procedures have the signature:
% <acroform> <field> <annot|field> foo <acroform> <field> <annot|field>
@@ -5032,7 +4936,7 @@ currentdict /.PDFDrawAnnotType? undef
} ifelse
} ifelse
} ifelse
-} bind executeonly def
+} bdef
/Tx {
dup /AP known {
@@ -5080,7 +4984,7 @@ currentdict /.PDFDrawAnnotType? undef
dup 1 1 3 -1 roll drawwidget
} if
} ifelse
-} bind executeonly def
+} bdef
/Ch {
dup /AP known 3 index /NeedAppearances knownoget not { //true } if not and {
@@ -5128,11 +5032,11 @@ currentdict /.PDFDrawAnnotType? undef
dup 1 1 3 -1 roll drawwidget
} if
} ifelse
-} bind executeonly def
+} bdef
/Sig {
(Sig is not yet implemened ) //== exec
-} bind executeonly def
+} bdef
currentdict end def
@@ -5146,7 +5050,7 @@ currentdict end def
} if
} if
pop pop
-} bind executeonly def
+} bdef
% We distinguish 4 types of nodes on the form field tree:
% - non-terminal field - has a kid that refers to the parent (or anywhere else)
@@ -5173,14 +5077,14 @@ currentdict end def
} {
draw_terminal_field % merged annotation % -
} ifelse
-} bind executeonly def
+} bdef
/draw_acro_form { % <form> draw_acro_form -
dup /Fields knownoget {
{ oforce draw_form_field } forall
} if
pop
-} bind executeonly def
+} bdef
currentdict /draw_terminal_field_dict undef