I'd like to be able to get the generated pdf data from GridPDFExport in a callback, instead of saving to file. This is useful for emailing pdfs.
It can easily be achieved by adding a 'generatePDF' method to the KendoDrawingAdapter prototype such as this:
KendoDrawingAdapter.prototype.generatePDF = function (callback) {
var _this = this;
var savePromise = this.drawDOM(this.domElement, this.getDrawOptions())
.then(function (group) { return _this.exportPDF(group, _this.getPDFOptions()); })
.then(function (dataUri) { return dataUri });
if (callback) {
savePromise.then(callback, callback);
}
};