exportPDF

Exports a group of drawing elements as a PDF file.

The group will be positioned at [0, 0] in the exported file. It's dimensions will be used as default dimensions for the image.

The export operation is asynchronous and returns a promise.

The promise will be resolved with a PDF file encoded as a Data URI.

Scene images must be of same origin or CORS-enabled.

Parameters

group kendo.drawing.GroupThe root group containing all elements to export.
options kendo.drawing.PDFOptionsParameters for the exported PDF file.

ReturnsPromise A promise that will be resolved with a PDF file encoded as a Data URI.

Example - Exporting a drawing to a PDF file

<script>
    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();
    root.append(path);

    draw.exportPDF(root, { paperSize: "A5", landscape: true }).done(function(data) {
        kendo.saveAs({
            dataURI: data,
            fileName: "frame.pdf"
        });
    });
</script>
In this article