Hi, can you provide resulting svg that causes the issue? 2014-07-03 11:38 GMT+02:00 Lionel SPINELLI <[email protected]>: > 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: [email protected] > For additional commands, e-mail: [email protected] >
-- pascal --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
