We generate a XHTML page with many UML diagrams in SVG format, and had the idea to have a single global <defs> element for common symbols.
The code is like this:
When generating the PDF document, the first arrow head (with reference to the global definition) is not rendered!
Is this a bug in Prince, or is something wrong with the code (maybe need a special DTD?)?
I've attached the output document and a bitmap of the correct(?) rendering from Firefox or Opera.
The code is like this:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>SVG marker test page</title>
</head>
<body>
<svg xmlns="http://www.w3.org/2000/svg" width="0" height="0">
<defs>
<marker id="arrow-global"
viewBox="0 0 16 10" refX="16" refY="5"
markerWidth="16" markerHeight="10"
orient="auto">
<path d="M 0 0 L 16 5 L 0 10 z" style="fill:red;" />
</marker>
</defs>
</svg>
<h2>Use global defs</h2>
<svg xmlns="http://www.w3.org/2000/svg"
width="100" height="50">
<path d="M20,20 l50,0 l30,30" marker-end="url(#arrow-global)" style="stroke:black; fill:none;"/>
</svg>
<h2>Use local defs</h2>
<svg xmlns="http://www.w3.org/2000/svg"
width="100" height="50">
<defs>
<marker id="arrow-local"
viewBox="0 0 16 10" refX="16" refY="5"
markerWidth="16" markerHeight="10"
orient="auto">
<path d="M 0 0 L 16 5 L 0 10 z" style="fill:blue;" />
</marker>
</defs>
<path d="M20,20 l50,0 l30,30" marker-end="url(#arrow-local)" style="stroke:black; fill:none;"/>
</svg>
</body>
</html>
When generating the PDF document, the first arrow head (with reference to the global definition) is not rendered!
Is this a bug in Prince, or is something wrong with the code (maybe need a special DTD?)?
I've attached the output document and a bitmap of the correct(?) rendering from Firefox or Opera.
- - -
Johann