Using the follow code:
If I run
I get the correct output, which is just the upper left 25% of the rectangle.
However, if I run:
I get the entire rectangle instead of just the corner - it seems to ignore the viewBox height/width.
In general, using html mode work with svg just fine (even though it outputs warnings about "tag svg invalid" etc...). I need to use html mode because it is a lot more forgiving about the input (as opposed to xml mode which fails with any errors in the input - and my input is often quite dirty).
Any suggestions, or a workaround?
<html>
<body>
<svg viewBox="0 0 250 150"
width="10cm" height="6cm">
<g fill="none" stroke="gray" stroke-width="20">
<rect x="50" y="50" width="400" height="200"
rx="80" ry="50"/>
</g>
</svg>
</body>
</html>
If I run
prince --input xml rect.html
I get the correct output, which is just the upper left 25% of the rectangle.
However, if I run:
prince --input html rect.html
I get the entire rectangle instead of just the corner - it seems to ignore the viewBox height/width.
In general, using html mode work with svg just fine (even though it outputs warnings about "tag svg invalid" etc...). I need to use html mode because it is a lot more forgiving about the input (as opposed to xml mode which fails with any errors in the input - and my input is often quite dirty).
Any suggestions, or a workaround?