Page 1 of 1

.svg image not displaying

Posted: Tue Oct 12, 2021 8:20 am
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
image.png (75.98 KiB) Viewed 1743 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 1743 times
The SVG image is generated from Lucidcharts. Is this a known issue? Is there any workaround to get this to work?

Thanks

Re: .svg image not displaying

Posted: Tue Oct 12, 2021 9:45 am
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

Re: .svg image not displaying

Posted: Wed Oct 13, 2021 8:10 am
by kj_rk
Thanks!
Emailed the SVG image to support@oxygenxml.com.

Looking forward to your findings.

Re: .svg image not displaying

Posted: Wed Oct 13, 2021 9:05 am
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

Re: .svg image not displaying

Posted: Thu Oct 14, 2021 1:17 am
by kj_rk
That worked!

Thanks, Radu!

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

Re: .svg image not displaying

Posted: Thu Oct 14, 2021 7:37 am
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