SVG Export

User 60b60eaf80

15-06-2009 14:14:09

Hi,


 


exporting to SVG without given values for width and height uses 200 - this should imo be somthing like this:


width="100%" height="100%" viewBox="0 0 200 200"



This would allow browsers to include the exported svg file via the object tag and scale it by defining width and height in the object tag. otherwise the svg isn't scaled, only the (object-)box is getting bigger/smaller.


 


Greetings


Martin

ChemAxon 7c2d26e5cf

16-06-2009 15:56:59

Your comment is not clear for me. I do not understand what is the question. Marvin can create scalable SVG graphics but it is your business which renderer you choose to display the SVG file.

User 60b60eaf80

01-07-2009 12:17:15

Hi,


the tags that are using will e.g. break the scaling in firefox when using generated svg files.


I would like to be able to controll the size of the svg in the web application - but this isn't possible without some javascript hacks. if you would change the parameters to those i've given above this could be changed and firefox would be able to scale the svg with normal html tag parameters inside of the object-tag.

ChemAxon 7c2d26e5cf

02-07-2009 14:13:09

Thanks for the clarification.
I have created a simple html page where an SVG graphics (non-Marvin) is inserted twice. Firstly the <object> size equals with the graphics dimension, in second case the object size is larger than the original dimension of the graphics. In the second case, the graphics does not fill out the area of the object tag. (The table border demonstrates the edges of the object.)


http://www.chemaxon.com/test/svg.html


We use the Batik Java SVG Toolkit for SVG generation (http://xmlgraphics.apache.org/batik/).


Currently we are not prepared to manipulate manually the SVG source (that is generated by Batik). If you have managed to solve this problem and share your experience with us, we will be very appreciate and try to integrate this workaround into the code.


The only workaround that I can suggest currently to set the graphics dimension to the same size that you will use in the <embed> or <object> tag.