Skip to content

Instantly share code, notes, and snippets.

@EdCharbeneau
Created March 24, 2015 15:06
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EdCharbeneau/d0bc63a4f557504434ba to your computer and use it in GitHub Desktop.
Save EdCharbeneau/d0bc63a4f557504434ba to your computer and use it in GitHub Desktop.
Export to image with Kendo UI
// 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