exportImage

Exports the QRCode as an image. The result can be saved using kendo.saveAs.

The export operation is asynchronous and returns a promise. The promise will be resolved with a PNG image encoded as a Data URI.

Parameters

options Object (optional)

Parameters for the exported image.

options.width String

The width of the exported image. Defaults to the QRCode width.

options.height String

The height of the exported image. Defaults to the QRCode height.

Returns

Promise A promise that will be resolved with a PNG image encoded as a Data URI.

Example - Exporting a QRCode to an image

<div id="qrCode"></div>
<script>
    $("#qrCode").kendoQRCode({
        value: "mailto:clientservice@kendoui.com"
    });

    var qrCode = $("#qrCode").getKendoQRCode();
    qrCode.exportImage().done(function(data) {
        kendo.saveAs({
            dataURI: data,
            fileName: "QRCode.png"
        });
    });
</script>
In this article
exportImage
Not finding the help you need?
Contact Support