summaryrefslogtreecommitdiff
path: root/gs/Resource
diff options
context:
space:
mode:
authorAlex Cherepanov <alex.cherepanov@artifex.com>2012-01-21 14:07:15 -0500
committerAlex Cherepanov <alex.cherepanov@artifex.com>2012-01-21 14:07:15 -0500
commitd0d411c0830b81fa9fb38e3f938ac855fde9a6e3 (patch)
tree7ff2b1b44839d17fa9de37f3d8afdea339d405f1 /gs/Resource
parenteaaa284dcd5901de156c52c0dc0aff78816e4b81 (diff)
Bug 692798: Ignore the request for undefined color space.
Ignore the attempt to set an undefined color spece resource, issue a warning, and continue.
Diffstat (limited to 'gs/Resource')
-rw-r--r--gs/Resource/Init/pdf_draw.ps24
1 files changed, 17 insertions, 7 deletions
diff --git a/gs/Resource/Init/pdf_draw.ps b/gs/Resource/Init/pdf_draw.ps
index 1293d6160..46007f1a5 100644
--- a/gs/Resource/Init/pdf_draw.ps
+++ b/gs/Resource/Init/pdf_draw.ps
@@ -836,19 +836,25 @@ currentdict end readonly def
/csnames mark
/DeviceGray dup /DeviceRGB dup /DeviceCMYK dup /Pattern dup
.dicttomark readonly def
-/csresolve { % <csresourcename> csresolve <cspace>
+/csresolve { % <csresourcename> csresolve <cspace> <true> | <false>
dup type /nametype ne {
(\n **** Warning: CS/cs (setcolorspace) operand not a name: ) pdfformaterror
dup stderrfile dup 3 -1 roll write==only flushfile
( ****\n) pdfformaterror
dup type /arraytype eq { % Adobe InDesign + PDF Library has array
resolvecolorspace
- } if
+ } if //true
} {
dup Page /ColorSpace rget {
- exch pop resolvecolorspace
+ exch pop resolvecolorspace //true
} {
- //csnames 1 index known not { /undefined cvx signalerror } if
+ //csnames 1 index known {
+ //true
+ } {
+ ( **** Warning: Undefined space resource: /)
+ exch .namestring concatstrings (\n) concatstrings pdfformaterror
+ //false
+ } ifelse
} ifelse
} ifelse
} bdef
@@ -863,7 +869,11 @@ currentdict end readonly def
//csrdict exch .knownget {
exec dup type /nametype ne { dup length 1 eq { 0 get } if } if
} {
- dup type /nametype eq { csresolve } { csset exch pop } ifelse
+ dup type /nametype eq {
+ csresolve not { /DeviceRGB } if % Arbitrary
+ } {
+ csset exch pop
+ } ifelse
} ifelse
} ifelse
} bdef
@@ -998,7 +1008,7 @@ drawopdict begin
/cs { .incachedevice {
pop //ignore_color_op pdfformaterror
} {
- csresolve cs
+ csresolve { cs } if
} ifelse
} bdef
@@ -1035,7 +1045,7 @@ drawopdict begin
/CS { .incachedevice {
pop //ignore_color_op pdfformaterror
} {
- csresolve CS
+ csresolve { CS } if
} ifelse
} bdef