[poppler] Implementing overprint in Splash
lrosenth at adobe.com
Mon Mar 21 06:10:32 PDT 2011
First, let me say that having more PDF renderers support Overprint Preview (since it's really a simulation and not the real thing) will be GREAT! Especially so in light of the "conforming reader" requirements in ISO 32000-2 that are forthcoming.
Now, that said, I think you may be simplifying things for #3 - the actual implementation. It's not as simple as modifying the code that puts the CMYK "bits" down (based on the OP/OPM values) BECAUSE of the way that Poppler's colorspaces work. You will actually need (IIRC) to do a bunch of work in there in order to handle the differences for Separation and DeviceN colorants (and DeviceN will be the most tricky to get correct).
It's clearly doable, but it's not going to be trivial...
Also, I STRONGLY recommend that Poppler do the same thing that Adobe Acrobat/Reader does and which is now (partially) codified in the forthcoming ISO 32000-2....If you detect that the PDF claims compliance with one of the PDF/X standards, you should ALWAYS render with Overprint Preview enabled.
From: poppler-bounces+leonardr=adobe.com at lists.freedesktop.org [mailto:poppler-bounces+leonardr=adobe.com at lists.freedesktop.org] On Behalf Of Thomas Freitag
Sent: Monday, March 21, 2011 1:59 AM
To: poppler at lists.freedesktop.org
Subject: [poppler] Implementing overprint in Splash
After being quite close with my last bigger poppler project I now think
about implementing overprinting in Splash.
1. What is overprinting?
For those who don't know what is overprinting, please refer to
http://en.wikipedia.org/wiki/Overprinting. This is just a poor
description, what overprinting is. Who need to know more about it,
2. Actual state of overprinting in poppler.
Overprinting is implemented in Gfx, only missing the parameter overprint
mode, but the only output device which supports it in the moment, is
PSOutputDev. But even there probably the most people haven't encountered
that really: If You render the PostScript produced with PSOutputDev with
ghostscript, it is normally rendered in RGB, an additive colorspace. And
because overprinting is normally specified only in subtractive
colorspaces like CMYK, You have to specify a cmyk device like tiff32nc
to see the effects of overprinting.
3. Implementing overprint in Splash
It is quite easy to implement overprinting in Splash. Splash supports
CMYK output with the compiler switch SPLASH_CMYK. But as in PSOutputDev
I fear, that only a few people use it. And the mainly used program
pdftoppm doesn't support CMYK output. And now we are coming to the main
point why I write this email:
4. Support of overprint in pdftoppm
To support overprint in pdftoppm we have to enable SPLASH_CMYK in
pdftoppm and use it for rendering. But all output formats defined in
pdftoppm uses RGB as output colorspace, and even the main output formats
ppm and png do not support CMYK colorspace. Therefore we have to
possibilities to support overprinting in pdftoppm:
a) The easiest way would be to specify a new output format like i.e.
jpegcmyk and create a jpeg image in CMYK colorspace where overprinting
will be supported.
b) The more interesting way is to add a new parameter -overprint, when
set use splashCMYK8 as colorMode and when writing the output file
convert it to RGB. The first implementation could use the poor
colorspace conversion in Splash to convert the CMYK bitmap to RGB, but
we should think of use little cms to do that work for us, which of
course means that compiling pdftoppm will become more complex.
Any suggestions from the community to point 4?
poppler mailing list
poppler at lists.freedesktop.org
More information about the poppler