0

There are 3-4 charts in a Html page and i have a PDF download button on clicking the download button getting a pdf file in that we are unable to get the charts. we have used kendo drawing to download the Pdf

Below is the code that we have tried:

$scope.print = function(){
        kendo.drawing.drawDOM($("#page-Container")).then(function(group) {
            kendo.drawing.pdf.saveAs(group, "PdfDocumnet.pdf");
        });
}

Or Any Other Framework can be helpful??

1 Answers1

0

I had an issue kind of like this a while back. From what I remember something was crashing with no error and the promise was never getting called.

For a workaround, a colleague of mine came up with converting the chats to images first.

$scope.print = function(){
    kendo.drawing.drawDOM($("#page-Container")).then(function(group) {
       return kendo.drawing.exportImage(group);
    }).done(function (data) {
       // replace chart(s) with png version(s)
       $(".chat").replaceWith("<div class='.chart'><img src='" + date +"' /></div>");

       kendo.drawing.pdf.saveAs(data, "PdfDocumnet.pdf");
    });
}
Slow_5_0
  • 39
  • 4