diff options
author | Ken Sharp <ken.sharp@artifex.com> | 2022-05-18 15:36:31 +0100 |
---|---|---|
committer | Ken Sharp <ken.sharp@artifex.com> | 2022-05-18 15:36:31 +0100 |
commit | 4e4633d865903b201fc4ac35ea974f244d5618fa (patch) | |
tree | 752b9e0e76b52700d0633bc8de0c5f9ee69a32d2 /Resource | |
parent | 5527bce8f1c0c6cd62c4a0a19fc511507ae53da9 (diff) | |
download | ghostpdl-4e4633d865903b201fc4ac35ea974f244d5618fa.tar.gz |
GS + GhostPDF - only set PageSpotColors for spot-capable devices
Sending PageSpotColors to the txtwrite device was causing it to throw
an error on setpagdevice as it did not process the key. While that
shouldn't really cause a problem (and doesn't with the following commit)
we don't really want to set the key for devices which aren't capable of
producing spots anyway.
This only affects the Ghostscript implementation of GhostPDF.
Diffstat (limited to 'Resource')
-rw-r--r-- | Resource/Init/pdf_main.ps | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Resource/Init/pdf_main.ps b/Resource/Init/pdf_main.ps index bb62bcc37..85ced9ad0 100644 --- a/Resource/Init/pdf_main.ps +++ b/Resource/Init/pdf_main.ps @@ -341,10 +341,14 @@ systemdict /NEWPDF known not {/NEWPDF //true def} if /PageUsesTransparency exch % << >> <<page dict>> /PageUsesTransparency bool 3 index 3 1 roll % << >> <<page dict>> <<info dict>> << >> /PageUsesTransparency bool put % <</PageUsesTransparency bool>> <<page dict>> - /NumSpots get % <</PageUsesTransparency bool>> int - /PageSpotColors exch % <</PageUsesTransparency bool>> /PageSpotColors int - 2 index 3 1 roll % <</PageUsesTransparency bool>> <<page dict>> /PageSpotColors int - put % <</PageUsesTransparency bool /PageSpotColors int >> + currentpagedevice /PageSpotColors known { + /NumSpots get % <</PageUsesTransparency bool>> int + /PageSpotColors exch % <</PageUsesTransparency bool>> /PageSpotColors int + 2 index 3 1 roll % <</PageUsesTransparency bool>> <<page dict>> /PageSpotColors int + put % <</PageUsesTransparency bool /PageSpotColors int >> + }{ + pop + } ifelse setpagedevice }bind def |