Hello Max,

thanks for your response. I have some lines like:

<text x="-200" y="166" transform="rotate(-90)" style="fill:black; stroke:none;" 
xml:space="preserve">GSE11057_NAIVE_VS_</text>

The x coordinate is negative but with the rotate(-90) making the text vertical, 
the final coordinate are positive... When opened in Illustrator for instance, 
all the objects are below and on the right of the upper left corner of the 
image....

Do you think negative coordinate may have an effect even when rotate is applied

Thanks

Lionel

________________________________________
De : Max Weis <maxatdr...@gmail.com>
Envoyé : jeudi 3 juillet 2014 12:20
À : batik-users@xmlgraphics.apache.org
Objet : Re: Size of the SVG image

I do not know whether it´s the same case, but
I had difficulty to the graphics object, due to user / device-space.
Can you check whether you have minus values ​​in the coordinates?
regards
max

2014-07-03 11:38 GMT+02:00, Lionel SPINELLI <spine...@ciml.univ-mrs.fr>:
> Hello all,
>
> I am new to batik and I have a question regarding the svg image size.
> I successfully create a SVG using batik (that's very simple, thanks for
> developing such easy API) but when the image is opened in various
> application (Linux Image viewer, Chrome, Firefox..), the image is "cut" on
> the right and bottom sides. When opened in image editors like Illustrator,
> the image is complete and correctly formed.
>
> Here is the code I used:
>
> String svgNS = "http://www.w3.org/2000/svg";;
> Document document = domImpl.createDocument( svgNS, "svg", null);
> SVGGraphics2D svgGenerator = new SVGGraphics2D( document);
> paintTable( svgGenerator, table_ResultTable);
>
> The paintTable methods contains Graphics2D methods like g2d.drawString or
> g2d.fillRect.
>
> I have tried to add code I found in the documentation like :
>
> Element svgRoot = document.getDocumentElement();
> svgRoot.setAttributeNS( null, "width", "400");
> svgRoot.setAttributeNS( null, "height", "400");
>
> But without effect (the SVG XML code does not contain the width and height
> attributes)
>
> How can I control the SVG image size so that it will be correctly opened in
> all image viewer and browser?
>
> Thanks a lot in advance
>
> Lionel
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-h...@xmlgraphics.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-h...@xmlgraphics.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-h...@xmlgraphics.apache.org

Reply via email to