8

I noticed that using transparency in a picture that's compiled as vector graphic output (render=0, no PRC) leads to strange colors (they look paler and desaturated) when the resulting picture is viewed with Adobe Acrobat (I use version X). When I view the output PDF with SumatraPDF everything looks fine. An Example:

size(10cm,0);

path cle=unitcircle;

draw((-2.5,0)--(2.5,0),linewidth(10mm));
filldraw(shift((-1.5,0))*cle,magenta+opacity(.5));
filldraw(shift((-0.5,0))*cle,green+opacity(.5));
filldraw(shift((0.5,0))*cle,red+opacity(.5));
filldraw(shift((1.5,0))*cle,blue+opacity(.5));

shipout(format="pdf");

Comparison of erroneous PDF viewed with Adobe Acrobat (left) and SumatraPDF (right)

On the left hand side you see the picture viewed with Adobe Acrobat and on the right hand side you see the picture viewed with SumatraPDF.

When I leave out the opacity settings everything looks fine:

Comparison of errorless PDF viewed with Adobe Acrobat (left) and SumatraPDF (right)

I encountered such an issue before when using opacity in a picture created by TikZ and think the problem might be connected to that (There seems to be some trouble with transparency groups in Adobe Acrobat). Here is a way to solve this problem in a TikZ picture. How can the coloring issue be solved in Asymptote?

  • 5
    I can see this difference between Adobe Reader XI(v11.0.5) and SumatraPDF v2.3.2, but only when Adobe Reader setting Edit->Preferences->Page Display-> Default Transparency Blending Color Space is set to Working CMYK. When it is set to Working RGB, the pictures looks almost identical. – g.kov Oct 17 '13 at 18:35
  • @g.kov Thanks for the tip. Do you happen to know whether such an option exists in prior versions of Adobe Reader/Acrobat? – Philipp Oct 18 '13 at 17:44
  • I can only tell that I can't find this option in Adobe Reader 9.5.5 for Linux, and it looks like only RGB is used. – g.kov Oct 18 '13 at 17:52
  • @g.kov Adobe Acrobat 10.1.8 doesn't seem to have that option either. I guess I will have too look whether having both, Adobe Reader 11 and Adobe Acrobat 10, on the same system will work or not. Nevertheless, thanks again, I'd never have thought to look for a solution from within Adobe Reader since I was only thinking of something similar to the TikZ solution. – Philipp Oct 18 '13 at 18:00
  • @g.kov You gave me a solution for my problem although it requires me to use a different version of Adobe Reader. If you convert your comment into an answer I'd accept it. – Philipp Oct 24 '13 at 11:13
5
+50

I can see this difference between Adobe Reader XI(v11.0.5) and SumatraPDF v2.3.2, but only when Adobe Reader setting Edit->Preferences->Page Display->Default Transparency Blending Color Space is set to Working CMYK. When it is set to Working RGB, the pictures looks almost identical.

0

My informed guess is that you are experiencing the same problem described earlier in the context of TikZ here (including solutions): Using opacity in TikZ causes strange rendering in Acrobat.

Perhaps that solution can be adapted to use with Asymptote. In any case, if you include your graphics into a LaTeX document, and use one of the solutions in the other thread, the embedded graphics should be displayed correctly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.