We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to convert a saved diagram to svg in code behind (no UI)


I am saving my diagrams in a database.
I now have a need to use these diagrams elsewhere in my application.
So I need to read the saved diagram data and convert it to svg format.
Later I'll also need to convert the diagram data to an image format such as png.

I was hoping to use something like the following:

public String GetActivityDiagramImage(String activityID)
        String diagram_Data = GetDiagram(activityID);
        Diagram diagram = new Diagram();

        JavaScriptSerializer js = new JavaScriptSerializer();
        string JSON = js.Serialize(diagram_Data);


        return "Diagarm in SVG Format";

But there is no load method in code behind.

Any suggestions on how to accomplish what I'm trying to do?



1 Reply

SG Shyam G Syncfusion Team January 12, 2015 04:46 PM UTC

Hi Jim

Thanks for using Syncfusion products.

Currently we don’t have the support to load the diagram in the server side. We consider this as a feature request and created a new incident 133908 on behalf of you related to this forum. We suggest you to follow up the incident for further reference using your direct trac account. However we have created a workaround sample to load the diagram in the server side.


Code snippet to export SVG in server side:

function exportassvg() {




        public static void exportassvg()


            //you can perform export to svg here


Please let me know if any concerns.


Shyam G

Live Chat Icon For mobile
Up arrow icon