<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Jsreport external svg file rendering issue.]]></title><description><![CDATA[<p>We are evaluating jsreport to use it as a pdf report generating tool in out project. However we are facing few hurdles. I've described the problem in detailed below.<br />
Please let us know if there is a possible solution to this problem and wheather we are on the right track.</p>
<p>Problem Description:<br />
I have a svg file that is mounted on AWS S3. I am trying to render the svg in my report using a &lt;img&gt; tag as follows:<br />
&lt;img src={{this.diagram.backgroundImageUrl}} alt=&quot;diagramImg&quot;/&gt;<br />
'this.diagram.backgroundImageUrl' is a s3 link.<br />
I've attached a screenshot of the result image rendered in the PDF. Also,attaching the actual image that needs to be rendered.<br />
The svg file has image tags: for eg. &lt;image width=&quot;60&quot; height=&quot;60&quot; xlink:href=&quot;assets/img/test.svg&quot;&gt;. Inorder to match the test.svg file path I've mounted all the assets in my Project folder. The root folder structure looks like this -ProjectName/assets/img/test.svg.<br />
I've added them as assets using following steps: new file-&gt;assets-&gt;select local file-&gt;upload.</p>
<p>We've experimented with few solutions to check wheather jsreport can render svgs from external resources like S3.<br />
1]Download a svg from the internet, mount in the project folder and try rendering. This works fine.</p>
<p>2]Downloaded the svg file from s3. Added it to the project structure at the same level as the assets folder. We were trying to<br />
figure out if the &lt;image&gt; tag within svg picks the file path from assets folder when saved locally. This did not work as expected. We have the same result as the problem description.<img src="/uploads/files/1673507781559-jsreport-playground-screenshot-resized.jpeg" alt="2_1673507773185_jsreport playground screenshot.jpg" class="img-responsive img-markdown" /> <img src="/uploads/files/1673507780346-folder-structure.jpeg" alt="1_1673507773185_folder structure.jpg" class="img-responsive img-markdown" /> <img src="/uploads/files/1673507780162-actual-image.jpeg" alt="0_1673507773184_actual image.jpg" class="img-responsive img-markdown" /></p>
]]></description><link>https://forum.jsreport.net/topic/2678/jsreport-external-svg-file-rendering-issue</link><generator>RSS for Node</generator><lastBuildDate>Mon, 07 Sep 2026 00:23:14 GMT</lastBuildDate><atom:link href="https://forum.jsreport.net/topic/2678.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 12 Jan 2023 07:16:41 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Jsreport external svg file rendering issue. on Invalid Date]]></title><description><![CDATA[<p>We are evaluating jsreport to use it as a pdf report generating tool in out project. However we are facing few hurdles. I've described the problem in detailed below.<br />
Please let us know if there is a possible solution to this problem and wheather we are on the right track.</p>
<p>Problem Description:<br />
I have a svg file that is mounted on AWS S3. I am trying to render the svg in my report using a &lt;img&gt; tag as follows:<br />
&lt;img src={{this.diagram.backgroundImageUrl}} alt=&quot;diagramImg&quot;/&gt;<br />
'this.diagram.backgroundImageUrl' is a s3 link.<br />
I've attached a screenshot of the result image rendered in the PDF. Also,attaching the actual image that needs to be rendered.<br />
The svg file has image tags: for eg. &lt;image width=&quot;60&quot; height=&quot;60&quot; xlink:href=&quot;assets/img/test.svg&quot;&gt;. Inorder to match the test.svg file path I've mounted all the assets in my Project folder. The root folder structure looks like this -ProjectName/assets/img/test.svg.<br />
I've added them as assets using following steps: new file-&gt;assets-&gt;select local file-&gt;upload.</p>
<p>We've experimented with few solutions to check wheather jsreport can render svgs from external resources like S3.<br />
1]Download a svg from the internet, mount in the project folder and try rendering. This works fine.</p>
<p>2]Downloaded the svg file from s3. Added it to the project structure at the same level as the assets folder. We were trying to<br />
figure out if the &lt;image&gt; tag within svg picks the file path from assets folder when saved locally. This did not work as expected. We have the same result as the problem description.<img src="/uploads/files/1673507781559-jsreport-playground-screenshot-resized.jpeg" alt="2_1673507773185_jsreport playground screenshot.jpg" class="img-responsive img-markdown" /> <img src="/uploads/files/1673507780346-folder-structure.jpeg" alt="1_1673507773185_folder structure.jpg" class="img-responsive img-markdown" /> <img src="/uploads/files/1673507780162-actual-image.jpeg" alt="0_1673507773184_actual image.jpg" class="img-responsive img-markdown" /></p>
]]></description><link>https://forum.jsreport.net/post/11595</link><guid isPermaLink="true">https://forum.jsreport.net/post/11595</guid><dc:creator><![CDATA[vaishnaviatmobiusodotcom]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Jsreport external svg file rendering issue. on Invalid Date]]></title><description><![CDATA[<p>You can see here there should be no problem in rendering external svg.<br />
<a href="https://playground.jsreport.net/w/anon/p9HO7zN_" rel="nofollow">https://playground.jsreport.net/w/anon/p9HO7zN_</a></p>
<p>The image rendering is chrome's responsibility. jsreport doesn't tweak this. If you can see the image properly with html recipe in the browser, it should work also in chrome-pdf.</p>
<p>Is it a public s3 url? Can you share it?</p>
]]></description><link>https://forum.jsreport.net/post/11596</link><guid isPermaLink="true">https://forum.jsreport.net/post/11596</guid><dc:creator><![CDATA[jan_blaha]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Jsreport external svg file rendering issue. on Invalid Date]]></title><description><![CDATA[<p>The s3 url-<br />
<a href="https://s3.amazonaws.com/avdesign-staging-mobiuso/4bf503ec-65eb-4371-972f-17c3c0d647be/d9d9fcf9-2f72-4b28-9834-7404fb8bf0a2/5c3fef45-de9c-45d9-a897-a51953de948a/64caa655-f0d5-4b70-8947-158ebdea2a17/84f22a3f-a0b4-48b8-9c65-156449b68393.svg" rel="nofollow">https://s3.amazonaws.com/avdesign-staging-mobiuso/4bf503ec-65eb-4371-972f-17c3c0d647be/d9d9fcf9-2f72-4b28-9834-7404fb8bf0a2/5c3fef45-de9c-45d9-a897-a51953de948a/64caa655-f0d5-4b70-8947-158ebdea2a17/84f22a3f-a0b4-48b8-9c65-156449b68393.svg</a></p>
]]></description><link>https://forum.jsreport.net/post/11598</link><guid isPermaLink="true">https://forum.jsreport.net/post/11598</guid><dc:creator><![CDATA[vaishnaviatmobiusodotcom]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Jsreport external svg file rendering issue. on Invalid Date]]></title><description><![CDATA[<p>Try this html</p>
<pre><code>&lt;img src='https://s3.amazonaws.com/avdesign-staging-mobiuso/4bf503ec-65eb-4371-972f-17c3c0d647be/d9d9fcf9-2f72-4b28-9834-7404fb8bf0a2/5c3fef45-de9c-45d9-a897-a51953de948a/64caa655-f0d5-4b70-8947-158ebdea2a17/84f22a3f-a0b4-48b8-9c65-156449b68393.svg' /&gt;
</code></pre>
<p>It doesn't work in the browser as well therefore it can't work in jsreport.</p>
<p>The problem will be with paths inside the svg</p>
<pre><code>&lt;image x=&quot;0&quot; y=&quot;0&quot; width=&quot;750&quot; height=&quot;1276&quot; xlink:href=&quot;e3f1ec83-cd8a-422c-a644-0e7b73ff2c7d.jpeg&quot; 
</code></pre>
<p>This doesn't get resolved properly. I am not an expert in this. Maybe you need to set some base url for svg. Or convert svgs to pngs.</p>
]]></description><link>https://forum.jsreport.net/post/11599</link><guid isPermaLink="true">https://forum.jsreport.net/post/11599</guid><dc:creator><![CDATA[jan_blaha]]></dc:creator><pubDate>Invalid Date</pubDate></item></channel></rss>