Re: converting SVG to PNG

On Tue, 2018-06-12 at 13:32 +0000, vinayak datir wrote:
>                 I am using batik-rasterizer-1.9.jar to convert the
> SVG into PNG. Input SVG has the CSS embedded using style tag.

You might find Batik needs style attributes on individual SVG elements
rather than applying CSS selectors automatially.

For example, instead of having
.g {
  font-family: "Alegreya";
  font-size: 12pt;

use <g style='font-family: "Alegreya"; font-size: 12pt;'>...

or use SVG attributes:
    <g font-family="Alegreya" font-size="12pt">

In general this is a Batik-specific question so it's best asked on a
list for that software. You could also try in Web browsers and in
Inkscape (which can also make PNG files) to get a feel for whether it's
a problem in your file.

Liam Quin, W3C staff,

Available for XML/Document/Information Architecture/
XSLT/XQuery/Web/Text Processing work and consulting.

Received on Tuesday, 12 June 2018 15:19:41 UTC