|
From: Henri M. <hen...@gm...> - 2020-08-21 04:43:05
|
Dear all,
With regards to my recent patch to optionally disable transparency on
cairolatex, I stumbled upon the fact that the PDF output of the cairo
terminal does not properly respect the notransparent option. Consider
the following minimal example:
set terminal pdfcairo notransparent
set output "test.pdf"
plot sin(x)
When running this, the page is still encapsulated in a transparency
group. This breaks PDF/A compatibility.
$ gnuplot test.gnuplot
$ grep -aC6 'Transparency' test.pdf
<< /Type /Page % 1
/Parent 1 0 R
/MediaBox [ 0 0 360 216 ]
/Contents 4 0 R
/Group <<
/Type /Group
/S /Transparency
/I true
/CS /DeviceRGB
>>
/Resources 3 0 R
>>
endobj
I'm not entire sure and I haven't tested this yet, but the cairo
terminal uses the gp_cairo_set_color function from
src/wxterminal/gp_cairo.c which in turn calls cairo_set_source_rgba.
This explicit call for transparency might be the cause for cairo
inserting a transparency group, even if all alpha values are zero or
one.
Cheers, Henri
|