Nevron .NET Vision
Diagram for .NET / User's Guide / Extensions / SVG Exporter
In This Topic
    SVG Exporter
    In This Topic

    The SVG exporter extension helps you export drawing to W3C acclaimed Scalable Vector Format (SVG). It is represented by the NSvgExporter class whose one and only constructor by design requires a reference to the document, which must be exported to SVG. 

    C#
    Copy Code
    // create a new SVG exporter
    NSvgExporter svgExporter = new NSvgExporter(document);
    
    Visual Basic
    Copy Code
    ' create a new SVG exporter
    Dim svgExporter As New NSvgExporter(document)
    

    SVG content is XML based and hence can be encoded in a string. To get the string which represents the diagram in SVG - use the RenderToSvg method. Alternatively you can save the generated SVG to an external file with the help of the the SaveToFile method, or copy the SVG string to the clipboard with the CopyToClipboard method.

    The SVG exporter has a localizable visual interface, which is displayed by the ShowDialog method.