Peter Rolf indiego at gmx.net
Thu Sep 8 12:29:52 CEST 2011

Am 08.09.2011 11:31, schrieb Hans Hagen:
> On 8-9-2011 11:19, Otso Helenius wrote:
>> Hello,
>>
>> I recently made a SimpleSlides presentation with MKIV (2011.08.27
>> 13:24). It looks ok on numerous PDF readers including Okular, Google
>> Docs, Sumatra PDF. Whenever I open it on Adobe Reader, the results are
>> rather puzzling:
>>
>> 1) The fifth page background is not black but grey, also some later
>> pages have grey background
>> 2) The RGB and CMYK swatch colours are all messed up
>>
>> The picture on page four has been intentionally corrupted with a hex
>> editor and then opened and saved again in Gimp to remove the errors in
>> the file.
>>
>> You can view the source here: https://pi-xi.net/share/colorlecture.tex
>> and the finished PDF here: https://pi-xi.net/share/colorlecture.pdf
>>
>> The only modifications I've made to the simpleslides-s-BottomSquares.tex
>> is replacing the background color, contrast color and variant color with
>> different values ([s=.0], [r=.8,g=.2,b=.2], [s=.15]).
>>
>> I would appreciate if someone could explain if there are bugs in my tex
>> sources, in MKIV or in the Adobe Reader – and in any case how can I fix
>> Docs, etc.
>
> Do you use transparencies? On pages where they are used, a different
> color rendered seems to kick in (in acrobat).
>

\startluacode
function backends.codeinjections.rgbtransparencygroup()
local d = lpdf.dictionary {
S  = lpdf.constant("Transparency"),
CS = lpdf.constant("DeviceRGB"),
I  = true }
lpdf.registerpagefinalizer(function()
end
\stopluacode
\def\pngTransparencyHack{\ctxlua{backends.codeinjections.rgbtransparencygroup()}}

\pngTranparencyHack

This is what I use here for my RGB based graphics. Anyhow, as the name
of the macro says: it's not more than a (RGB only) hack.

Regards, Peter