This gist explains the steps and code snippet on how to convert VSD file to SVG using Aspose.Diagram Cloud SDK for .NET.
For more information, please visit
This gist explains the steps and code snippet on how to convert VSD file to SVG using Aspose.Diagram Cloud SDK for .NET.
For more information, please visit
// Get ClientID from https://dashboard.aspose.cloud/ | |
string clientSecret = "caac6e3d4a4724b2feb53f4e460eade3"; | |
string clientID = "4ccf1790-accc-41e9-8d18-a78dbb2ed1aa"; | |
// create an object of DiagramApi | |
DiagramApi diagramApi = new DiagramApi("client_credentials", clientID, clientSecret); | |
// source VSD file available in Cloud storage | |
String inputFile = "Raise-PO-Process-Flow-Chart.vsd"; | |
// resultant SVG file name | |
String resultant = "conveted.svg"; | |
try | |
{ | |
// initiate the file conversion process | |
var response = diagramApi.DownloadFileWithFormat(inputFile,format: "SVG", null); | |
if (response != null ) | |
{ | |
Console.WriteLine("Successfully converted VSD to SVG !"); | |
} | |
// custom method to save resultant file on local system drive | |
saveToDisk(response, "/Users/nshahbaz/Downloads/" + resultant); | |
} | |
catch (Exception ex) | |
{ | |
Console.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace); | |
} | |
public static void saveToDisk(Stream responseStream, String resultantFile) | |
{ | |
var fileStream = File.Create(resultantFile); | |
responseStream.Seek(0, SeekOrigin.Begin); | |
responseStream.CopyTo(fileStream); | |
fileStream.Close(); | |
} |
This Gist contains code snippets related to Converting VSD to SVG format using C# .NET |