.svg image not displaying

kj_rk
Posts: 12
Joined: Thu Jul 15, 2021 10:01 am

.svg image not displaying

Post by kj_rk » Tue Oct 12, 2021 8:20 am

Hi Oxygen team,

I am trying to insert an image of type .svg in my DITA topic, but I get the following error in the Author mode.

Code: Select all

<image href="images/product_steps_sequence.svg" scale="70">
      <alt>Sequential overview of the tasks involved in setting up our product.</alt>
    </image>
image.png
image.png (75.98 KiB) Viewed 224 times
When I try to transform this, it transforms fine to HTML5, but not to PDF. For PDF transformation, it throws a BridgeException.
image.png
image.png (21.7 KiB) Viewed 224 times
The SVG image is generated from Lucidcharts. Is this a known issue? Is there any workaround to get this to work?

Thanks

Radu
Posts: 7697
Joined: Fri Jul 09, 2004 5:18 pm

Re: .svg image not displaying

Post by Radu » Tue Oct 12, 2021 9:45 am

Hi,

The SVG viewer used by Oxygen seems to consider the image as invalid, maybe it has some kind of reference which is broken, if you open it in Oxygen maybe you can look a little bit at what it contains inside.
Other than that, to give you more details we would need access to the image, if you send us a sample image via email (support@oxygenxml.com) we could look into it.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

kj_rk
Posts: 12
Joined: Thu Jul 15, 2021 10:01 am

Re: .svg image not displaying

Post by kj_rk » Wed Oct 13, 2021 8:10 am

Thanks!
Emailed the SVG image to support@oxygenxml.com.

Looking forward to your findings.

Radu
Posts: 7697
Joined: Fri Jul 09, 2004 5:18 pm

Re: .svg image not displaying

Post by Radu » Wed Oct 13, 2021 9:05 am

Hi,

Thanks for the sample.

If you use the Oxygen main menu Tools->"SVG Viewer" to open the SVG document, you will receive in the Oxygen results tab an error like:\

Code: Select all

Cannot find the referenced element:
"#B"
specified on the element <use> - may be a problem of 'id'
If you open the SVG document in Oxygen and search for "#B" there is a reference somewhere:

Code: Select all

<use xlink:href="#B"
but the "B" id is not defined anywhere in the SVG document, it should have been defined something like <g id="B", so it's a broken link to a graphics which makes our SVG renderer fail.
If you replace the reference to "B" with lowercase "b" like:

Code: Select all

<use xlink:href="#b"
the SVG rendering should work.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

kj_rk
Posts: 12
Joined: Thu Jul 15, 2021 10:01 am

Re: .svg image not displaying

Post by kj_rk » Thu Oct 14, 2021 1:17 am

That worked!

Thanks, Radu!

Wondering why it was complaining only about #B, while there were so many other upper case references...

Radu
Posts: 7697
Joined: Fri Jul 09, 2004 5:18 pm

Re: .svg image not displaying

Post by Radu » Thu Oct 14, 2021 7:37 am

Hi,

About this question:
Wondering why it was complaining only about #B, while there were so many other upper case references...
You can use Oxygen's Find/Replace with "Case sensitive" checked, search for "B" and it will not be found, but if you search for example for "C" you will find an element with that id="C".

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Post Reply