summaryrefslogtreecommitdiff
path: root/cups
diff options
context:
space:
mode:
authorMichael Vrhel <michael.vrhel@artifex.com>2020-11-14 18:26:21 -0800
committerMichael Vrhel <michael.vrhel@artifex.com>2021-02-05 22:27:23 -0800
commit813b5f48e845d528d3070d9168aa51035a614c1c (patch)
tree538e0f4d2edbeab31c8b1ea982de44d617868128 /cups
parent0bd6877f480a84657696a80adc13f9c5485dd996 (diff)
downloadghostpdl-813b5f48e845d528d3070d9168aa51035a614c1c.tar.gz
Bug 695925: Implement overprint simulation for all devices
This adds the capability to simulate overprint including that of spot colors for all devices including gray and RGB devices. This is achieved by having the PDF interpreter look if overprint is present, the seting of -dOverprint (/simulate /enable /disable), if the page has transparency, and if the page has spot colors. Depending upon the color model of the device, and if transparency is present, a special push of the pdf14 device may occur. The pdf14 device buffer collects the data in a CMYK or CMYK+spots buffer and the put_image method in the pdf14 device will map the buffer to the target device color space. The code was tested with devices that support and do not support spot colors, those that support and do not support alpha channels, tag based devices, gray, RGB, and CMYK devices. A special test file to check multiple cases was added to the regression suite. By default -dOverprint is set to /enable, which should result in the existing behavior where by RGB and Gray devices do no show overprint or spot colors and CMYK devices will handle CMYK overprinting and separation devices will show spots and overprint of all colorants. With -dOverprint set to /disable no device will show overprinting. With -dOverprint set to /simulate all devices will show overprint and spot colors. Ray Johnston did the work in the interpreter as well as the device parameter default setup. I did the pdf14 device changes and testing. Changes in a variety of locations were required due to the fact that new combinations were encountered, for example we had cases where devn colors were being used with a device that supports tags (bitrgbtags device and pdf14 compositor setup for CMYK+spots). One file: tests_private/xps/xpsfts-a4/fts_34xx.xps.pdf ppmraw 72 now produces an error. This file should have been throwing an error all along but was being quietly swallowed. Acrobat will not open the created pdf file and throws and error. I will open a bug for the issue as it is a problem with the XPS interpreter.
Diffstat (limited to 'cups')
-rw-r--r--cups/gdevcups.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cups/gdevcups.c b/cups/gdevcups.c
index aac6adaeb..84c535fc5 100644
--- a/cups/gdevcups.c
+++ b/cups/gdevcups.c
@@ -4745,7 +4745,7 @@ cups_set_color_info(gx_device *pdev) /* I - Device info */
if (pdev->icc_struct) {
rc_decrement(pdev->icc_struct, "cups_set_color_info");
}
- pdev->icc_struct = gsicc_new_device_profile_array(pdev->memory);
+ pdev->icc_struct = gsicc_new_device_profile_array(pdev);
code = gsicc_set_device_profile(pdev, pdev->memory,
(char *)DEFAULT_RGB_ICC, gsDEFAULTPROFILE);
@@ -4764,7 +4764,7 @@ cups_set_color_info(gx_device *pdev) /* I - Device info */
if (pdev->icc_struct) {
rc_decrement(pdev->icc_struct, "cups_set_color_info");
}
- pdev->icc_struct = gsicc_new_device_profile_array(pdev->memory);
+ pdev->icc_struct = gsicc_new_device_profile_array(pdev);
code = gsicc_set_device_profile(pdev, pdev->memory->non_gc_memory,
(char *)DEFAULT_GRAY_ICC, gsDEFAULTPROFILE);
@@ -4785,7 +4785,7 @@ cups_set_color_info(gx_device *pdev) /* I - Device info */
if (pdev->icc_struct) {
rc_decrement(pdev->icc_struct, "cups_set_color_info");
}
- pdev->icc_struct = gsicc_new_device_profile_array(pdev->memory);
+ pdev->icc_struct = gsicc_new_device_profile_array(pdev);
code = gsicc_set_device_profile(pdev, pdev->memory,
(char *)DEFAULT_CMYK_ICC, gsDEFAULTPROFILE);