A way to disable style, width and heigth attributes in SVG exported xml (to allow auto-scaling in browsers)

0 votes
asked Mar 1 in Wanted features by boshka (2,230 points)
Could you please support a plantuml option (a parameter passed to jar) that would disable the following attributes in the output svg file:

1. style="width:937px;height:1425px;"

2. height="1425px"

3. width="937px"


This will allow auto scaling (such as fit to page size) when the svg is rendered by a browser.

Here are the elements:

<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="1425px" preserveAspectRatio="none" style="width:937px;height:1425px;" version="1.1" viewBox="0 0 937 1425" width="937px" zoomAndPan="magnify">
commented Mar 2 by boshka (2,230 points)
in fact these attributes can be overriden by the CSS style in browser:
svg {
    width: unset !important;
    height: unset !important;
But, might be, this is not always convenient to do this via the override.

1 Answer

0 votes
answered Mar 2 by plantuml (143,890 points)

With last beta http://beta.plantuml.net/plantuml.jar you can have:

skinparam svgDimensionStyle false

component a {
component b {
a -(0- b

If you have a better idea for the parameter name, please post your suggestion here!

Is this what you are looking for ?

commented Mar 5 by boshka (2,230 points)
Probably even disabling style at all + an ability to set custom? Such as:
skinparam svgStyle true
skinparam svgStyle false
skinparam svgStyle <custom css> (for example: width:unset;height:unset;... etc.)