<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal><span style='color:#1F497D'>Please send a small, complete example with the images and SVG to support @ renderx so we can look at the issue.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Kevin Brown<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>RenderX<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b>From:</b> Xep-support [mailto:xep-support-bounces@renderx.com] <b>On Behalf Of </b>Darren Munt<br><b>Sent:</b> Monday, August 29, 2016 11:31 PM<br><b>To:</b> xep-support@renderx.com<br><b>Subject:</b> [xep-support] SVG Image tag pulls wrong image into PDF<o:p></o:p></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=EN-AU>This is a very strange one. It is reproducible on my dev machine (Windows 10) and on our production server (Windows 2008 R2), so I think I can rule out environment.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-AU>I’m embedding an SVG object into the document using <fo:instream-foreign-object>. The SVG describes a line chart which uses GIF images as point markers. The images are icons which represent different questions that were asked, each icon represents one question, and they are displayed in the order that the question was answered by the user, from left to right.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-AU>The SVG is quite large so I won’t copy it all, but the icons are embedded with this code:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-AU><image x="53" y="233" width="46" height="46" xlink:href="d:\torqicons\PathAnalysis_up.gif" /><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-AU>I have included the xlink namespace in SVG tag.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-AU>What is happening is that some of the <image> tags are displaying the wrong image. It seems to be completely at random. If I look at the FO, I see the correct file name, but the PDF output will have one of the other icons instead of the one that was specified. I can rebuild the PDF several times and it will either display the same incorrect icons, or it will randomly change to showing the wrong image for a different one. The only thing that is consistent is that it never shows all 12 icons correctly.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-AU>Beneath this SVG, I also have a table, which is a key to the icons. It displays the same images used in the SVG with some descriptive text. This uses exactly the same file name and they are always displayed correctly. The image is embedded with this code:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-AU><fo:external-graphic vertical-align="middle" content-width="0.8cm" src="url(d:\torqicons\PathAnalysis_up.gif)" /><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-AU>As you can see the image path is identical.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-AU>In an attempt to see where the problem is occurring, I duplicated all of the SVG image tags and added an ‘x’ to the end of the file name in one copy of each of the 12 images. Like this:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-AU><image x="53" y="233" width="46" height="46" xlink:href="d:\torqicons\PathAnalysis_up.gif" /><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU><image x="53" y="233" width="46" height="46" xlink:href="d:\torqicons\PathAnalysis_up.gifx" /><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-AU>When I transform this FO into a PDF, I see the same jumbled images but if I now look at the XEP logger output I see 12 messages like this:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-AU>SVG element 'image' ignored: com.renderx.svg.SVGParseException: java.net.MalformedURLException: Invalid URL or non-existent file: d:\torqicons\ PathAnalysis_up.gifx<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-AU>They are all the correct file name and in the correct order. So this tells me that XEP is getting the correct file name and is attempting to load the correct image, but the wrong image is ending up in the output.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-AU>It appears something strange is happening in the SVG rendering. Would appreciate any assistance in getting to the bottom of it. I can supply FO to reproduce. I have attached a screenshot of the PDF output and indicated on it which icons are wrong. As I say it is random and not always the same ones that are wrong. I have included the variable part of the file name next to the icon so that it can be seen which icon is meant to be there.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU><o:p> </o:p></span></p></div></body></html>