New to Kendo UI for jQuery? Download free 30-day trial

Exporting Drawings to Images

The Drawing library supports the export of drawings to bitmap images in a PNG file format.

    <button class="k-button k-primary" onclick="exportImg()">Export Image</button>
        var draw = kendo.drawing;
        var geom = kendo.geometry;

        var rect = new geom.Rect([5, 5], [240, 240]);
        var path = draw.Path.fromRect(rect).stroke("red", 5);

        var root = new draw.Group();

        function exportImg(){
            draw.exportImage(root, { width: "250px", height: "250px" }).done(function(data) {
                    dataURI: data,
                    fileName: "frame.png"

See Also

In this article