drawDOM huge piece of html

2 posts, 0 answers
  1. Daryl Shenner
    Daryl Shenner avatar
    47 posts
    Member since:
    Dec 2009

    Posted 29 Dec 2016 Link to this post

    I have a requirement where it's necessary print a piece html as PDF, everything goes well when the html is not so large, but when the size is bigger, more elements to get rendered the performance suffers, the window keeps unresponsive for some time span, that's a real problem because some browsers as IE11+ crashes when the main thread is blocked for several time, the same for FireFox, Is there any way to avoid the main thread get locked?

    Here the code

    01.//Here the main thread is blocked in certain time span although it is supposed to be a async promise
    02.kendo.drawing.drawDOM($(selector), {
    03.  paperSize: "A4",
    04.  margin: "1cm",
    05.  multiPage: true,
    06.})
    07..then(function (group) {
    08.   return kendo.drawing.exportPDF(group);
    09.}).done(function (data) {
    10.     kendo.saveAs({
    11.      dataURI: data,
    12.      fileName: "file.pdf",
    13.      proxyURL: "/ExportToPDF"
    14.     });                        
    15. })
  2. Stefan
    Admin
    Stefan avatar
    527 posts

    Posted 02 Jan Link to this post

    Hello Daryl,

    This is not a known issue and it was not observed in our testing scenarios.

    Could you please provide a runnable example, so we can inspect it and check if there are optimisations which can be made?

    Also, what is the size of the PDF file when exported from Chrome(assuming that it is not crashing on Chrome)? This will help us determine how big is the HTML which has to be exported.

    I will be expecting the additional information to continue the investigation.

    Thank you in advance.

    Regards,
    Stefan
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top