Save vsdx to svg format it shown exception

@asad.ali,

While saving the ‘. VSDX’ file to '. SVG it will show the exception like below.

Aspose.Diagram.DiagramException: ImageSaveOptions save format can be TIFF, PNG, BMP, EMF or JPEG only.

Sample Code:

                string[] files = Directory.GetFiles(strInputPath, "*.vsdx");
		foreach(string strFile in files)
		{
			Diagram vdxDiagram = new Diagram(strFile);
			vdxDiagram.RemoveHiddenInformation((int) (RemoveHiddenInfoItem.Masters | RemoveHiddenInfoItem.PersonalInfo | RemoveHiddenInfoItem.Shapes | RemoveHiddenInfoItem.Styles));
			ImageSaveOptions opt = new ImageSaveOptions(SaveFileFormat.SVG)
			                       {
				                       SmoothingMode = SmoothingMode.HighQuality,
				                       CompositingQuality = CompositingQuality.HighQuality,
				                       InterpolationMode = InterpolationMode.HighQualityBicubic,
				                       PixelOffsetMode = PixelOffsetMode.HighQuality
			                       };
			vdxDiagram.Save(strOutputPath + Path.GetFileNameWithoutExtension(strFile)+".svg", opt);
		}

Visio File: Background_Missing_Old.zip (100.3 KB)

Please support us,

Thanks

@msindia

We have logged an issue as DIAGRAMNET-51685 in our issue tracking system for further investigation. We will look into details of it and keep you posted with the status of its correction. Please be patient and spare us little time.

We are sorry for the inconvenience.

@asad.ali,

This ticket status still " Won’t Fix"

### Issues Status

**DIAGRAMNET-51685**  ---- Status : Won't Fix

Could you please share the status (Reason).

Thanks

@msindia

Would you please use following code snippet instead of using ImageSaveOptions"

Diagram diagram = new Diagram(strFile);
diagram.Save("output.svg", SaveFileFormat.SVG);

In case you still face any issue, please feel free to let us know.

@asad.ali

Would you please use following code snippet instead of using ImageSaveOptions"

```
Diagram diagram = new Diagram(strFile);
diagram.Save("output.svg", SaveFileFormat.SVG);
```

It’s working fine.

But, Why I can’t use this
ImageSaveOptions opt = new ImageSaveOptions(SaveFileFormat.SVG)

Could please share the reason.

Thanks.

@msindia

We are gathering the details and will get back to you with them shortly.

The issues you have found earlier (filed as DIAGRAMNET-51685) have been fixed in Aspose.Diagram for .NET 19.9.

@asad.ali

You’re awesome :slightly_smiling_face:, the ticket **’ DIAGRAMNET-51685’
is solved.

Thanks for your support, :muscle:

Thanks.

@asad.ali,

While saving the ‘. VSDX’ file to ‘. SVG’ format. Some extra icon shown.

Input: Unwanted_Icon Shown.zip (54.0 KB)
Output: Unwanted_Icon Shown (2).zip (5.2 KB)

have a look below image:

UnwantedIcon.png (8.1 KB)

Please help us.

Thanks

@msindia

Would you kindly share the code snippet that you are using. We will test the scenario in our environment and address it accordingly.

@asad.ali,

We have tried with below code,

string strInputPath = @“C:\vj\2019\Visio Issues\Old”;
string strOutputPath = @“C:\vj\2019\Visio Issues\New\SVG”;

  	string[] files = Directory.GetFiles(strInputPath, "*.vsdx");

  	// Act

  	foreach(string strFile in files)
  	{
  		Diagram vdxDiagram = new Diagram(strFile);
  		//vdxDiagram.RemoveHiddenInformation((int) (RemoveHiddenInfoItem.Masters | RemoveHiddenInfoItem.PersonalInfo | RemoveHiddenInfoItem.Shapes | RemoveHiddenInfoItem.Styles));
  		ImageSaveOptions opt = new ImageSaveOptions(SaveFileFormat.SVG)
  		                       {
  			                       SmoothingMode = SmoothingMode.HighQuality,
  			                       CompositingQuality = CompositingQuality.HighQuality,
  			                       InterpolationMode = InterpolationMode.HighQualityBicubic,
  			                       PixelOffsetMode = PixelOffsetMode.HighQuality
  		                       };
  		vdxDiagram.Save(strOutputPath + Path.GetFileNameWithoutExtension(strFile) + ".svg", opt);
  	}

Thanks.

@msindia

Thanks for sharing the code snippet.

We have logged an issue as DIAGRAMNET-51720 in our issue tracking system for the sake of correction. We will surely inform you as soon as the issue is rectified. Please spare us little time.

We are sorry for the inconvenience.

The issues you have found earlier (filed as DIAGRAMNET-51720) have been fixed in Aspose.Diagram for .NET 19.10.

@asad.ali
You’re awesome :slightly_smiling_face:, the ticket **’ DIAGRAMNET-51720
is solved.

Thanks for your support, :muscle:

Thanks.

@asad.ali,

While convert Visio to SVG. It’s shown some exception.
Input: Issue_Exception _SVG.zip (39.0 KB)
Output: image.png (12.5 KB)

We are waiting for your reply and support.
Thanks.

@msindia

We have logged an issue as DIAGRAMNET-51794 in our issue tracking system for this. We will surely inform you as soon as it is resolved. Please be patient and spare us little time.

We are sorry for the inconvenience.

@asad.ali,
While convert Visio to SVG. Some images have issue. Aspose Diagram 20.3.0.0 new version
Problem 1: Icon Missing
Input: pdf icons.zip (33.6 KB)
Output: image.png (12.4 KB)

Problem 2: Check box shown with Different icon
Input : Dialog - 44.zip (38.5 KB)
Output: image.png (21.7 KB)

Problem 3: Background Image Missing (PowerPoint is added in the VISIO)
Input: Background_Image_Mising.zip (123.5 KB)

Output: image.png (24.7 KB)

We are waiting for your reply and support.
Thanks.

@msindia

The issues have been logged as following in our issue tracking system:

  • DIAGRAMNET-51798
  • DIAGRAMNET-51799
  • DIAGRAMNET-51800

We will inform you as soon as they are resolved. Please be patient and spare us some time.

We are sorry for the inconvenience.

The issues you have found earlier (filed as DIAGRAMNET-51794) have been fixed in Aspose.Diagram for .NET 20.3.

While convert Visio to SVG. Some images have issue. Aspose Diagram 20.3.0.0 new version
Problem 1: Number alignment out of the canvas
Input:-Dialog - 46.zip (36.1 KB)

Output:-Dialog-46_number_alignment_outside.jpg (66.8 KB)

Problem 2: Heading overlapped by an “-” symbol before it.
Input:-Help 1 (3).zip (69.0 KB)

Output:-Help 1 (3)_heading_overlaped.png (35.8 KB)

Problem 3:- A black block in the middle of the picture
Input:-Help 1 (120).zip (53.4 KB)

Output:-Help 1 (120)A_black_block.zip (4.4 KB)

Problem 4: No check box
Input:-HELP_RSANET_WEB_AUFTRAG_PROZESSQUERY_UCAUFTRAGQUERY_RESULT_8d18787e-9c00-4d36-b274-6ef991bfcc8f_75.zip (349.9 KB)

Output:-Help_No_Checkbox.png (44.6 KB)

Problem 5: Icons missing
Input:-Icon_Missing.zip (37.0 KB)

Output:-Icon_Missing.png (25.2 KB)

Problem 6: Number changed in the middle. Which is supposed to be mm.yyyy. but it gives an arbitrary number getting incremented by 30.
Input:-Number_Changed.zip (103.2 KB)

Output:-number changed.png (42.3 KB)
waiting for your response and support.
Thanks.