On Thu, Sep 1, 2011 at 11:54, ~suv <suv-sf@...58...> wrote:
On 1/9/11 11:41, ~suv wrote:
On 1/9/11 09:47, Wilfried Kirschenmann wrote:
The following svgz file : http://dl.free.fr/hYWUU9wMI can be correctly viewed by inkscape or any web browser. However, when I try to export it as a pdf, the plots diseappears.
Hence, I can't use the pdf+Latex export...
I have tried Inkscape 0.48.1 on Windows 7 and Inkscape 0.48.0 on debian 6.0
This file is generated with gnuplot 4.4 pl 3. I d'ont know if this svg file is well formed (and there is a bug in inkscape) or not (and there is a bug in gnuplot).
Any idea on how to export this file to pdf+Latex would be appreciated.
AFAICT the first occurrance of this transformation:
transform='scale(0.00)'
(applied to a clone <use>) prevents any content from getting further processed or exported to PDF. To me it seems a bug in cairo, not inkscape's code [1] - rsvg-view (librsvg) exhibits the exactly same issue: it doesn't even render the content in SVG after the first occurrence of the 'scale(0.00)' transformation in the file and rsvg-convert produces the same result in the (SVG converted to) PDF file).
It seems to me that GNUPLOT uses white color and scaling to zero to hide elements (plots) in the output file instead of omitting them.
~suv
[1] Other SVG viewers (Squiggle/Batik 1.7, Chromium, Opera, Safari) render the SVG file like Inkscape - only rsvg-view and rsvg-convert (using cairo) seems to have an issue with the scaling.
Attaching a modified version of the SVG file with a single instance of a clone transformed with 'scale(0.00)' as first object to be processed (lowest in z-order): it renders completely empty in rsvg-view, and converts to PDF empty (with Inkscape as well as with rsvg-convert).
Note: All later occurrences of 'scale(0.00)' have been replaced with 'scale(2.25)', as is used for the other 5 plots.
~suv
If I understand well, any object scaled to 0.0 will imply an error in the pdf export due to a bug in Cairo. It leads me to another question : I there a tool availiable to "clean" svg files so that any part that can't be seen (because scaled to 0.0 ot because it is behind a non-transparent object, ets.) is removed ? This would allow to make smaller files and still be easy to generate files with scripts ?
Willy