summaryrefslogtreecommitdiff
path: root/Resource
diff options
context:
space:
mode:
authorKen Sharp <ken.sharp@artifex.com>2023-04-05 09:58:23 +0100
committerKen Sharp <ken.sharp@artifex.com>2023-04-05 15:45:43 +0100
commitd7ea2428d9db699b8b3e277f629555b3428c6987 (patch)
treed629b16ebf88c2cda4102c44517b19e97fec5ad0 /Resource
parente85dc479135f50b4ab70905007ae509e0d92d61d (diff)
downloadghostpdl-d7ea2428d9db699b8b3e277f629555b3428c6987.tar.gz
Ghostscript - convert the system default paper size to lower case
Bug 706544 "Unknown .defaultpapersize: (Letter). error shown at startup" The problem appears to be that the system libpaper is configured to have a default paper size of 'Letter' rather than the all lower case 'letter', so Ghostscript doesn't have a matching media size. libpaper says that lower case is 'preferred' but there's apparently no reason why we couldn't also have (for example) A4 instead of a4. We can tackle this by making the system defined paper size lower case before returning it to Ghostscript. However, a few of the paper sizes in statusdict do have upper case characters in their name, so we need to duplicate those few sizes as lower case. The contents of statusdict, and in particular the defined media sizes, are not specified so we're OK to do this.
Diffstat (limited to 'Resource')
-rw-r--r--Resource/Init/gs_statd.ps13
1 files changed, 12 insertions, 1 deletions
diff --git a/Resource/Init/gs_statd.ps b/Resource/Init/gs_statd.ps
index fff570a46..35a512aad 100644
--- a/Resource/Init/gs_statd.ps
+++ b/Resource/Init/gs_statd.ps
@@ -42,7 +42,7 @@ statusdict begin
% Keep the table of named paper sizes as procedures. Reuse them later
% as compatibility operators.
-/.pagetypeprocs 70 dict begin
+/.pagetypeprocs 81 dict begin
% Define various paper formats. The Adobe documentation defines only these:
% 11x17, a3, a4, a4small, b5, ledger, legal, letter, lettersmall, note.
@@ -116,6 +116,11 @@ statusdict begin
/archC {1296 1728 //.setpagesize stopped { pop pop /archC $error /errorname get signalerror } if } bind def
/archB {864 1296 //.setpagesize stopped { pop pop /archB $error /errorname get signalerror } if } bind def
/archA {648 864 //.setpagesize stopped { pop pop /archA $error /errorname get signalerror } if } bind def
+ /archa /archA load def
+ /archb /archB load def
+ /archc /archC load def
+ /archd /archD load def
+ /arche /archE load def
% Other paper sizes
/flsa {612 936 //.setpagesize stopped { pop pop /flsa $error /errorname get signalerror } if } bind def % U.S. foolscap
/flse {612 936 //.setpagesize stopped { pop pop /flse $error /errorname get signalerror } if } bind def % European foolscap
@@ -132,6 +137,12 @@ statusdict begin
/ANSI_D {1585 2448 //.setpagesize stopped { pop pop /ANSI_D $error /errorname get signalerror } if } bind def
/ANSI_E {2448 3168 //.setpagesize stopped { pop pop /ANSI_E $error /errorname get signalerror } if } bind def
/ANSI_F {2016 2880 //.setpagesize stopped { pop pop /ANSI_F $error /errorname get signalerror } if } bind def
+ /ansi_a /ANSI_A load def
+ /ansi_b /ANSI_B load def
+ /ansi_c /ANSI_C load def
+ /ansi_d /ANSI_D load def
+ /ansi_e /ANSI_E load def
+ /ansi_f /ANSI_F load def
%END SIZES
currentdict end
userdict begin dup { def } forall end % reuse!