Created
March 24, 2015 15:06
-
-
Save EdCharbeneau/d0bc63a4f557504434ba to your computer and use it in GitHub Desktop.
Export to image with Kendo UI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Convert the DOM element to a drawing using kendo.drawing.drawDOM | |
kendo.drawing.drawDOM($(".qr-wrapper")) //#qrMail | |
.then(function(group) { | |
// Render the result as a PNG image | |
return kendo.drawing.exportImage(group); | |
}) | |
.done(function(data) { | |
// Save the image file | |
kendo.saveAs({ | |
dataURI: data, | |
fileName: "example.png", | |
proxyURL: "http://demos.telerik.com/kendo-ui/service/export" | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment