.svg image not displaying

Post here questions and problems related to editing and publishing DITA content.
kj_rk
Posts: 30
Joined: Thu Jul 15, 2021 10:01 am

.svg image not displaying

Post by kj_rk »

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
When I try to transform this, it transforms fine to HTML5, but not to PDF. For PDF transformation, it throws a BridgeException.
image.png
The SVG image is generated from Lucidcharts. Is this a known issue? Is there any workaround to get this to work?

Thanks
You do not have the required permissions to view the files attached to this post.
Radu
Posts: 9446
Joined: Fri Jul 09, 2004 5:18 pm

Re: .svg image not displaying

Post by Radu »

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: 30
Joined: Thu Jul 15, 2021 10:01 am

Re: .svg image not displaying

Post by kj_rk »

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

Looking forward to your findings.
Radu
Posts: 9446
Joined: Fri Jul 09, 2004 5:18 pm

Re: .svg image not displaying

Post by Radu »

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: 30
Joined: Thu Jul 15, 2021 10:01 am

Re: .svg image not displaying

Post by kj_rk »

That worked!

Thanks, Radu!

Wondering why it was complaining only about #B, while there were so many other upper case references...
Radu
Posts: 9446
Joined: Fri Jul 09, 2004 5:18 pm

Re: .svg image not displaying

Post by Radu »

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