Uploaded image for project: 'Batik'
  1. Batik
  2. BATIK-1193

java.awt.geom.IllegalPathStateException: missing initial moveto in path definition

    XMLWordPrintableJSON

Details

    Description

      I am using SVG Rasterizer example to convert svg image to png. I am sending svg image as file uri to the PNGTranscoder to get png image, But it was throwing this error

      "_java.awt.geom.IllegalPathStateException: missing initial moveto in path definition
      at java.awt.geom.Path2D$Float.needRoom(Path2D.java:280)
      at java.awt.geom.Path2D$Float.lineTo(Path2D.java:373)
      at org.apache.batik.ext.awt.geom.ExtendedGeneralPath.lineTo(ExtendedGeneralPath.java:280)
      at org.apache.batik.parser.AWTPathProducer.linetoAbs(AWTPathProducer.java:160)
      at org.apache.batik.dom.svg.SVGAnimatedPathDataSupport.handlePathSegList(SVGAnimatedPathDataSupport.java:78)
      at org.apache.batik.bridge.SVGPathElementBridge.buildShape(SVGPathElementBridge.java:92)
      at org.apache.batik.bridge.SVGShapeElementBridge.createGraphicsNode(SVGShapeElementBridge.java:60)
      at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:213)
      at org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:171)
      at org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:82)
      at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(SVGAbstractTranscoder.java:208)
      at org.apache.batik.transcoder.image.ImageTranscoder.transcode(ImageTranscoder.java:92)
      at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(XMLAbstractTranscoder.java:142)
      at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(SVGAbstractTranscoder.java:156)
      at test.DOMRasterizer.save(App.java:28)
      at test.DOMRasterizer.main(App.java:39) "

      Svg images that we used are generated by Extjs library. Below I am attaching the svg image file that is failing to convert to png.

      Versions of all dependencies:
      batik-transcoder 1.7,batik-rasterizer 1.9,batik-codec 1.9,batik-svg-dom 1.7

      Attachments

        1. Testimage.svg
          26 kB
          Srikanth

        Activity

          People

            Unassigned Unassigned
            srikanth07 Srikanth
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: