From: Adrian Johnson <ajohnson@re...> - 2008-04-20 09:33:56
Stephane Eybert wrote:
> Dear all,
> I installed inkscape 0.46 on Kubuntu 8.04 and can now save as pdf with
> pdf files having a very reasonable file size of barely under 100kb. Good!
> But I still have an issue and wonder if there isn't something wrong with
> my pdf files.
> I have put them at
> for you to see.
> They are very slow to load up in the kpdf reader, something like 10
> seconds to appear.
The problem is the ellipses in the background are each drawn in the PDF
with an soft mask due to the fill/stroke opacity set to less than 100%.
This means each individual ellipse is drawn to an image buffer the size
of the page, the mask function is drawn to another image buffer the size
of the page. The ellipse image is then composited with the mask image
back on to the page. With all the ellipses on the page this is not going
to be fast.
The workaround is to set the master opacity to 100% and instead use the
alpha in the stroke paint to control the transparency.
This is something that should be optimized in Inkscape. Currently
Inkscape calls cairo_paint_with_alpha() when the opacity is less then
100%. This is required to handle the general case of drawing a combined
fill and stroke to prevent a translucent stroke compositing with the
fill. Calling cairo_paint_with_alpha() results in a soft mask being used
in the PDF file. If only a fill or stroke is drawn, Inkscape should
instead adjust the alpha value of the fill or stroke and avoid calling
I suggest filing a bug requesting this optimization and attaching your
SVG and PDF files.