0

I'm trying to get a grasp on the capabilities of the current version of Ghostscript (see also this question that I asked a few days ago). So, I downloaded a "test form" for the PDF/X-4 standard from www.pdfx-ready.ch, a standards organization in Switzerland, and tried to render it... (In case anyone wants to try this, here's the direct download link: http://www.pdfx-ready.ch/files/PDFX-ready-OutputTest_PDFX4-CMYK_V301d.zip. You can find more info on this page (in German): http://www.pdfx-ready.ch/index.php?show=496)

Anyway: I was pleasantly surprised to see that most of the test fields were rendered correctly on screen. Most of the other PDF viewers that I had tried had failed miserably. Then I noticed that there were a few test cases that produced errors:

  • CMYK Overprint Mode (on page 1) is not respected for fonts and vectors (it works fine for images, masks and shadings).
  • Rendering of Knockout Transparency Groups (on page 2) is not performed correctly.
  • Rendering of a few more fields (on page 4) that had to do with overprinting (Spot to CMYK, CMYK over Spot, Image Overprint etc.) failed.

So, I started experimenting... First I noticed that I still had an old version of Ghostscript installed. So, I compiled the new version 9.16 and tried again. This time, the Knockout Transparency Groups (see above) were rendered correctly. Great!

Then I read here that "the handling of overprinting and spot colors depends upon the process color model of the output device". So, instead of -sDEVICE=x11 I now tried -sDEVICE=x11cmyk. And to my surprise, the errors regarding the CMYK Overprint Mode went away. Unfortunately, the errors on page 4 remained.

What's more, I now have two new problems: First of all, the pages are now rendered in wrong colors. In fact, the white background of the test pages now appears in cyan! Also, it seems, Ghostscript is now trying to simulate some kind of ugly halftoning on screen. I read here again that "The differences in appearance of files with overprinting and spot colors caused by the differences in the color model of the output device [...] are not due to a limitation in the implementation of Ghostscript or its output devices." So, I'm assuming that I'm missing something. But what is it?

Summarizing:

  • Is there a way (maybe another device, a command line parameter or something) to tell Ghostscript to handle overprinting correctly? Or hasn't this been implemented yet?
  • What causes the cyan tinting of the white background?
  • Is there a way to print this correctly to an inkjet, the way it appears on screen? (lpr doesn't seem to work well.)

Thanks in advance.

UPDATE

So, I experimented a lot and read a few discussions. Also, the documentation here, which I found pretty interesting, as it says:

"Ghostscript currently provides overprint simulation for spot colorants when rendering to the separation devices psdcmyk and tiffsep. These devices maintain all the spot color planes and merge these together to provide a simulated preview of what would be printed."

Alright, this is what @KenS (see below) mentioned in a comment. But then

"It is possible to get a simulated preview of overprinting with other CMYK devices by specifying -dSimulateOverprint = true/false In this case, simulated overprinting is achieved through a blending of the CMYK colorants." [p.9]

Now, I read that as saying that I can use a CMYK device (like tiff32nc) to get a simulated preview of overprinting with spot colors. Am I correct? So, after some more reading here (just in case this has anything to do with CMYK, which I doubt), I finally tried the following:

gs -dBATCH -dNOPAUSE -dSAFER
   -dSimulateOverprint=true
   -sDefaultCMYKProfile=ISOcoated_v2_300_eci.icc
   -sOutputICCProfile=ISOcoated_v2_300_eci.icc
   -sDEVICE=tiff32nc
   -sOutputFile=out.tif
   in.pdf

I even experimented with the options -dOverrideICC, -dRenderIntent and -sProofProfile. Nothing seems to work. What am I misunderstanding here? Is there really no way to render a non-seperated full-color preview of correctly overprinted spot colors?

UPDATE 2

So, I finally tried the tiffsep device (not really, what I would like to achieve, but interesting as a test case) and checked the five files that are produced. And there are still errors! If you would like to check, run the command

gs -dBATCH -dNOPAUSE -dSAFER
   -sDEVICE=tiffsep
   -dFirstPage=4
   -dLastPage=4
   -sOutputFile=page4.tif
   PDFX-ready_Output-Test_301d_X4.pdf

over the aforementioned PDF/X-4 document. Then examine, e.g., the third test field in the first row in the left column (page 4).

So, I really don't know what to make of this. Does that mean that Ghostscript can't handle overprinting with spot colors at all - contrary to what the documentation says? Is that a bug? Or do I have the command wrong? Am I missing anything?

Community
  • 1
  • 1
Marcus C.
  • 219
  • 1
  • 3
  • 11
  • 2
    As a short note, the test files you mention are actually based on the work of the Ghent Workgroup which is an international standards organisation PDF/X-Ready is a member of. You can find the English version here: http://www.gwg.org/download/test-suites/ghent-output-suite/ – David van Driessche May 29 '15 at 05:52
  • Thanks, I had looked for an English version, but hadn't been aware that the GWG version actually was the original one. – Marcus C. May 29 '15 at 12:39
  • 1
    I checked with our colour expert who tells me that the tiffsep device should produce a CMYK composite preview which should be correct. If that's not the case then you should report it as a bug. – KenS Jun 02 '15 at 16:12
  • Thanks, @KenS, for your efforts. Indeed, using the aforementioned command (not sure, if the command line is correct, though?) pages 1, 2 and 3 of the "Ghent Output Suite" are rendered perfectly. There are several errors on page 4, however. I've uploaded the result here: http://kliq.at/page4 (converted to PNG for web viewing). Should I file a bug report? If so, where can I do that? – Marcus C. Jun 04 '15 at 15:16
  • I see the bug report, I'm at a staff meeting today so I'll point the relevant engineer at it (its already properly assigned but it doesn't do any harm to draw his attention to it) – KenS Jun 05 '15 at 12:52

2 Answers2

2

First answer is stop trying to use the X11 device, its an RGB device and not hugely well supported. In order to do X11CMYK the input must be rendered to CMYK then post filtered to RGB. Its not a good solution.

Overprinting is only defined for CMYK process colours (and spots), any other colour model will not perform overprinting. So I would suggest you render to TIFF or JPEG devices using their CMYK variants.

Spot colours are even more complex, if the device does not support the requested spot colour then it uses the tint transform to convert into the defined alternate colour space. If tint transformation takes place the spot is not overprinted.

Since the display devices cannot support spot colours, you can't preview spot overprinting using a display device. If you want to do this you should use the tiffsep device.

If you believe you have found a bug in Ghostscript, then please report it as such, but you will have to report it against a CMYK device, and I'll say now that we won't be very active with bugs in the X11 CMYK device, its practically unused.

Printing to an inkjet device depends on the printing workflow, and I have no idea what you are using for that. If its CUPS (and I'm guessing solely based on the fact that you are using an X11 device) then this 'should' just work. But it depends on the complete end-to-end print process, and I have no idea what it is you are doing.

Again note that spot colours will not be available on a CMYK printer, so overprinting spots is probably not going to work the way you expect.

KenS
  • 30,202
  • 3
  • 34
  • 51
  • Thanks, @KenS, for the informative reply. I'm aware of the fact that overprinting is only defined for CMYK (and spot); which is why I thought the `x11cmyk` device (going to RGB via CMYK) was a good idea. Are you saying that I shouldn't use x11 at all? Is there an alternative device for showing CMYK on the screen? Can `-sProofProfile` be used here? Also, I understand what you're saying about spot colors. But how is Adobe Reader (even in version 7) handling this? (By the way: The `tiff32nc` device works well, except for the overprinting/spot problem.) – Marcus C. May 29 '15 at 12:35
  • To make a long story short: What would you suggest as the easiest way to render cmyk, overprinting, knockout, transparency and spot colors correctly with Ghostscript on screen? (Assuming that Ghostscript can handle all of that.) – Marcus C. May 29 '15 at 12:35
  • I think the way to do that is in the answer above: render the image to a CMYK TIFF or JPEG, and another program to look at those images. – jsbueno May 29 '15 at 13:49
  • 1
    Thanks, @jsbueno, for your help. Unfortunately, that doesn't seem to work: As I said, the `tiff32nc` device cannot handle spot colors, either. I'm assuming that with Ghostscript being such a mature package, there has to be a way to somehow preview on screen what spot colors (with or without overprinting) will look like if printed. (Oh, and it would be great not having to create intermediate image files. But that's wishful thinking.) – Marcus C. May 29 '15 at 14:04
  • 1
    tiffsep, not tiff32nc if you want spot colours. And no, there is no 'proofing mode in Ghostscript' for the display. – KenS May 29 '15 at 15:31
  • @KenS, thanks for the suggestion. But what am I to do with these separations? I would just like to view the final output; will I have to re-combine the separations in a separate program? Also, the documentation (see above) says: _"It is possible to get a simulated preview of overprinting with other CMYK devices by specifying `-dSimulateOverprint = true/false` In this case, simulated overprinting is achieved through a blending of the CMYK colorants."_ Doesn't that mean spot colors? See my updated question above... – Marcus C. May 29 '15 at 15:57
  • @KenS: It seems, the `tiffsep` device doesn't work, either (see my updated question above). Not sure, why? If it's working for everybody else: What is it that I'm missing? – Marcus C. May 29 '15 at 16:46
  • To get correct overprint with spot colours, you need to produce the spot colourants. The tiffsep device will attempt to produce a reasonable representation by falling back to the alternate but basically for the case of overprint with spot colours, the only way to see the correct output is to produce the spot colours and be prepared to view them. I'm not going to download the entire suite of files, if you extract the offending page and put it somewhere I'll look at it. – KenS May 29 '15 at 18:47
1

I may be very late to the party but this works for me:

gs -dBATCH -dNOPAUSE -dSimulateOverprint=true \
   -sDEVICE=jpegcmyk -sOUTPUTFILE=overprint.jpg overprint.pdf
  • Thanks for posting. Better late than never. Admittedly, I haven't looked into this issue for a while now, but your answer make me curious, if the problems have been resolved in one of the newer versions. Will report back. Thanks again, much appreciated. :) – Marcus C. Sep 04 '20 at 12:08