You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by ananth balasubramanyam <ab...@cs.odu.edu> on 2004/06/17 17:07:30 UTC

exception : unable to open svg in squiggle

hi all,

I have an SVG created in adobe illustrator and when i open this in batik
squiggle, I get the following exception :

java.lang.ArrayIndexOutOfBoundsException: -1
        at
org.apache.batik.ext.awt.LinearGradientPaintContext.fillHardNoCycle(Unknown
Source)
        at
org.apache.batik.ext.awt.LinearGradientPaintContext.fillRaster(Unknown
Source)
        at
org.apache.batik.ext.awt.MultipleGradientPaintContext.getRaster(Unknown
Source)
        at
sun.java2d.pipe.AlphaPaintPipe.renderPathTile(AlphaPaintPipe.java:106)
        at
sun.java2d.pipe.DuctusShapeRenderer.renderPath(DuctusShapeRenderer.java:102)
        at
sun.java2d.pipe.DuctusShapeRenderer.fill(DuctusShapeRenderer.java:49)
        at sun.java2d.pipe.ValidatePipe.fill(ValidatePipe.java:119)
        at sun.java2d.SunGraphics2D.fill(SunGraphics2D.java:2156)
        at org.apache.batik.gvt.FillShapePainter.paint(Unknown Source)
        at org.apache.batik.gvt.CompositeShapePainter.paint(Unknown
Source)
        at org.apache.batik.gvt.ShapeNode.primitivePaint(Unknown Source)
        at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown Source)
        at org.apache.batik.gvt.ShapeNode.paint(Unknown Source)
        at
org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(Unknown Source)
        at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown Source)
        at
org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(Unknown Source)
        at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown Source)
        at
org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(Unknown Source)
        at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown Source)
        at
org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(Unknown Source)
        at org.apache.batik.gvt.CanvasGraphicsNode.primitivePaint(Unknown
Source)
        at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown Source)
        at
org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(Unknown Source)
        at org.apache.batik.gvt.filter.GraphicsNodeRed8Bit.genRect(Unknown
Source)
        at
org.apache.batik.gvt.filter.GraphicsNodeRed8Bit.copyData(Unknown Source)
        at
org.apache.batik.ext.awt.image.rendered.TileCacheRed.genRect(Unknown
Source)
        at
org.apache.batik.ext.awt.image.rendered.AbstractTiledRed.drawBlockInPlace(Unknown
Source)
        at
org.apache.batik.ext.awt.image.rendered.AbstractTiledRed.drawBlock(Unknown
Source)
        at
org.apache.batik.ext.awt.image.rendered.AbstractTiledRed.copyToRasterByBlocks(Unknown
Source)
        at
org.apache.batik.ext.awt.image.rendered.AbstractTiledRed.copyData(Unknown
Source)
        at
org.apache.batik.ext.awt.image.rendered.TranslateRed.copyData(Unknown
Source)
        at org.apache.batik.ext.awt.image.rendered.PadRed.copyData(Unknown
Source)
        at org.apache.batik.gvt.renderer.StaticRenderer.repaint(Unknown
Source)
        at org.apache.batik.gvt.renderer.StaticRenderer.repaint(Unknown
Source)
        at org.apache.batik.swing.gvt.GVTTreeRenderer.run(Unknown Source)


I have no clue as to what is causing this error. If somebody can infer
something, please help

thanks,
Ananth

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Re: exception : unable to open svg in squiggle

Posted by Cameron McCormack <ca...@aka.mcc.id.au>.
Chimera:
> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"    
> "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" [
>    <!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
> [...]

Batik doesn't seem to mind these namespace declarations with the
entities.  I think Ananth's problem is with the actual gradients.

-- 
Cameron McCormack
|  Web: http://mcc.id.au/
|  ICQ: 26955922

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Re: exception : unable to open svg in squiggle

Posted by Chimera <ch...@ennersea.net>.
Cameron McCormack wrote:

>Chimera:
>  
>
>><svg
>>     xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;"
>>i:viewOrigin="63.9341 456.9717" i:rulerOrigin="0 0" i:pageBounds="0 500
>>500 0"
>>     xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;"
>>xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
>>     width="350.056" height="288.736" viewBox="0 0 350.056 288.736"
>>overflow="visible" enable-background="new 0 0 350.056 288.736"
>>     xml:space="preserve">
>>    
>>
>
>Do Illustrator files have DTDs at the top to define the entities used in
>the namespace declarations?
>
>  
>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 10.0, SVG Export Plug-In . SVG 
Version: 3.0.0 Build 76)  -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"    
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" [
    <!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
    <!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
    <!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
    <!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
    <!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
    <!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
    <!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
    <!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
    <!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
    <!ENTITY ns_svg "http://www.w3.org/2000/svg">
    <!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
]>
<svg
     xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;" 
i:viewOrigin="63.9341 456.9717" i:rulerOrigin="0 0" i:pageBounds="0 500 
500 0"
     xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" 
xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
     width="350.056" height="288.736" viewBox="0 0 350.056 288.736" 
overflow="visible" enable-background="new 0 0 350.056 288.736"
     xml:space="preserve">
    <metadata>
.
.
.


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Re: exception : unable to open svg in squiggle

Posted by Cameron McCormack <ca...@aka.mcc.id.au>.
Chimera:
> <svg
>      xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;"
> i:viewOrigin="63.9341 456.9717" i:rulerOrigin="0 0" i:pageBounds="0 500
> 500 0"
>      xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;"
> xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
>      width="350.056" height="288.736" viewBox="0 0 350.056 288.736"
> overflow="visible" enable-background="new 0 0 350.056 288.736"
>      xml:space="preserve">

Do Illustrator files have DTDs at the top to define the entities used in
the namespace declarations?

-- 
Cameron McCormack
|  Web: http://mcc.id.au/
|  ICQ: 26955922

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Re: exception : unable to open svg in squiggle

Posted by Chimera <ch...@ennersea.net>.
Cameron McCormack wrote:

>Chimera:
>  
>
>>Try removing the xns segments of the root element.  This fixed my problem.
>>    
>>
>
>What are the xns segments that Illustrator inserts?  I don't have
>Illustrator so I can't check.
>
>  
>

Example file created.  Extracted additional/default Adobe Illustrator
xmlns attributes follow:



<svg
      xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;"
i:viewOrigin="63.9341 456.9717" i:rulerOrigin="0 0" i:pageBounds="0 500
500 0"
      xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;"
xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
      width="350.056" height="288.736" viewBox="0 0 350.056 288.736"
overflow="visible" enable-background="new 0 0 350.056 288.736"
      xml:space="preserve">


I delete everything that starts with xmlns (everything up until the
width attrib) and it works in the Viewer.


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Re: exception : unable to open svg in squiggle

Posted by Cameron McCormack <ca...@aka.mcc.id.au>.
Chimera:
> Try removing the xns segments of the root element.  This fixed my problem.

What are the xns segments that Illustrator inserts?  I don't have
Illustrator so I can't check.

-- 
Cameron McCormack
|  Web: http://mcc.id.au/
|  ICQ: 26955922

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Re: exception : unable to open svg in squiggle

Posted by Chimera <ch...@ennersea.net>.
ananth balasubramanyam wrote:

>hi all,
>
>I have an SVG created in adobe illustrator and when i open this in batik
>squiggle, I get the following exception :
>
><snip>
>  
>
>I have no clue as to what is causing this error. If somebody can infer
>something, please help
>  
>

Try removing the xns segments of the root element.  This fixed my problem.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org