This is a migrated thread and some comments may be shown as answers.

Export to PDF too Slow

7 Answers 375 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Brian
Top achievements
Rank 1
Brian asked on 24 Aug 2015, 10:15 AM
I am facing two different problems when pressing  the export to PDF button external to the Kendo Grid (We are using : kendo.web.min v2015.2.624  and pako_deflate.min 2015.2.624 to enable compression in the PDF - we are using local data)
1- The time it takes to export data to PDF is almost 10 times the excel export for the same set of data.
2- Firefox is giving the warning dialog box (attached) that the script is unresponsive.

thanks

7 Answers, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 25 Aug 2015, 07:53 AM

Hello Brian,

 

I have already answered the same question in the support thread that you opened, but I will copy my answer here as well:

 

I am afraid that the issue is not a known one, nor is reproducible in our online demos, so please extract a runnable sample in a Kendo UI Dojo and we will be happy to help.

 

As for the difference between the pdf and excel export generation - these two features are not related and cannot be compared performance wise.

 

 

Regards,
Kiril Nikolov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Creationator
Top achievements
Rank 1
answered on 02 Aug 2016, 07:01 PM
Hey @Kiril Nikolov the issue isnt reproducible because all the demo's you have dont export anything over 100 records if that. What about if I have 5,000 or 50,000 records(which are actual cases for me). 
0
Kiril Nikolov
Telerik team
answered on 03 Aug 2016, 05:33 AM
Hello,

Note that redrawing DOM objects in a PDF file is a big and heavy task. So the performance will depend on the browser and the actual user machine. If the delay comes with increasing the number of extracted records, then we can consider this as expected.

Regards,
Kiril Nikolov
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
0
Lee
Top achievements
Rank 1
Iron
Iron
Iron
answered on 04 Dec 2019, 07:31 PM
Do we have any progress on this since 2016? I am exporting 2 small divs, 1 gauge, 1 bar chart, 1 map, and 2 grids to a single pdf and it takes 30 seconds to generate. In the meantime it locks up the browser window. 
0
Alex Hajigeorgieva
Telerik team
answered on 06 Dec 2019, 11:46 AM

Hello, Lee,

I just tested exporting 1 gauge, 1 bar chart, 1 map, and 2 grids and it took about 0.6 seconds.

https://dojo.telerik.com/@bubblemaster/itIvuyES/2

I would suggest you check if the Pako Deflate library is included on the page as it really helps with compression:

https://docs.telerik.com/kendo-ui/intro/supporting/export-support

In addition to that, if there are images like Map tiles or grid templates you could see if these images are taking a  toll on the process and return images at the size that is being used on the page as opposed to larger images.

Let me know how I may assist you further.

Kind Regards,
Alex Hajigeorgieva
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Lee
Top achievements
Rank 1
Iron
Iron
Iron
answered on 06 Dec 2019, 02:28 PM
The bottleneck seems to be my grid with 760 rows. It takes about 26 seconds to generate alone using the grid's built in pdf generator. I do have the pako.min.js library at the top of the page. I inspected in developer tools and it is present and loaded. I'm not sure if I need to do something other than just include it but without it the pdf files failed to generate. My grid is setup like this: 

$("#impactTable").kendoGrid({
        dataSource: {
            data: data
        },
        excel: {
            fileName: "Impact Table.xlsx",
            filterable: true
        },
        pdf: {
            fileName: "Key Item Impact.pdf",
            paperSize: "Letter",
            landscape: true,
            scale: 0.7,
            margin: { top: "0.5in", left: "0.25in", right: "0.25in", bottom: "0.5in" },
            title: "Key Item Impact",
            multiPage: true,
            repeatHeaders: true,
            avoidLinks: true,
            template: $("#keyItemImpactPDFTemplate").html()
        },
        rowTemplate: kendo.template($("#keyItemRowTemplate").html()),
        columns: keyItemImpactColumns,
        sortable: true,
        toolbar: [
            { template: standardGridToolbar("keyItemImpact") }
        ],
        search: {
            fields: ["catName", "itemID", "itemName", "storeCount"]
        },
        dataBound: function (e) {
            $('#itemImpactTableSpinner').removeClass('show');
            $('#impactTable .dropdown-trigger').dropdown();
        }
    });
0
Lee
Top achievements
Rank 1
Iron
Iron
Iron
answered on 06 Dec 2019, 03:28 PM
Let's move further replies to page-locks-upon-export-to-pdf to keep from having the same discussion going on in two threads. 
Tags
Grid
Asked by
Brian
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Creationator
Top achievements
Rank 1
Lee
Top achievements
Rank 1
Iron
Iron
Iron
Alex Hajigeorgieva
Telerik team
Share this question
or