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.
Unfortunately, activation email could not send to your email. Please try again.

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

Thread ID:

Created:

Updated:

Platform:

Replies:

117935 Jan 11,2015 11:30 AM Jan 12,2015 11:46 AM ASP.NET Web Forms 1
loading
Tags: Diagram
Jim Jacobs
Asked On January 11, 2015 11:30 AM

Hi,

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);

        //diagram.load(JSON);
        //diagram.saveAsSVG...

        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?

Thanks

Jim

Shyam G [Syncfusion]
Replied On January 12, 2015 11:46 AM

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.

Sample:http://www.syncfusion.com/downloads/support/directtrac/117935/loadinserverside521806239.zip

Code snippet to export SVG in server side:

function exportassvg() {

            PageMethods.exportassvg();

        }

[WebMethod]

        public static void exportassvg()

        {

            //you can perform export to svg here

        }

Please let me know if any concerns.

Regards,

Shyam G



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;