We have the following SVG image file updateState.svg:
We present the SVG image in the following HTML:
The style property "max-height" shrinks the SVG image to about half of its original size.
When converted to PDF with Prince, you see three lines of text where the first two lines are cut off at the bottom!
It seems that the <path> elements overlap the preceding <text> elements.
The issue does not occur when the width and height attribute on the <svg> element are set to half of their original value.
PS: I know that the definitions of the <text> elements look a bit weird, but we can not change that (the images are printed to XPS format with the Microsoft XPS Document Writer, and then transformed to SVG).
<svg xmlns="http://www.w3.org/2000/svg"
version="1.1"
width="700.8pt"
height="1386.24pt"
xml:lang="und"
viewBox="0 0 700.8 1386.24"
stroke="none"
fill="white"
fill-opacity="1"
fill-rule="nonzero"
font-family="Arial"
stroke-opacity="0">
<path fill="#F5EDD8" d="M 410.56 1028.48 L 528.48 1028.48 528.48 1039.04 410.56 1039.04 z"/>
<text transform="matrix(0.0270066 0 0 0.0269134 0 0)" fill="#595959" font-size="321.1264" x="15202.2" y="38529.6">[operator acknowledgement]</text>
<path fill="#F5EDD8" d="M 410.56 1039.04 L 598.56 1039.04 598.56 1049.6 410.56 1049.6 z"/>
<text transform="matrix(0.0270066 0 0 0.0269134 0 0)" fill="#595959" font-size="321.1264" x="15202.2" y="38921.9">/deactivate operator acknowledgement request</text>
<path fill="#F5EDD8" d="M 410.56 1049.6 L 625.92 1049.6 625.92 1060.16 410.56 1060.16 z"/>
<text transform="matrix(0.0270066 0 0 0.0269134 0 0)" fill="#595959" font-size="321.1264" x="15202.2" y="39314.2">clear diagnostic event for operator acknowledgement</text>
</svg>
We present the SVG image in the following HTML:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>SVG Test</title>
</head>
<body>
<img src="updateState.svg" style="max-height:693.12pt" />
</body>
</html>
The style property "max-height" shrinks the SVG image to about half of its original size.
When converted to PDF with Prince, you see three lines of text where the first two lines are cut off at the bottom!
It seems that the <path> elements overlap the preceding <text> elements.
The issue does not occur when the width and height attribute on the <svg> element are set to half of their original value.
PS: I know that the definitions of the <text> elements look a bit weird, but we can not change that (the images are printed to XPS format with the Microsoft XPS Document Writer, and then transformed to SVG).
- - -
Johann