Free Support Forum - aspose.com

Bug with convert vsd to svg

I test trial version. Try convert my vsd file to svg. And it doesn't work correct. Some shapes are disapiared.

orginal-vsd.zip and result atached.

Hi Yuriy,


Thank you for contacting support. We can notice an evaluation watermark inside the output SVG file. It is because you have not applied a valid license. You can avoid evaluation limitations by getting a temporary license for 30 days and try the latest version at your end. You can download a latest version of Aspose.Diagram from the download page:
http://www.aspose.com/community/files/51/.net-components/aspose.diagram-for-.net/default.aspx

You can learn all about how Aspose products are licensed by checking out the Licenses FAQ here: http://www.aspose.com/corporate/purchase/faqs/default.aspx
http://www.aspose.com/docs/display/diagramnet/License+Aspose.Diagram+for+.NET

Please do let us know in case of any confusion or questions.

"Watermark inside the output SVG" is NOT problem.

"Some shapes are disapiared." is problem.

Read please my topic again. and see attached images for datail.

Hi Yuriy,


Thank you for your inquiry. We have tested your sample Visio drawing against the latest build of Aspose.Diagram 4.4.0. There is no missing shapes, but we can notice incorrect alignments of shape text items. We have logged this problem under ticket id DIAGRAMNET-50231 in our issue tracking system. Your request has also been linked to this issue. We’ll keep you informed regarding any available updates. We’re sorry for the inconvenienced you faced.

ok,


I have tried with temporary license yesterday. And result was correct. All shapes are visiable now.

The problem with missing shapes was just on evaluation mode. (may be you have limitations.)

Thank you.




Hi Yuriy,


Thank you for these details. It looks as a browser specific issue. The output SVG file looks perfect in the chrome. However, we can notice the text alignment issues with internet explorer 9. I have logged my comments against the ticket id DIAGRAMNET-50231.

I have not acess to http://nanjing.aspose.com/jira , so write here.


convert to svg work incorrect in IE9 and FireFox, because,

in result svg file:

1. Use comma to separeta entity in path here:

<path d=" M 0,0, L 849.4337,0, L 849.4337,0, L 849.4337,136.063, L 849.4337,136.063, L 0,136.063, L 0,136.063, L 0,0,z" stroke="#000000" stroke-width=“0.24” stroke-linecap=“round” fill=“none” />

2. Write font size without pt or em:

<text transform=“matrix(1 0 0 -1 0 25.79712)” x=“5.342045” y=“7.2” style=“fill:#000000;stroke:none;font-size:12;font-family:Arial;”>
Руководитель проекта

It’s incorrect if read svg specification http://www.w3.org/TR/SVG11/paths.html#DAttribute

Say please it to you developers.

Hi Yuriy,


Thank you for the details. We have passed this information to our development team against the ticket id DIAGRAMNET-50231. As soon as we have made some significant progress, we would be more than happy to update you with the status of correction.

if somebody have same problem, it can'be resolved wih HtmlAgilityPack like this:

public void ExportToSVG(string filepath)
{
Diagram diagram = new Diagram(filepath);

filepath = System.IO.Path.ChangeExtension(filepath, "svg");

diagram.Save(filepath, SaveFileFormat.SVG);

HtmlAgilityPack.HtmlDocument doc = new HtmlDocument();

doc.LoadHtml(System.IO.File.ReadAllText(filepath, Encoding.UTF8));

foreach (HtmlNode node in doc.DocumentNode.SelectNodes("//path[@d]"))
{
HtmlAttribute att = node.Attributes["d"];
att.Value = att.Value.Replace(",", " ");
}

foreach (HtmlNode node in doc.DocumentNode.SelectNodes("//text[@style]"))
{
HtmlAttribute att = node.Attributes["style"];
att.Value = Regex.Replace(att.Value, @"font-size\:(\d*);", @"font-size:$1px;");
}

doc.Save(filepath);
}

Hi Yuriy,


Thank you for posting a workaround there. It’s nice to hear from you that it works for you. Please keep using this sample code till the original fix. We’ll notify you once it is fixed and available for public use.

The issues you have found earlier (filed as ) have been fixed in this Aspose.Words for JasperReports 18.3 update.