Lines 1-6
Link Here
|
1 |
--- lib/gs_setpd.ps.orig Mon Mar 31 22:02:22 2003 |
1 |
--- lib/gs_setpd.ps.orig Sat Apr 12 16:02:38 2003 |
2 |
+++ lib/gs_setpd.ps Sat May 17 06:57:49 2003 |
2 |
+++ lib/gs_setpd.ps Sat Jan 22 13:15:05 2005 |
3 |
@@ -323,21 +323,42 @@ |
3 |
@@ -324,21 +324,42 @@ |
4 |
} bind |
4 |
} bind |
5 |
.dicttomark readonly def |
5 |
.dicttomark readonly def |
6 |
|
6 |
|
Lines 14-45
Link Here
|
14 |
-/.inputselectionkeys [ |
14 |
-/.inputselectionkeys [ |
15 |
- /MediaPosition /Orientation |
15 |
- /MediaPosition /Orientation |
16 |
-] readonly def |
16 |
-] readonly def |
17 |
+% M. Sweet, Easy Software Products: |
17 |
- |
18 |
+% |
|
|
19 |
+% Define NOMEDIAATTRS to turn the default (but unimplementable) media |
20 |
+% selection policies for setpagedevice. This is used by CUPS to |
21 |
+% support the standard Adobe media attributes. |
22 |
+currentdict /NOMEDIAATTRS known { |
23 |
+ % Define the keys used in input attribute matching. |
24 |
+ /.inputattrkeys [ |
25 |
+ /PageSize /MediaColor /MediaWeight /MediaType /InsertSheet |
26 |
+ % The following are documented in Adobe's supplement for v2017. |
27 |
+ /LeadingEdge /MediaClass |
28 |
+ ] readonly def |
29 |
+ % Define other keys used in media selection. |
30 |
+ /.inputselectionkeys [ |
31 |
+ /MediaPosition /Orientation |
32 |
+ ] readonly def |
33 |
|
34 |
-% Define the keys used in output attribute matching. |
18 |
-% Define the keys used in output attribute matching. |
35 |
-/.outputattrkeys [ |
19 |
-/.outputattrkeys [ |
36 |
- /OutputType |
20 |
- /OutputType |
37 |
-] readonly def |
21 |
-] readonly def |
38 |
+ % Define the keys used in output attribute matching. |
22 |
+% M. Sweet, Easy Software Products: |
39 |
+ /.outputattrkeys [ |
23 |
+% |
40 |
+ /OutputType |
24 |
+% Define NOMEDIAATTRS to turn off the default (but unimplementable) media |
41 |
+ ] readonly def |
25 |
+% selection policies for setpagedevice. This is used by CUPS to support |
42 |
+} { |
26 |
+% the standard Adobe media attributes. |
|
|
27 |
+NOMEDIAATTRS { |
43 |
+ % Define only PageSize for input attribute matching. |
28 |
+ % Define only PageSize for input attribute matching. |
44 |
+ /.inputattrkeys [ |
29 |
+ /.inputattrkeys [ |
45 |
+ /PageSize |
30 |
+ /PageSize |
Lines 53-59
Link Here
|
53 |
+ /.outputattrkeys [ |
38 |
+ /.outputattrkeys [ |
54 |
+ /noOutputAttrKeys |
39 |
+ /noOutputAttrKeys |
55 |
+ ] readonly def |
40 |
+ ] readonly def |
|
|
41 |
+} { |
42 |
+ % Define the keys used in input attribute matching. |
43 |
+ /.inputattrkeys [ |
44 |
+ /PageSize /MediaColor /MediaWeight /MediaType /InsertSheet |
45 |
+ % The following are documented in Adobe's supplement for v2017. |
46 |
+ /LeadingEdge /MediaClass |
47 |
+ ] readonly def |
48 |
+ % Define other keys used in media selection. |
49 |
+ /.inputselectionkeys [ |
50 |
+ /MediaPosition /Orientation |
51 |
+ ] readonly def |
52 |
+ |
53 |
+ % Define the keys used in output attribute matching. |
54 |
+ /.outputattrkeys [ |
55 |
+ /OutputType |
56 |
+ ] readonly def |
56 |
+} ifelse |
57 |
+} ifelse |
57 |
|
58 |
|
58 |
% Define all the parameters that should always be copied to the merged |
59 |
% Define all the parameters that should always be copied to the merged |
59 |
% dictionary. |
60 |
% dictionary. |
|
|
61 |
@@ -367,7 +388,13 @@ |
62 |
/PageSize false % obsolete alias for .MediaSize |
63 |
/InputAttributes false |
64 |
.inputattrkeys |
65 |
- { dup /PageSize eq |
66 |
+ % M. Sweet, Easy Software Products: |
67 |
+ % |
68 |
+ % Treat LeadingEdge like PageSize so that a common Ghostscript driver |
69 |
+ % doesn't need the NOMEDIAATTRS definition. |
70 |
+ % |
71 |
+ % { dup /PageSize eq |
72 |
+ { dup dup /PageSize eq exch /LeadingEdge eq or |
73 |
{ pop } |
74 |
{ { 2 index /InputAttributes .knownget { null eq } { true } ifelse } } |
75 |
ifelse |
76 |
@@ -442,11 +469,22 @@ |
77 |
% They are expected to consume the top 2 operands. |
78 |
% NOTE: we currently treat all values other than 0, 1, or 7 (for PageSize) |
79 |
% the same as 0, i.e., we signal an error. |
80 |
+% |
81 |
+% M. Sweet, Easy Software Products: |
82 |
+% |
83 |
+% Define NOMEDIAATTRS to turn off the default (but unimplementable) media |
84 |
+% selection policies for setpagedevice. This is used by CUPS to support |
85 |
+% the standard Adobe media attributes. |
86 |
0 { % Set errorinfo and signal a configurationerror. |
87 |
+ NOMEDIAATTRS { |
88 |
+ % NOMEDIAATTRS means that the default policy is 7... |
89 |
+ pop 2 index exch 7 put |
90 |
+ } { |
91 |
pop dup 4 index exch get 2 array astore |
92 |
$error /errorinfo 3 -1 roll put |
93 |
cleartomark |
94 |
/setpagedevice load /configurationerror signalerror |
95 |
+ } ifelse |
96 |
} bind |
97 |
1 { % Roll back the failed request to its previous status. |
98 |
DEBUG { (Rolling back.) = pstack flush } if |