一、引入依赖
<!--svg转其他格式依赖-->
<dependency><groupId>org.apache.xmlgraphics</groupId><artifactId>batik-transcoder</artifactId><version>1.14</version>
</dependency>
<dependency><groupId>org.apache.xmlgraphics</groupId><artifactId>batik-codec</artifactId><version>1.14</version>
</dependency>
二、转换方法
public static byte[] convertSvgToPng(String svgUrl) throws Exception