* Re: MKIV strange results in Adobe Reader
2011-09-08 9:31 ` Hans Hagen
@ 2011-09-08 10:29 ` Peter Rolf
2011-09-11 14:48 ` Otso Helenius
1 sibling, 0 replies; 4+ messages in thread
From: Peter Rolf @ 2011-09-08 10:29 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
>> the erroneous output on Adobe Reader to match it on Sumatra, Google
>> Docs, etc.
>
> Do you use transparencies? On pages where they are used, a different
> color rendered seems to kick in (in acrobat).
>
You can try to add
\startluacode
function backends.codeinjections.rgbtransparencygroup()
local d = lpdf.dictionary {
S = lpdf.constant("Transparency"),
CS = lpdf.constant("DeviceRGB"),
I = true }
lpdf.registerpagefinalizer(function()
lpdf.addtopageattributes("Group",d) end)
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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: MKIV strange results in Adobe Reader
2011-09-08 9:31 ` Hans Hagen
2011-09-08 10:29 ` Peter Rolf
@ 2011-09-11 14:48 ` Otso Helenius
1 sibling, 0 replies; 4+ messages in thread
From: Otso Helenius @ 2011-09-11 14:48 UTC (permalink / raw)
To: ntg-context
Hi,
I have now investigated the color errors in Adobe Reader further.
I produced a test PDF without simpleslides with MKIV (mtx-context |
current version: 2011.09.10 12:55).
Here is the source:
\language[fi]
\setupcolors[rgb]
\usemodule[metafun]
\setupbackgrounds[page][background=color,backgroundcolor=black]
\startreusableMPgraphic{variympyrat}
vardef ColorCircle (expr method, factor, ca, cb, cc) =
save u, p ; path p ; p := fullcircle shifted (1/4,0);
image (fill p rotated 90 withcolor transparent(method,factor,ca); fill
p rotated 210 withcolor transparent(method,factor,cb); fill p rotated
330 withcolor transparent(method,factor,cc))
enddef;
draw ColorCircle ("normal", 1, cyan, magenta, yellow) xsized 6cm;
draw ColorCircle ("darken", .85, cyan, magenta, yellow) xsized 6cm;
currentpicture := currentpicture shifted (0,-6cm);
draw ColorCircle ("exclusion", 1, red, green, blue) xsized 6cm;
\stopreusableMPgraphic
\starttext
\startcolor[white]
\title{metafun}
\includeMPgraphic{variympyrat}
\title{svg}
\externalfigure[variympyrat.svg]
\title{png}
\externalfigure[variympyrat.png]
\stoptext
and here is the output:
https://pi-xi.net/share/context_reader_test.png
https://pi-xi.net/share/context_reader_test.pdf
You can also see the original files used in the test here:
https://pi-xi.net/share/variympyrat.png
https://pi-xi.net/share/variympyrat.svg
The gray background effect happens randomly even with only using svg
images straight from inkscape.
When using png images, I noticed it happens more often when there are
multiple layers in the png.
With metafun graphics, the image colors are messed up in addition to
the gray background.
I would like to know:
a) How to avoid it with metafun, png AND svg graphics?
b) What is the cause (Adobe reader bugs? Errors in my source? Erroneous
image files? ConTeXt bug?)
Best regards,
Otso Helenius
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread