Saving diagrams to svg differences with Visio

Dear support,

I am evaluating the product Aspose.Diagram with a temporay license.
I am using the .NET-package via the NuGet-package Aspose.Diagram (Version 24.7.0) in VS2022 on Windows 11 x64 (latest version).

Saving the diagram to a svg-file goes fine, however I noticed some differences with Visio:

  • I see that in svg-files saved with Aspose.Diagram single quotes are used for the values while Microsoft Visio is producing double quotes
  • I see that the measurement values of for example width, height, viewBox are in pt (points) while Microsoft Visio is using in (inches).

Example Visio:

svg xmlns=“[SVG namespace](http://www.w3.org/2000/svg)” xmlns:xlink=“[XLink namespace](http://www.w3.org/1999/xlink)” xmlns:ev=“[XML Events namespace](http://www.w3.org/2001/xml-events)” width=“13.080241in” height=“7.145682in” viewBox=“16.825620 18.517660 941.777013 514.488901” xml:space=“preserve” color-interpolation-filters=“sRGB” class=“st3”

Example Aspose.Net:

svg xmlns=‘[SVG namespace](http://www.w3.org/2000/svg)’ xmlns:v=‘http://schemas.microsoft.com/visio/2003/SVGExtensions/’ xml:space=‘preserve’ xmlns:xlink=‘[XLink namespace](http://www.w3.org/1999/xlink)’ width=‘864pt’ height=‘595.2744pt’ viewBox=‘0 0 864 595.2744’

Is it possible to adjust this so this corresponds with the output of Microsoft Visio?
So I would like to have double quotes for the values and inches as measurement value

@tkn1967
Thanks for your inquiry.

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): DIAGRAMNET-53444

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

The issues you have found earlier (filed as DIAGRAMNET-53444) have been fixed in this update. This message was posted using Bugs notification tool by philip.zhou

Hi Philip,

Thank you for the update.
I have updated the package to the latest version but unfortunately the issue are still occurring.

Probably I have to do something to let the ‘QuoteChar’ a double quote instead of a single quote.
Could you please tell me what I have to do to get double quotes?

svg xmlns=‘SVG namespace’ xmlns:v=‘http://schemas.microsoft.com/visio/2003/SVGExtensions/’ xml:space=‘preserve’ xmlns:xlink=‘XLink namespace’ width=‘100%’ height=‘100%’ viewBox=‘0 0 1152 793.6992’

I noticed that when exporting the diagram to svg page by page the width and height are exported as precent (%). How can I effect these measurement units in the export of the diagram to svg?

Code snippets (in C#) are fine :slight_smile:

With Kind Regards,

Thierry

@tkn1967
When set the option to SVGFitToViewPort,we will set the width and height as percent.

We plan to use the double quote instead of a single quote in next version. You will be notified when the next version is released.
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): DIAGRAMNET-53509

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

1 Like

The issues you have found earlier (filed as DIAGRAMNET-53509) have been fixed in this update. This message was posted using Bugs notification tool by philip.zhou

1 Like