If you are using pdflatex
, inserting
\pdfpageattr{/Group <</S /Transparency /I true /CS /DeviceRGB>>}
in the preamble indeed works.
However, if you use latex > dvips > ps2pdf
, this workaround will not work, since the pdf page attributes are ignored by latex
. The issue is also described in the ghostscript manual:
ps2pdf currently has only very limited support for PDF 1.4. It writes out the blend mode, constant alpha, and text knockout graphics state parameters, and it handles images with soft masks, but it does not handle transparency groups, or soft masks in the graphics state.
Interestingly, the solution is as simple as using ps2pdf13
. This way, you create a PDF v1.3 compliant pdf file which seems to work as expected. So far, we did not notice any side effects.