[jira] [Commented] (BATIK-1188) Failed to convert SVG to PNG using batik-rasterizer from maven repository

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[jira] [Commented] (BATIK-1188) Failed to convert SVG to PNG using batik-rasterizer from maven repository

JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/BATIK-1188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15986279#comment-15986279 ]

simon steiner commented on BATIK-1188:
--------------------------------------

Can you try:
Remove ~/.m2/repository

In your pom.xml use:
    <dependency>
      <groupId>org.apache.xmlgraphics</groupId>
      <artifactId>batik-rasterizer</artifactId>
      <version>1.9</version>
    </dependency>  
   
    <dependency>
      <groupId>org.apache.xmlgraphics</groupId>
      <artifactId>batik-codec</artifactId>
      <version>1.9</version>
    </dependency>

Run should be:
java -cp batik-transcoder-1.9.jar:xalan-2.7.2.jar:commons-logging-1.0.4.jar:batik-gvt-1.9.jar:batik-svgrasterizer-1.9.jar:batik-codec-1.9.jar:xml-apis-1.3.04.jar:batik-dom-1.9.jar:batik-xml-1.9.jar:batik-css-1.9.jar:batik-i18n-1.9.jar:xmlgraphics-commons-2.2.jar:junit-3.8.1.jar:batik-svg-dom-1.9.jar:batik-ext-1.9.jar:batik-script-1.9.jar:commons-io-1.3.1.jar:batik-rasterizer-1.9.jar:batik-anim-1.9.jar:xml-apis-ext-1.3.04.jar:batik-bridge-1.9.jar:batik-constants-1.9.jar:serializer-2.7.2.jar:batik-util-1.9.jar:batik-svggen-1.9.jar:batik-awt-util-1.9.jar:batik-parser-1.9.jar  org.apache.batik.apps.rasterizer.Main -scriptSecurityOff SVG_logo.svg -d test.png

> Failed to convert SVG to PNG using batik-rasterizer from maven repository
> -------------------------------------------------------------------------
>
>                 Key: BATIK-1188
>                 URL: https://issues.apache.org/jira/browse/BATIK-1188
>             Project: Batik
>          Issue Type: Bug
>            Reporter: Tuan Huynh
>
> Hi there,
> Thanks again for great libary. We've been trying to use batik-rasterizer-1.9.jar from Maven Repository but no luck so far,
> With this simple command: java -jar batik-rasterizer-1.9.jar -scriptSecurityOff ./tets.svg -d ./test.png, we're getting this error:
> About to transcode 1 SVG file(s)
> Converting tets.svg to ./test.png ... org.apache.batik.transcoder.TranscoderException: null
> Enclosed Exception:
> Could not write PNG file because no WriteAdapter is availble
> at org.apache.batik.transcoder.image.ImageTranscoder.transcode(ImageTranscoder.java:132)
> at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(XMLAbstractTranscoder.java:142)
> at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(SVGAbstractTranscoder.java:156)
> at org.apache.batik.apps.rasterizer.SVGConverter.transcode(SVGConverter.java:1001)
> at org.apache.batik.apps.rasterizer.SVGConverter.execute(SVGConverter.java:717)
> at org.apache.batik.apps.rasterizer.Main.execute(Main.java:938)
> at org.apache.batik.apps.rasterizer.Main.main(Main.java:992)
> ... error (SVGConverter.error.while.rasterizing.file)
> This also happens in 1.8 but can be solved by adding batik-codec 1.8 and xmlgraphics-commons 2.0, however, it's not the case in 1.9. In 1.7, adding batik-codec 1.7 is enough.
> Could you please give us a hand on this?
> Thanks and Regards,
> Tuan.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...