diff options
author | Ray Johnston <ray.johnston@artifex.com> | 2020-11-03 22:00:17 -0800 |
---|---|---|
committer | Michael Vrhel <michael.vrhel@artifex.com> | 2020-11-04 16:29:48 -0800 |
commit | bdf7cf8b6c7c97531aac14e16b9d2c16775ae8c8 (patch) | |
tree | a69a0a8d5ddd9838d39d4b37c0ac69322d51c4dd /Resource | |
parent | e6d34e7d08dac91b5b3b858c23e186a0d3bcbefc (diff) | |
download | ghostpdl-bdf7cf8b6c7c97531aac14e16b9d2c16775ae8c8.tar.gz |
Fix Bug 702034. Missing image to DeviceN devices.
The file from Bug 693300 has a blank image when going to DeviceN devices
such as psdcmyk and tiffsep. The CompatibleOverprint blend mode must be
set before the transparency group is pushed.
Add a .special_op for SupportsDevn to let the PostScript PDF interpreter
detect that the device supports separations.
Make sure the mark fill rect for the knockout case handles
the hybrid case of additive process colors with subtractive spots
and overprint.
And make sure the group that is pushed in gstrans.c for text knockouts
uses compatible overprint if needed.
Ray did the PS parts and Michael did the pdf14dev parts.
Diffstat (limited to 'Resource')
-rw-r--r-- | Resource/Init/pdf_draw.ps | 18 | ||||
-rw-r--r-- | Resource/Init/pdf_ops.ps | 3 |
2 files changed, 14 insertions, 7 deletions
diff --git a/Resource/Init/pdf_draw.ps b/Resource/Init/pdf_draw.ps index f22acea2f..4605e03a7 100644 --- a/Resource/Init/pdf_draw.ps +++ b/Resource/Init/pdf_draw.ps @@ -2308,6 +2308,12 @@ currentdict /last-ditch-bpc-csp undef % code only picks up the current colour space, not the space from the dictionary. currentdict /SMask get /Matte known {/CS currentdict /ColorSpace get dup pdfopdict /cs get exec } if >> 0 0 1 1 + gsave 1 1 moveto 0 0 lineto + % If we get an error, just emit an empty box + { pathbbox } stopped { 0 0 0 0 } if + 4 array astore grestore + /image + setup_trans .begintransparencygroup .currentstrokeconstantalpha .currentfillconstantalpha 3 -1 roll 1 .setfillconstantalpha 1 .setstrokeconstantalpha @@ -2409,12 +2415,6 @@ currentdict /last-ditch-bpc-csp undef makemaskimage } if % Stack: datasource imagemask - gsave 1 1 moveto 0 0 lineto - % If we get an error, just emit an empty box - { pathbbox } stopped { 0 0 0 0 } if - 4 array astore grestore - /image - setup_trans { currentdict end setsmaskstate //true ValidateDecode { imagemask } } { ColorSpace setgcolorspace currentdict end setsmaskstate //false ValidateDecode { image } } ifelse @@ -3008,6 +3008,12 @@ drawopdict begin /File PDFsource def currentdict makeimagekeys OFFlevels length 0 eq { + gsave 1 1 moveto 0 0 lineto + % If we get an error, just emit an empty box + { pathbbox } stopped { 0 0 0 0 } if + 4 array astore grestore + /image + setup_trans doimage } { pop Width diff --git a/Resource/Init/pdf_ops.ps b/Resource/Init/pdf_ops.ps index 1f4b3308b..dffa03483 100644 --- a/Resource/Init/pdf_ops.ps +++ b/Resource/Init/pdf_ops.ps @@ -695,10 +695,11 @@ end { % Check OP and BM in case we need to push a group //OPsaveDstack begin //Dpush exec % push the current OPsaveDstack values into 'previous' + /SupportsDevn .special_op okOPcs currentcolorspace 0 get dup /Indexed eq { pop currentcolorspace 1 get % use the base space } if - known { + known or { 1 index /stroke ne { .currentfilloverprint } { .currentstrokeoverprint } ifelse % Change BM to CompatibleOverprint if this has overprint true dup /ChangeBM exch def |