summaryrefslogtreecommitdiff
path: root/gs/Resource/Init/gs_init.ps
diff options
context:
space:
mode:
Diffstat (limited to 'gs/Resource/Init/gs_init.ps')
-rw-r--r--gs/Resource/Init/gs_init.ps23
1 files changed, 22 insertions, 1 deletions
diff --git a/gs/Resource/Init/gs_init.ps b/gs/Resource/Init/gs_init.ps
index cea25cc81..0833f76c9 100644
--- a/gs/Resource/Init/gs_init.ps
+++ b/gs/Resource/Init/gs_init.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 1989-2004 Artifex Software, Inc. All rights reserved.
+% Copyright (C) 1989-2009 Artifex Software, Inc. All rights reserved.
%
% This software is provided AS-IS with no warranty, either express or
% implied.
@@ -1752,6 +1752,27 @@ defaultdevice
% If the paper size is not specifed and the device defaults to
% letter or A4 paper, select the DEFAULTPAPERSIZE.
+systemdict /DEFAULTPAPERSIZE known not
+ {
+ % Use .defaultpapersize if it returns a known paper size
+ .defaultpapersize
+ {
+ false statusdict /.pagetypenames get
+ {
+ 2 index eq { pop true exit } if
+ }
+ forall
+ {systemdict exch /DEFAULTPAPERSIZE exch put}
+ {QUIET
+ { pop }
+ { (Unknown .defaultpapersize: ) print ==only (.) = }
+ ifelse
+ }
+ ifelse
+ }
+ if
+ }
+if
systemdict /DEFAULTPAPERSIZE known
systemdict /PAPERSIZE known not and
systemdict /DEVICEWIDTH known not and