Blame SOURCES/ghostscript-cve-2019-3839.patch

38aaa9
From 95aa78beae9489d5c9f898fe2032aa23f860867d Mon Sep 17 00:00:00 2001
38aaa9
From: Ray Johnston <ray.johnston@artifex.com>
38aaa9
Date: Fri, 21 Sep 2018 11:16:18 -0700
38aaa9
Subject: [PATCH 1/6] Catch errors in setpagesize, .setpagesize and
38aaa9
 setpagedevice and cleanup
38aaa9
38aaa9
Bug 699794 showed that attempt to change page size in SAFER mode when the
38aaa9
nulldevice was the currentdevice would leave 'false' on the stack. Run
38aaa9
.setdevice in stopped and clean up, and also clean up .setpagesize
38aaa9
---
38aaa9
 Resource/Init/gs_lev2.ps  |  9 ++++++++-
38aaa9
 Resource/Init/gs_setpd.ps |  9 +++++++--
38aaa9
 Resource/Init/gs_statd.ps | 22 ++++++++++++++++++----
38aaa9
 3 files changed, 33 insertions(+), 7 deletions(-)
38aaa9
38aaa9
diff --git a/Resource/Init/gs_lev2.ps b/Resource/Init/gs_lev2.ps
38aaa9
index b69303d..ab0c32e 100644
38aaa9
--- a/Resource/Init/gs_lev2.ps
38aaa9
+++ b/Resource/Init/gs_lev2.ps
38aaa9
@@ -616,7 +616,14 @@ currentuserparams /WaitTimeout known
38aaa9
    .dicttomark setpagedevice
38aaa9
    /WaitTimeout exch mark /JobTimeout 5 2 roll .dicttomark setsystemparams
38aaa9
  } bind def
38aaa9
-/.setpagesize { 2 array astore /PageSize .dict1 setpagedevice } bind def
38aaa9
+/.setpagesize
38aaa9
+ { 2 copy 2 array astore /PageSize .dict1 { setpagedevice } stopped {
38aaa9
+     pop	% the setpagedevice dict
38aaa9
+     /setpagesize $error /errorname get signalerror
38aaa9
+   } {
38aaa9
+     pop pop	% success -- pop the arguments
38aaa9
+   } ifelse
38aaa9
+ } bind def
38aaa9
 /setduplexmode { /Duplex .dict1 setpagedevice } bind def
38aaa9
 /setmargins
38aaa9
  { exch 2 array astore /Margins .dict1 setpagedevice
38aaa9
diff --git a/Resource/Init/gs_setpd.ps b/Resource/Init/gs_setpd.ps
38aaa9
index 46e5810..7875d1f 100644
38aaa9
--- a/Resource/Init/gs_setpd.ps
38aaa9
+++ b/Resource/Init/gs_setpd.ps
38aaa9
@@ -932,10 +932,15 @@ SETPDDEBUG { (Recovering.) = pstack flush } if
38aaa9
                 % Stack: mark ... <merged> <failed> <device> <eraseflag>
38aaa9
 SETPDDEBUG { (Installing.) = pstack flush } if
38aaa9
 
38aaa9
-    pop
38aaa9
+   pop
38aaa9
                 % .setdevice clears the current page device!
38aaa9
    .currentpagedevice pop exch
38aaa9
-   .setdevice pop
38aaa9
+   { .setdevice } stopped {
38aaa9
+     cleartomark exch pop
38aaa9
+     /setpagedevice $error /errorname get
38aaa9
+     signalerror
38aaa9
+   } if
38aaa9
+   pop
38aaa9
    .setpagedevice
38aaa9
 
38aaa9
                 % Implement UseCIEColor directly if this is a LL3 system.
38aaa9
diff --git a/Resource/Init/gs_statd.ps b/Resource/Init/gs_statd.ps
38aaa9
index 64c6463..34b759c 100644
38aaa9
--- a/Resource/Init/gs_statd.ps
38aaa9
+++ b/Resource/Init/gs_statd.ps
38aaa9
@@ -39,7 +39,13 @@ statusdict begin
38aaa9
 % These procedures are also accessed as data structures during initialization,
38aaa9
 % so the page dimensions must be the first two elements of the procedure.
38aaa9
 
38aaa9
-/.setpagesize { /statusdict .systemvar begin .setpagesize end } bind def
38aaa9
+/.setpagesize {
38aaa9
+   /statusdict .systemvar begin
38aaa9
+   { .setpagesize } stopped {
38aaa9
+     /setpagesize $error /errorname get signalerror
38aaa9
+   } if
38aaa9
+   end
38aaa9
+} bind def
38aaa9
 
38aaa9
                 % Page sizes defined by Adobe documentation
38aaa9
                 % Note: these executable arrays should all begin with two
38aaa9
@@ -261,9 +267,17 @@ readonly def
38aaa9
                 % The Adobe documentation only defines setpagetype
38aaa9
                 % (a Level 1 operator) as accepting the values 0 and 1,
38aaa9
                 % so we do too.
38aaa9
-      {/letter /note} 1 index get
38aaa9
-      //systemdict /userdict get exch get cvx exec
38aaa9
-      /pagetype exch def
38aaa9
+      dup type /integertype ne {
38aaa9
+        /setpage /typecheck signalerror
38aaa9
+      } {
38aaa9
+        dup 0 ne 1 index 1 ne or {
38aaa9
+          /setpage /rangecheck signalerror
38aaa9
+        } {
38aaa9
+          {/letter /note} 1 index get
38aaa9
+          //systemdict /userdict get exch get cvx exec
38aaa9
+        } ifelse
38aaa9
+        /pagetype exch def
38aaa9
+    } ifelse
38aaa9
     end
38aaa9
   } bind def
38aaa9
 
38aaa9
-- 
38aaa9
2.20.1
38aaa9
38aaa9
38aaa9
From c29ec2fff76e45bbf9cd767ff541556c5d064be4 Mon Sep 17 00:00:00 2001
38aaa9
From: Ray Johnston <ray.johnston@artifex.com>
38aaa9
Date: Fri, 21 Sep 2018 12:00:50 -0700
38aaa9
Subject: [PATCH 2/6] Add parameter checking in setresolution
38aaa9
38aaa9
Found in sequence for bug 699794
38aaa9
---
38aaa9
 Resource/Init/gs_lev2.ps | 9 ++++++++-
38aaa9
 1 file changed, 8 insertions(+), 1 deletion(-)
38aaa9
38aaa9
diff --git a/Resource/Init/gs_lev2.ps b/Resource/Init/gs_lev2.ps
38aaa9
index ab0c32e..0f0d573 100644
38aaa9
--- a/Resource/Init/gs_lev2.ps
38aaa9
+++ b/Resource/Init/gs_lev2.ps
38aaa9
@@ -637,7 +637,14 @@ currentuserparams /WaitTimeout known
38aaa9
    .dicttomark setpagedevice
38aaa9
  } bind def
38aaa9
 /setresolution
38aaa9
- { dup 2 array astore /HWResolution .dict1 setpagedevice
38aaa9
+ { count 1 lt { /setresolution /stackunderflow signalerror } if
38aaa9
+   dup type dup /integertype eq exch /realtype eq or not
38aaa9
+   {
38aaa9
+      /setresolution /typecheck signalerror
38aaa9
+   } if
38aaa9
+   dup 2 array astore /HWResolution .dict1 { setpagedevice } stopped {
38aaa9
+     pop /setresolution $error /errorname get signalerror
38aaa9
+   } if
38aaa9
  } bind def
38aaa9
 %END PAGEDEVICE
38aaa9
 
38aaa9
-- 
38aaa9
2.20.1
38aaa9
38aaa9
38aaa9
From fe4c47d8e25d6366ecbb5ff487348148b908a89e Mon Sep 17 00:00:00 2001
38aaa9
From: Nancy Durgin <nancy.durgin@artifex.com>
38aaa9
Date: Tue, 13 Nov 2018 14:23:41 -0800
38aaa9
Subject: [PATCH 3/6] Undefine some level2-related operators
38aaa9
38aaa9
These are only a partial set.  Undefine them in both the level2dict and
38aaa9
systemdict.  They are undef'd in gs_init.ps because they are used outside
38aaa9
the scope of just gs_lev2.ps
38aaa9
38aaa9
      /.execform1
38aaa9
      /.getdevparams
38aaa9
      /.setuserparams2
38aaa9
      /.startjob
38aaa9
      /.checkFilePermitparams
38aaa9
      /.checksetparams
38aaa9
      /.copyparam
38aaa9
      /.setpagesize
38aaa9
38aaa9
Rename .dict1 to .pair2dict and use immediate reference.
38aaa9
38aaa9
Undef these at end of gs_lev2.ps (should never make it into systemdict):
38aaa9
      /.pair2dict
38aaa9
      /.checkprocesscomment
38aaa9
---
38aaa9
 Resource/Init/gs_init.ps | 18 ++++++++++++++++++
38aaa9
 Resource/Init/gs_lev2.ps | 34 +++++++++++++++++++++-------------
38aaa9
 2 files changed, 39 insertions(+), 13 deletions(-)
38aaa9
38aaa9
diff --git a/Resource/Init/gs_init.ps b/Resource/Init/gs_init.ps
38aaa9
index 48bb96d..e915f11 100644
38aaa9
--- a/Resource/Init/gs_init.ps
38aaa9
+++ b/Resource/Init/gs_init.ps
38aaa9
@@ -2271,6 +2271,24 @@ SAFER { .setsafeglobal } if
38aaa9
   ]
38aaa9
   {systemdict exch .forceundef} forall
38aaa9
 
38aaa9
+  % level 2 operators, undefine from both systemdict and level2dict
38aaa9
+  [
38aaa9
+      /.execform1
38aaa9
+      /.getdevparams
38aaa9
+      /.setuserparams2
38aaa9
+      /.startjob
38aaa9
+      /.checkFilePermitparams
38aaa9
+      /.checksetparams
38aaa9
+      /.copyparam
38aaa9
+      /.setpagesize
38aaa9
+
38aaa9
+% Couldn't figure out how to do these yet
38aaa9
+%      /.checkparamtype
38aaa9
+%      /.startnewjob
38aaa9
+  ]
38aaa9
+  dup {level2dict exch .forceundef} forall
38aaa9
+  {systemdict exch .forceundef} forall
38aaa9
+
38aaa9
   //systemdict /UndefinePostScriptOperators .forceundef
38aaa9
 } .bind executeonly def % must be bound and hidden for .forceundef
38aaa9
 
38aaa9
diff --git a/Resource/Init/gs_lev2.ps b/Resource/Init/gs_lev2.ps
38aaa9
index 0f0d573..e6f0645 100644
38aaa9
--- a/Resource/Init/gs_lev2.ps
38aaa9
+++ b/Resource/Init/gs_lev2.ps
38aaa9
@@ -64,7 +64,7 @@ level2dict begin
38aaa9
       pop
38aaa9
     } ifelse pop pop
38aaa9
   } forall pop pop
38aaa9
-} .bind def	% not odef, shouldn't reset stacks
38aaa9
+} .bind odef
38aaa9
 
38aaa9
 % currentuser/systemparams creates and returns a dictionary in the
38aaa9
 % current VM.  The easiest way to make this work is to copy any composite
38aaa9
@@ -101,7 +101,7 @@ level2dict begin
38aaa9
     1 index length string exch .setglobal
38aaa9
     copy exch not { readonly } if
38aaa9
   } if
38aaa9
-} .bind def
38aaa9
+} .bind odef
38aaa9
 
38aaa9
 % Some user parameters are managed entirely at the PostScript level.
38aaa9
 % We take care of that here.
38aaa9
@@ -345,13 +345,13 @@ end
38aaa9
   } ifelse
38aaa9
 } .bind def
38aaa9
 /ProcessComment //null .definepsuserparam
38aaa9
-psuserparams /ProcessComment {.checkprocesscomment} put
38aaa9
+psuserparams /ProcessComment {//.checkprocesscomment exec} put
38aaa9
 (%ProcessComment) cvn {
38aaa9
   /ProcessComment getuserparam
38aaa9
   dup //null eq { pop pop pop } { exec } ifelse
38aaa9
 } bind def
38aaa9
 /ProcessDSCComment //null .definepsuserparam
38aaa9
-psuserparams /ProcessDSCComment {.checkprocesscomment} put
38aaa9
+psuserparams /ProcessDSCComment {//.checkprocesscomment exec} put
38aaa9
 /.loadingfont //false def
38aaa9
 (%ProcessDSCComment) cvn {
38aaa9
   /ProcessDSCComment getuserparam
38aaa9
@@ -556,7 +556,8 @@ end		% serverdict
38aaa9
 % Note that statusdict must be allocated in local VM.
38aaa9
 % We don't bother with many of these yet.
38aaa9
 
38aaa9
-/.dict1 { exch mark 3 1 roll .dicttomark } bind def
38aaa9
+% convenience function to make a dictionary from an object and a key
38aaa9
+/.pair2dict { exch mark 3 1 roll .dicttomark } bind def
38aaa9
 
38aaa9
 currentglobal //false setglobal 25 dict exch setglobal begin
38aaa9
 currentsystemparams
38aaa9
@@ -569,11 +570,11 @@ systemdict /buildtime dup load put
38aaa9
 /checkpassword { .checkpassword 0 gt } bind def
38aaa9
 dup /DoStartPage known
38aaa9
  { /dostartpage { /DoStartPage getsystemparam } bind def
38aaa9
-   /setdostartpage { /DoStartPage .dict1 setsystemparams } bind def
38aaa9
+   /setdostartpage { /DoStartPage //.pair2dict exec setsystemparams } bind def
38aaa9
  } if
38aaa9
 dup /StartupMode known
38aaa9
  { /dosysstart { /StartupMode getsystemparam 0 ne } bind def
38aaa9
-   /setdosysstart { { 1 } { 0 } ifelse /StartupMode .dict1 setsystemparams } bind def
38aaa9
+   /setdosysstart { { 1 } { 0 } ifelse /StartupMode //.pair2dict exec setsystemparams } bind def
38aaa9
  } if
38aaa9
 %****** Setting jobname is supposed to set userparams.JobName, too.
38aaa9
 /jobname { /JobName getuserparam } bind def
38aaa9
@@ -581,7 +582,7 @@ dup /StartupMode known
38aaa9
 /ramsize { /RamSize getsystemparam } bind def
38aaa9
 /realformat 1 index /RealFormat get def
38aaa9
 dup /PrinterName known
38aaa9
- { /setprintername { /PrinterName .dict1 setsystemparams } bind def
38aaa9
+ { /setprintername { /PrinterName //.pair2dict exec setsystemparams } bind def
38aaa9
  } if
38aaa9
 /printername
38aaa9
  { currentsystemparams /PrinterName .knownget not { () } if exch copy
38aaa9
@@ -617,18 +618,18 @@ currentuserparams /WaitTimeout known
38aaa9
    /WaitTimeout exch mark /JobTimeout 5 2 roll .dicttomark setsystemparams
38aaa9
  } bind def
38aaa9
 /.setpagesize
38aaa9
- { 2 copy 2 array astore /PageSize .dict1 { setpagedevice } stopped {
38aaa9
+ { 2 copy 2 array astore /PageSize //.pair2dict exec { setpagedevice } stopped {
38aaa9
      pop	% the setpagedevice dict
38aaa9
      /setpagesize $error /errorname get signalerror
38aaa9
    } {
38aaa9
      pop pop	% success -- pop the arguments
38aaa9
    } ifelse
38aaa9
  } bind def
38aaa9
-/setduplexmode { /Duplex .dict1 setpagedevice } bind def
38aaa9
+/setduplexmode { /Duplex //.pair2dict exec setpagedevice } bind def
38aaa9
 /setmargins
38aaa9
- { exch 2 array astore /Margins .dict1 setpagedevice
38aaa9
+ { exch 2 array astore /Margins //.pair2dict exec setpagedevice
38aaa9
  } bind def
38aaa9
-/setpagemargin { 0 2 array astore /PageOffset .dict1 setpagedevice } bind def
38aaa9
+/setpagemargin { 0 2 array astore /PageOffset //.pair2dict exec setpagedevice } bind def
38aaa9
 /setpageparams
38aaa9
  { mark /PageSize 6 -2 roll
38aaa9
    4 index 1 and ORIENT1 { 1 } { 0 } ifelse ne { exch } if 2 array astore
38aaa9
@@ -642,7 +643,7 @@ currentuserparams /WaitTimeout known
38aaa9
    {
38aaa9
       /setresolution /typecheck signalerror
38aaa9
    } if
38aaa9
-   dup 2 array astore /HWResolution .dict1 { setpagedevice } stopped {
38aaa9
+   dup 2 array astore /HWResolution //.pair2dict exec { setpagedevice } stopped {
38aaa9
      pop /setresolution $error /errorname get signalerror
38aaa9
    } if
38aaa9
  } bind def
38aaa9
@@ -1254,3 +1255,10 @@ def
38aaa9
 %END TN 5044 psuedo-ops
38aaa9
 
38aaa9
 end				% level2dict
38aaa9
+
38aaa9
+% undefine things defined in this file and not referenced elsewhere
38aaa9
+[
38aaa9
+    /.checkprocesscomment
38aaa9
+    /.pair2dict
38aaa9
+]
38aaa9
+{level2dict exch .forceundef} forall
38aaa9
-- 
38aaa9
2.20.1
38aaa9
38aaa9
38aaa9
From 932f4106a00e99e4ee32dcc02e57d3636f383ea1 Mon Sep 17 00:00:00 2001
38aaa9
From: Nancy Durgin <nancy.durgin@artifex.com>
38aaa9
Date: Wed, 28 Nov 2018 10:09:01 -0800
38aaa9
Subject: [PATCH 4/6] Undef internal functions from level2dict
38aaa9
38aaa9
---
38aaa9
 Resource/Init/gs_lev2.ps | 6 ++++--
38aaa9
 1 file changed, 4 insertions(+), 2 deletions(-)
38aaa9
38aaa9
diff --git a/Resource/Init/gs_lev2.ps b/Resource/Init/gs_lev2.ps
38aaa9
index e6f0645..7638f2a 100644
38aaa9
--- a/Resource/Init/gs_lev2.ps
38aaa9
+++ b/Resource/Init/gs_lev2.ps
38aaa9
@@ -117,7 +117,7 @@ counttomark 2 idiv {
38aaa9
 } repeat pop
38aaa9
 /.definepsuserparam {		% <name> <value> .definepsuserparam -
38aaa9
   psuserparams 3 copy pop
38aaa9
-  type cvlit /.checkparamtype cvx 2 packedarray cvx put
38aaa9
+  type cvlit //.checkparamtype /exec load 3 packedarray cvx put
38aaa9
   userparams 3 1 roll put
38aaa9
 } .bind def
38aaa9
 end
38aaa9
@@ -211,7 +211,7 @@ end
38aaa9
      } forall
38aaa9
    } if
38aaa9
    /setsystemparams //pssystemparams mark exch {
38aaa9
-     type cvlit /.checkparamtype cvx 2 packedarray cvx
38aaa9
+     type cvlit //.checkparamtype /exec load 3 packedarray cvx
38aaa9
    } forall .dicttomark .checksetparams
38aaa9
         % Set the C-level system params.  If this succeeds, we know that
38aaa9
         % the password check succeeded.
38aaa9
@@ -1260,5 +1260,7 @@ end				% level2dict
38aaa9
 [
38aaa9
     /.checkprocesscomment
38aaa9
     /.pair2dict
38aaa9
+    /.setcolorrendering1
38aaa9
+    /.checkparamtype
38aaa9
 ]
38aaa9
 {level2dict exch .forceundef} forall
38aaa9
-- 
38aaa9
2.20.1
38aaa9
38aaa9
38aaa9
From e7ff64cf9b756278f19c87d295ee0fd95c955c05 Mon Sep 17 00:00:00 2001
38aaa9
From: Nancy Durgin <nancy.durgin@artifex.com>
38aaa9
Date: Wed, 23 Jan 2019 12:00:30 -0800
38aaa9
Subject: [PATCH 5/6] Fixed bug caused by the way .checksetparams was undef'd
38aaa9
38aaa9
Previously, had undef'd it by making it an operator.
38aaa9
Now just use an immediate reference and undef it in the gs_lev2.ps file.
38aaa9
38aaa9
This fixes bug introduced in commit fe4c47d8e25d6366ecbb5ff487348148b908a89e.
38aaa9
38aaa9
Undef'ing .checksetparams by making it an operator doesn't work right because
38aaa9
errors report .checksetparams as the offending function instead of
38aaa9
the operator that uses it (setsystemparams in this case).
38aaa9
38aaa9
This caused an error in file /tests_private/ps/ps3cet/27-09.PS on page 3,
38aaa9
where it reports the offending function of some error-handling tests.
38aaa9
Reporting function should be 'setsystemparams', not '.checksetparams' on
38aaa9
this page.
38aaa9
---
38aaa9
 Resource/Init/gs_init.ps | 1 -
38aaa9
 Resource/Init/gs_lev2.ps | 7 ++++---
38aaa9
 2 files changed, 4 insertions(+), 4 deletions(-)
38aaa9
38aaa9
diff --git a/Resource/Init/gs_init.ps b/Resource/Init/gs_init.ps
38aaa9
index e915f11..a2503f1 100644
38aaa9
--- a/Resource/Init/gs_init.ps
38aaa9
+++ b/Resource/Init/gs_init.ps
38aaa9
@@ -2278,7 +2278,6 @@ SAFER { .setsafeglobal } if
38aaa9
       /.setuserparams2
38aaa9
       /.startjob
38aaa9
       /.checkFilePermitparams
38aaa9
-      /.checksetparams
38aaa9
       /.copyparam
38aaa9
       /.setpagesize
38aaa9
 
38aaa9
diff --git a/Resource/Init/gs_lev2.ps b/Resource/Init/gs_lev2.ps
38aaa9
index 7638f2a..de1cc94 100644
38aaa9
--- a/Resource/Init/gs_lev2.ps
38aaa9
+++ b/Resource/Init/gs_lev2.ps
38aaa9
@@ -64,7 +64,7 @@ level2dict begin
38aaa9
       pop
38aaa9
     } ifelse pop pop
38aaa9
   } forall pop pop
38aaa9
-} .bind odef
38aaa9
+} .bind def
38aaa9
 
38aaa9
 % currentuser/systemparams creates and returns a dictionary in the
38aaa9
 % current VM.  The easiest way to make this work is to copy any composite
38aaa9
@@ -129,7 +129,7 @@ end
38aaa9
 /.setuserparams2 {
38aaa9
         % Check that we will be able to set the PostScript-level
38aaa9
         % user parameters.
38aaa9
-  /setuserparams /psuserparams .systemvar .checksetparams
38aaa9
+  /setuserparams /psuserparams .systemvar //.checksetparams exec
38aaa9
         % Set the C-level user params.  If this succeeds, we know that
38aaa9
         % the password check succeeded.
38aaa9
   dup .setuserparams
38aaa9
@@ -212,7 +212,7 @@ end
38aaa9
    } if
38aaa9
    /setsystemparams //pssystemparams mark exch {
38aaa9
      type cvlit //.checkparamtype /exec load 3 packedarray cvx
38aaa9
-   } forall .dicttomark .checksetparams
38aaa9
+   } forall .dicttomark //.checksetparams exec
38aaa9
         % Set the C-level system params.  If this succeeds, we know that
38aaa9
         % the password check succeeded.
38aaa9
    dup .setsystemparams
38aaa9
@@ -1262,5 +1262,6 @@ end				% level2dict
38aaa9
     /.pair2dict
38aaa9
     /.setcolorrendering1
38aaa9
     /.checkparamtype
38aaa9
+    /.checksetparams
38aaa9
 ]
38aaa9
 {level2dict exch .forceundef} forall
38aaa9
-- 
38aaa9
2.20.1
38aaa9
38aaa9
38aaa9
From 4ec9ca74bed49f2a82acb4bf430eae0d8b3b75c9 Mon Sep 17 00:00:00 2001
38aaa9
From: Ray Johnston <ray.johnston@artifex.com>
38aaa9
Date: Thu, 31 Jan 2019 11:31:30 -0800
38aaa9
Subject: [PATCH 6/6] Hide pdfdict and GS_PDF_ProcSet (internal stuff for the
38aaa9
 PDF interp).
38aaa9
38aaa9
We now keep GS_PDF_ProcSet in pdfdict, and immediately bind pdfdict
38aaa9
where needed so we can undef it after the last PDF interp file has
38aaa9
run (pdf_sec.ps).
38aaa9
---
38aaa9
 Resource/Init/pdf_base.ps | 11 ++++----
38aaa9
 Resource/Init/pdf_draw.ps | 59 +++++++++++++++++++--------------------
38aaa9
 Resource/Init/pdf_font.ps |  9 +++---
38aaa9
 Resource/Init/pdf_main.ps | 25 +++++++++--------
38aaa9
 Resource/Init/pdf_ops.ps  | 11 ++++----
38aaa9
 Resource/Init/pdf_sec.ps  |  4 ++-
38aaa9
 6 files changed, 60 insertions(+), 59 deletions(-)
38aaa9
38aaa9
diff --git a/Resource/Init/pdf_base.ps b/Resource/Init/pdf_base.ps
38aaa9
index c62ac0e..d3c3a5f 100644
38aaa9
--- a/Resource/Init/pdf_base.ps
38aaa9
+++ b/Resource/Init/pdf_base.ps
38aaa9
@@ -23,7 +23,6 @@
38aaa9
 
38aaa9
 /.setlanguagelevel where { pop 2 .setlanguagelevel } if
38aaa9
 .currentglobal //true .setglobal
38aaa9
-/pdfdict where { pop } { /pdfdict 100 dict def } ifelse
38aaa9
 pdfdict begin
38aaa9
 
38aaa9
 % Define the name interpretation dictionary for reading values.
38aaa9
@@ -130,11 +129,11 @@ currentdict /num-chars-dict .undef
38aaa9
 
38aaa9
 /.pdfexectoken {		% <count> <opdict> <exectoken> .pdfexectoken ?
38aaa9
   PDFDEBUG {
38aaa9
-    pdfdict /PDFSTEPcount known not { pdfdict /PDFSTEPcount 1 .forceput } executeonly if
38aaa9
+    //pdfdict /PDFSTEPcount known not { //pdfdict /PDFSTEPcount 1 .forceput } executeonly if
38aaa9
     PDFSTEP {
38aaa9
-      pdfdict /PDFtokencount 2 copy .knownget { 1 add } { 1 } ifelse .forceput
38aaa9
+      //pdfdict /PDFtokencount 2 copy .knownget { 1 add } { 1 } ifelse .forceput
38aaa9
       PDFSTEPcount 1 gt {
38aaa9
-        pdfdict /PDFSTEPcount PDFSTEPcount 1 sub .forceput
38aaa9
+        //pdfdict /PDFSTEPcount PDFSTEPcount 1 sub .forceput
38aaa9
       } executeonly
38aaa9
       {
38aaa9
         dup ==only
38aaa9
@@ -142,10 +141,10 @@ currentdict /num-chars-dict .undef
38aaa9
         ( ? ) print flush 1 //false .outputpage
38aaa9
         (%stdin) (r) file 255 string readline {
38aaa9
           token {
38aaa9
-            exch pop pdfdict /PDFSTEPcount 3 -1 roll .forceput
38aaa9
+            exch pop //pdfdict /PDFSTEPcount 3 -1 roll .forceput
38aaa9
           } executeonly
38aaa9
           {
38aaa9
-            pdfdict /PDFSTEPcount 1 .forceput
38aaa9
+            //pdfdict /PDFSTEPcount 1 .forceput
38aaa9
           } executeonly ifelse % token
38aaa9
         } {
38aaa9
           pop /PDFSTEP //false def	 % EOF on stdin
38aaa9
diff --git a/Resource/Init/pdf_draw.ps b/Resource/Init/pdf_draw.ps
38aaa9
index d743ae1..1add3f7 100644
38aaa9
--- a/Resource/Init/pdf_draw.ps
38aaa9
+++ b/Resource/Init/pdf_draw.ps
38aaa9
@@ -18,8 +18,7 @@
38aaa9
 
38aaa9
 /.setlanguagelevel where { pop 2 .setlanguagelevel } if
38aaa9
 .currentglobal //true .setglobal
38aaa9
-/pdfdict where { pop } { /pdfdict 100 dict def } ifelse
38aaa9
-GS_PDF_ProcSet begin
38aaa9
+/GS_PDF_ProcSet load begin
38aaa9
 pdfdict begin
38aaa9
 
38aaa9
 % For simplicity, we use a single interpretation dictionary for all
38aaa9
@@ -113,7 +112,7 @@ pdfdict begin
38aaa9
 
38aaa9
 /resolvefunction {	% <fndict> resolvefunction <function>
38aaa9
   .resolvefn
38aaa9
-  PDFDEBUG { pdfdict /PDFSTEPcount .knownget { 1 le } { //true } ifelse { (%Function: ) print dup === flush } if } if
38aaa9
+  PDFDEBUG { //pdfdict /PDFSTEPcount .knownget { 1 le } { //true } ifelse { (%Function: ) print dup === flush } if } if
38aaa9
 } bind executeonly def
38aaa9
 
38aaa9
 /resolvefnproc {	% <fndict> resolvefnproc <proc>
38aaa9
@@ -1073,7 +1072,7 @@ currentdict end readonly def
38aaa9
 %% finished running the PaintProc.
38aaa9
 
38aaa9
 /.actual_pdfpaintproc {         % <patdict> <resdict> .pdfpaintproc -
38aaa9
-  PDFDEBUG { pdfdict /PDFSTEPcount .knownget { 1 le } { //true } ifelse { (%Begin PaintProc) print dup === flush } if } if
38aaa9
+  PDFDEBUG { //pdfdict /PDFSTEPcount .knownget { 1 le } { //true } ifelse { (%Begin PaintProc) print dup === flush } if } if
38aaa9
   PDFfile fileposition 3 1 roll
38aaa9
   q
38aaa9
   1 index /PaintType oget 1 eq {
38aaa9
@@ -1108,21 +1107,21 @@ currentdict end readonly def
38aaa9
       Q
38aaa9
     }{
38aaa9
       (\n   **** Error: File has unbalanced q/Q operators \(too many Q's\)\n               Output may be incorrect.\n)
38aaa9
-      pdfdict /.Qqwarning_issued .knownget
38aaa9
+      //pdfdict /.Qqwarning_issued .knownget
38aaa9
       {
38aaa9
         {
38aaa9
           pop
38aaa9
         }
38aaa9
         {
38aaa9
-          currentglobal pdfdict gcheck .setglobal
38aaa9
-          pdfdict /.Qqwarning_issued //true .forceput
38aaa9
+          currentglobal //pdfdict gcheck .setglobal
38aaa9
+          //pdfdict /.Qqwarning_issued //true .forceput
38aaa9
           .setglobal
38aaa9
           pdfformaterror
38aaa9
         } executeonly ifelse
38aaa9
       }
38aaa9
       {
38aaa9
-        currentglobal pdfdict gcheck .setglobal
38aaa9
-        pdfdict /.Qqwarning_issued //true .forceput
38aaa9
+        currentglobal //pdfdict gcheck .setglobal
38aaa9
+        //pdfdict /.Qqwarning_issued //true .forceput
38aaa9
         .setglobal
38aaa9
         pdfformaterror
38aaa9
       } executeonly ifelse
38aaa9
@@ -1131,21 +1130,21 @@ currentdict end readonly def
38aaa9
   } loop
38aaa9
   {
38aaa9
     (\n   **** Error: File has unbalanced q/Q operators \(too many q's\)\n               Output may be incorrect.\n)
38aaa9
-    pdfdict /.Qqwarning_issued .knownget
38aaa9
+    //pdfdict /.Qqwarning_issued .knownget
38aaa9
     {
38aaa9
       {
38aaa9
         pop
38aaa9
       }
38aaa9
       {
38aaa9
-        currentglobal pdfdict gcheck .setglobal
38aaa9
-        pdfdict /.Qqwarning_issued //true .forceput
38aaa9
+        currentglobal //pdfdict gcheck .setglobal
38aaa9
+        //pdfdict /.Qqwarning_issued //true .forceput
38aaa9
         .setglobal
38aaa9
         pdfformaterror
38aaa9
       } executeonly ifelse
38aaa9
     }
38aaa9
     {
38aaa9
-      currentglobal pdfdict gcheck .setglobal
38aaa9
-      pdfdict /.Qqwarning_issued //true .forceput
38aaa9
+      currentglobal //pdfdict gcheck .setglobal
38aaa9
+      //pdfdict /.Qqwarning_issued //true .forceput
38aaa9
       .setglobal
38aaa9
       pdfformaterror
38aaa9
     } executeonly ifelse
38aaa9
@@ -1156,7 +1155,7 @@ currentdict end readonly def
38aaa9
   /pdfemptycount exch def
38aaa9
 
38aaa9
   Q
38aaa9
-  PDFDEBUG { pdfdict /PDFSTEPcount .knownget { 1 le } { //true } ifelse { (%End PaintProc) print dup === flush } if } if
38aaa9
+  PDFDEBUG { //pdfdict /PDFSTEPcount .knownget { 1 le } { //true } ifelse { (%End PaintProc) print dup === flush } if } if
38aaa9
   PDFfile exch setfileposition
38aaa9
 } bind executeonly odef
38aaa9
 
38aaa9
@@ -1227,7 +1226,7 @@ currentdict end readonly def
38aaa9
   ] cvx put
38aaa9
   dup /BBox 2 copy knownoget { normrect FixPatternBBox put } { pop pop } ifelse
38aaa9
   dup /.pattern_uses_transparency  1 index patternusestransparency put
38aaa9
-  PDFDEBUG { pdfdict /PDFSTEPcount .knownget { 1 le } { //true } ifelse { (%Pattern: ) print dup === flush } if } if
38aaa9
+  PDFDEBUG { //pdfdict /PDFSTEPcount .knownget { 1 le } { //true } ifelse { (%Pattern: ) print dup === flush } if } if
38aaa9
 } bind executeonly def
38aaa9
 
38aaa9
 /ignore_color_op  (   **** Error: Ignoring a color operation in a cached context.\n               Output may be incorrect.\n) readonly def
38aaa9
@@ -2348,16 +2347,16 @@ currentdict /last-ditch-bpc-csp undef
38aaa9
 } bind executeonly def
38aaa9
 
38aaa9
 /IncrementAppearanceNumber {
38aaa9
-  pdfdict /AppearanceNumber .knownget {
38aaa9
-    1 add pdfdict /AppearanceNumber 3 -1 roll .forceput
38aaa9
+  //pdfdict /AppearanceNumber .knownget {
38aaa9
+    1 add //pdfdict /AppearanceNumber 3 -1 roll .forceput
38aaa9
   } executeonly
38aaa9
   {
38aaa9
-    pdfdict /AppearanceNumber 0 .forceput
38aaa9
+    //pdfdict /AppearanceNumber 0 .forceput
38aaa9
   } executeonly ifelse
38aaa9
 }bind executeonly odef
38aaa9
 
38aaa9
 /MakeAppearanceName {
38aaa9
-  pdfdict /AppearanceNumber get
38aaa9
+  //pdfdict /AppearanceNumber get
38aaa9
   10 string cvs
38aaa9
   dup length 10 add string dup 0 (\{FormName) putinterval
38aaa9
   dup 3 -1 roll
38aaa9
@@ -2378,17 +2377,17 @@ currentdict /last-ditch-bpc-csp undef
38aaa9
   gsave initclip
38aaa9
   MakeNewAppearanceName
38aaa9
   .pdfFormName
38aaa9
-  pdfdict /.PreservePDFForm known {pdfdict /.PreservePDFForm get} {//false}ifelse exch
38aaa9
-  pdfdict /.PreservePDFForm true .forceput
38aaa9
+  //pdfdict /.PreservePDFForm known {//pdfdict /.PreservePDFForm get} {//false}ifelse exch
38aaa9
+  //pdfdict /.PreservePDFForm true .forceput
38aaa9
   DoForm
38aaa9
-  pdfdict /.PreservePDFForm 3 -1 roll .forceput
38aaa9
+  //pdfdict /.PreservePDFForm 3 -1 roll .forceput
38aaa9
   grestore
38aaa9
 } bind executeonly odef
38aaa9
 
38aaa9
 /DoForm {
38aaa9
   %% save the current value, if its true we will set it to false later, in order
38aaa9
   %% to prevent us preserving Forms which are used *from* an annotation /Appearance.
38aaa9
-  pdfdict /.PreservePDFForm known {pdfdict /.PreservePDFForm get} {//false}ifelse exch
38aaa9
+  //pdfdict /.PreservePDFForm known {//pdfdict /.PreservePDFForm get} {//false}ifelse exch
38aaa9
 
38aaa9
   %% We may alter the Default* colour spaces, if the Resources
38aaa9
   %% ColorSpace entry contains one of them. But we don't want that
38aaa9
@@ -2503,13 +2502,13 @@ currentdict /last-ditch-bpc-csp undef
38aaa9
   pdfemptycount countdictstack 3 -1 roll
38aaa9
   /pdfemptycount count 4 sub store
38aaa9
 
38aaa9
-  pdfdict /.PreservePDFForm known {pdfdict /.PreservePDFForm get}{//false} ifelse
38aaa9
+  //pdfdict /.PreservePDFForm known {//pdfdict /.PreservePDFForm get}{//false} ifelse
38aaa9
   {
38aaa9
     %% We must *not* preserve any subsidiary forms (curently at least) as PDF
38aaa9
     %% form preservation doesn't really work. This is used just for Annotation
38aaa9
     %% Appearances currently, and if they should happen to use a form, we do not
38aaa9
     %% want to preserve it.
38aaa9
-    pdfdict /.PreservePDFForm false .forceput
38aaa9
+    //pdfdict /.PreservePDFForm false .forceput
38aaa9
     /q cvx /execform cvx 5 -2 roll
38aaa9
   } executeonly
38aaa9
   {
38aaa9
@@ -2542,7 +2541,7 @@ currentdict /last-ditch-bpc-csp undef
38aaa9
     saved_DCMYK /DefaultCMYK exch /ColorSpace defineresource pop
38aaa9
     end
38aaa9
   } if
38aaa9
-  pdfdict /.PreservePDFForm 3 -1 roll .forceput
38aaa9
+  //pdfdict /.PreservePDFForm 3 -1 roll .forceput
38aaa9
 } bind executeonly odef
38aaa9
 
38aaa9
 /_dops_save 1 array def
38aaa9
@@ -2701,13 +2700,13 @@ drawopdict begin
38aaa9
     % Start by getting the object number for a Form XObject
38aaa9
     dup Page /XObject obj_get dup 0 eq not {
38aaa9
       % Now get the recording dictionary and see if that object number has been seen
38aaa9
-      pdfdict /Recursive_XObject_D get 1 index known {
38aaa9
+      //pdfdict /Recursive_XObject_D get 1 index known {
38aaa9
         (   **** Error: Recursive XObject detected, ignoring ") print 1 index 256 string cvs print (", object number ) print 256 string cvs print (\n) print
38aaa9
         (               Output may be incorrect.\n) pdfformaterror
38aaa9
         //false
38aaa9
       }{
38aaa9
         % We haven't seen it yet, so record it.
38aaa9
-        pdfdict /Recursive_XObject_D get 1 index null put
38aaa9
+        //pdfdict /Recursive_XObject_D get 1 index null put
38aaa9
         3 1 roll
38aaa9
         //true
38aaa9
       }ifelse
38aaa9
@@ -2745,7 +2744,7 @@ drawopdict begin
38aaa9
         (               Output may be incorrect.\n) pdfformaterror
38aaa9
       } ifelse
38aaa9
       PDFfile exch setfileposition
38aaa9
-      pdfdict /Recursive_XObject_D get exch undef
38aaa9
+      //pdfdict /Recursive_XObject_D get exch undef
38aaa9
     }{
38aaa9
       % Otherwise ignore it and tidy up the stacks
38aaa9
       pop pop
38aaa9
diff --git a/Resource/Init/pdf_font.ps b/Resource/Init/pdf_font.ps
38aaa9
index 46408f9..275b659 100644
38aaa9
--- a/Resource/Init/pdf_font.ps
38aaa9
+++ b/Resource/Init/pdf_font.ps
38aaa9
@@ -37,8 +37,7 @@
38aaa9
 
38aaa9
 /.setlanguagelevel where { pop 2 .setlanguagelevel } if
38aaa9
 .currentglobal //true .setglobal
38aaa9
-/pdfdict where { pop } { /pdfdict 100 dict def } ifelse
38aaa9
-GS_PDF_ProcSet begin
38aaa9
+/GS_PDF_ProcSet load begin	% from userdict at this point
38aaa9
 pdfdict begin
38aaa9
 
38aaa9
 % We cache the PostScript font in an additional element of the
38aaa9
@@ -1219,11 +1218,11 @@ currentdict /eexec_pdf_param_dict .undef
38aaa9
             .pdfruncontext
38aaa9
             countdictstack BuildCharDictDepth sub
38aaa9
             {
38aaa9
-              pdfdict /.Qqwarning_issued .knownget {not}{//true} ifelse
38aaa9
+              //pdfdict /.Qqwarning_issued .knownget {not}{//true} ifelse
38aaa9
               {
38aaa9
                 (\n   **** Warning: Type 3 glyph has unbalanced q/Q operators \(too many q's\)\n               Output may be incorrect.\n)
38aaa9
                 pdfformatwarning
38aaa9
-                pdfdict /.Qqwarning_issued //true .forceput
38aaa9
+                //pdfdict /.Qqwarning_issued //true .forceput
38aaa9
               } executeonly if
38aaa9
               Q
38aaa9
             } repeat
38aaa9
@@ -2334,7 +2333,7 @@ currentdict /bndef undef
38aaa9
   dup //null eq
38aaa9
   {pop}
38aaa9
   {
38aaa9
-    pdfdict /InputPDFFileName .knownget {.CRCHashFilenameAndObject} if
38aaa9
+    //pdfdict /InputPDFFileName .knownget {.CRCHashFilenameAndObject} if
38aaa9
     exch dup /.OrigUniqueIDXUID .knownget not
38aaa9
     {
38aaa9
       dup /XUID .knownget not
38aaa9
diff --git a/Resource/Init/pdf_main.ps b/Resource/Init/pdf_main.ps
38aaa9
index dd1480b..e44288e 100644
38aaa9
--- a/Resource/Init/pdf_main.ps
38aaa9
+++ b/Resource/Init/pdf_main.ps
38aaa9
@@ -18,8 +18,9 @@
38aaa9
 
38aaa9
 /.setlanguagelevel where { pop 2 .setlanguagelevel } if
38aaa9
 .currentglobal //true .setglobal
38aaa9
-/pdfdict where { pop } { /pdfdict 100 dict def } ifelse
38aaa9
 pdfdict begin
38aaa9
+/GS_PDF_ProcSet dup load def	% keep in pdfdict to hide it
38aaa9
+userdict /GS_PDF_ProcSet undef
38aaa9
 
38aaa9
 % Patch in an obsolete variable used by some third-party software.
38aaa9
 /#? //false def
38aaa9
@@ -304,8 +305,8 @@ currentdict /runpdfstring .undef
38aaa9
    /Page //null def
38aaa9
    /DSCPageCount 0 def
38aaa9
    /PDFSave //null def
38aaa9
-   GS_PDF_ProcSet begin
38aaa9
-   pdfdict begin
38aaa9
+   //pdfdict /GS_PDF_ProcSet get begin
38aaa9
+   //pdfdict begin
38aaa9
    pdfopen begin
38aaa9
    /CumulativePageCount currentpagedevice /PageCount get def
38aaa9
 } bind executeonly def
38aaa9
@@ -624,7 +625,7 @@ currentdict /runpdfstring .undef
38aaa9
   %% copied to a temporary file) and store it in pdfdict. We will use this for
38aaa9
   %% hashing fonts to detect if fonts with the same name are from different files.
38aaa9
   %%
38aaa9
-  dup currentglobal exch true setglobal .getfilename exch setglobal /InputPDFFileName exch pdfdict 3 1 roll .forceput
38aaa9
+  dup currentglobal exch true setglobal .getfilename exch setglobal /InputPDFFileName exch //pdfdict 3 1 roll .forceput
38aaa9
 
38aaa9
   //runpdfbegin exec
38aaa9
   //pdf_collection_files exec
38aaa9
@@ -1390,7 +1391,7 @@ currentdict /xref-char-dict undef
38aaa9
 } bind executeonly def
38aaa9
 
38aaa9
 /pdfopenfile {		% <file> pdfopenfile <dict>
38aaa9
-   pdfdict readonly pop		% can't do it any earlier than this
38aaa9
+   //pdfdict readonly pop		% can't do it any earlier than this
38aaa9
    32 dict begin
38aaa9
    /LocalResources 0 dict def
38aaa9
    /DefaultQstate //null def	% establish binding
38aaa9
@@ -2684,21 +2685,21 @@ currentdict /PDF2PS_matrix_key undef
38aaa9
     StreamRunAborted not {
38aaa9
       (\n   **** Error: File has unbalanced q/Q operators \(too many q's\)\n               Output may be incorrect.\n)
38aaa9
 
38aaa9
-      pdfdict /.Qqwarning_issued .knownget
38aaa9
+      //pdfdict /.Qqwarning_issued .knownget
38aaa9
       {
38aaa9
         {
38aaa9
           pop
38aaa9
         }
38aaa9
         {
38aaa9
-          currentglobal pdfdict gcheck .setglobal
38aaa9
-          pdfdict /.Qqwarning_issued //true .forceput
38aaa9
+          currentglobal //pdfdict gcheck .setglobal
38aaa9
+          //pdfdict /.Qqwarning_issued //true .forceput
38aaa9
           .setglobal
38aaa9
           pdfformaterror
38aaa9
         } executeonly ifelse
38aaa9
       }
38aaa9
       {
38aaa9
-        currentglobal pdfdict gcheck .setglobal
38aaa9
-        pdfdict /.Qqwarning_issued //true .forceput
38aaa9
+        currentglobal //pdfdict gcheck .setglobal
38aaa9
+        //pdfdict /.Qqwarning_issued //true .forceput
38aaa9
         .setglobal
38aaa9
         pdfformaterror
38aaa9
       } executeonly ifelse
38aaa9
@@ -2710,8 +2711,8 @@ currentdict /PDF2PS_matrix_key undef
38aaa9
   Repaired		% pass Repaired state around the restore
38aaa9
   RepairedAnError
38aaa9
   PDFSave restore
38aaa9
-  currentglobal pdfdict gcheck .setglobal
38aaa9
-  pdfdict /.Qqwarning_issued //false .forceput
38aaa9
+  currentglobal //pdfdict gcheck .setglobal
38aaa9
+  //pdfdict /.Qqwarning_issued //false .forceput
38aaa9
   .setglobal
38aaa9
   /RepairedAnError exch def
38aaa9
   /Repaired exch def
38aaa9
diff --git a/Resource/Init/pdf_ops.ps b/Resource/Init/pdf_ops.ps
38aaa9
index aa09641..c2e7461 100644
38aaa9
--- a/Resource/Init/pdf_ops.ps
38aaa9
+++ b/Resource/Init/pdf_ops.ps
38aaa9
@@ -24,6 +24,7 @@
38aaa9
 systemdict /pdfmark known not
38aaa9
  { userdict /pdfmark { cleartomark } bind executeonly put } if
38aaa9
 
38aaa9
+systemdict /pdfdict where { pop } { /pdfdict 100 dict put } ifelse
38aaa9
 userdict /GS_PDF_ProcSet 256 dict dup begin
38aaa9
 
38aaa9
 % ---------------- Abbreviations ---------------- %
38aaa9
@@ -174,21 +175,21 @@ currentdict /gput_always_allow .undef
38aaa9
   {
38aaa9
     (\n   **** Error: File has unbalanced q/Q operators \(too many Q's\)\n               Output may be incorrect.\n)
38aaa9
 
38aaa9
-    pdfdict /.Qqwarning_issued .knownget
38aaa9
+    //pdfdict /.Qqwarning_issued .knownget
38aaa9
     {
38aaa9
       {
38aaa9
         pop
38aaa9
       }
38aaa9
       {
38aaa9
-        currentglobal pdfdict gcheck .setglobal
38aaa9
-        pdfdict /.Qqwarning_issued //true .forceput
38aaa9
+        currentglobal //pdfdict gcheck .setglobal
38aaa9
+        //pdfdict /.Qqwarning_issued //true .forceput
38aaa9
         .setglobal
38aaa9
         pdfformaterror
38aaa9
       } executeonly ifelse
38aaa9
     }
38aaa9
     {
38aaa9
-      currentglobal pdfdict gcheck .setglobal
38aaa9
-      pdfdict /.Qqwarning_issued //true .forceput
38aaa9
+      currentglobal //pdfdict gcheck .setglobal
38aaa9
+      //pdfdict /.Qqwarning_issued //true .forceput
38aaa9
       .setglobal
38aaa9
       pdfformaterror
38aaa9
     } executeonly ifelse
38aaa9
diff --git a/Resource/Init/pdf_sec.ps b/Resource/Init/pdf_sec.ps
38aaa9
index 143efb7..a8e3d2e 100644
38aaa9
--- a/Resource/Init/pdf_sec.ps
38aaa9
+++ b/Resource/Init/pdf_sec.ps
38aaa9
@@ -39,7 +39,6 @@
38aaa9
 
38aaa9
 /.setlanguagelevel where { pop 2 .setlanguagelevel } if
38aaa9
 .currentglobal //true .setglobal
38aaa9
-/pdfdict where { pop } { /pdfdict 100 dict def } ifelse
38aaa9
 pdfdict begin
38aaa9
 
38aaa9
 % Older ghostscript versions do not have .pdftoken, so we use 'token' instead.
38aaa9
@@ -748,4 +747,7 @@ currentdict /PDFScanRules_null undef
38aaa9
  } bind executeonly def
38aaa9
 
38aaa9
 end			% pdfdict
38aaa9
+
38aaa9
+systemdict /pdfdict .forceundef		% hide pdfdict
38aaa9
+
38aaa9
 .setglobal
38aaa9
-- 
38aaa9
2.20.1
38aaa9