On 17/2/11 17:35, Michael Palmer wrote:
To the issue: if I understand it correctly, the eps and pdf export was switched in the transition from version 0.46 to 0.47. In my experience, the new eps export doesn't work well, producing larger files and also converting some vector elements to raster in an unpredictable way.
The rasterization that happens in your example file is predictable and needed, because a lot of the objects used a minimally reduced object opacity (96%) - seemingly either to mimic a lighter shade of the fill color, or unintentionally, as the visual effect is barely noticeable compared to using 100% opacity.
Postscript does not support transparency, and every object with reduced opacity is rendered as bitmap in the exported EPS/PS file (as described in the release notes for 0.47 [1]).
With regard to your SVG example: a simple way to get a clean vector-only EPS file is to change the opacity of the objects to 100% without editing the fill/stroke colors: - 'Edit > Find…' - search for the string 'opacity:0' in the style attribute - change global opacity to 100% for the resulting selection - export to EPS
The new pdf export seems to produce less rasterization but also produces large files that can take a very long time to render in a pdf viewer.
While PDF does support transparency, for object opacity (affecting fill and stroke equally, as opposed to stroke opacity and fill opacity (the 'A' alpha channel in the Fill&Stroke dialog)) cairo uses a more complex structure to achieve the same visual effect as in the SVG file [2]. Again, one could recommend to only use reduced opacity when needed and not to just modify the shade of a color.
I suppose there was a reason for this transition, maybe gradients, transparency and such. However, where these features are not required, the old export routines produce more compact output and avoid wanton rasterization. Also, the old-style eps files can be used with LaTeX' psfrag mechanism, whereas the new-style ones cannot.
See bug #375323 https://bugs.launchpad.net/inkscape/+bug/375323 "ps and eps export with cairo in inkscape no usable with psfrag"
The next cairo version (1.12) will again support the psfrag method to extract text from the EPS file (limited to latin characters, see comment #43).
~suv
[1] http://wiki.inkscape.org/wiki/index.php/Release_notes/0.47#PDF.2C_PostScript.2C_and_EPS_export [2] described e.g. in these comments from a cairo developer: https://bugs.launchpad.net/inkscape/+bug/336638/comments/15 https://bugs.launchpad.net/inkscape/+bug/336638/comments/17