Kendo Grid PDF export duplicates current page instead of exporting all pages

1 Answer 9 Views
Grid
Mo
Top achievements
Rank 1
Mo asked on 04 Aug 2025, 07:01 PM

Hi,

I'm using ASP.NET MVC  with Kendo UI v. 2024.2.514 and I'm running into a weird issue when exporting a grid to PDF.

When I trigger the export, the PDF output shows only the current page of the grid duplicated X number of times.

For example, if I'm on page 2 of a 10-page grid, instead of exporting all ten pages, the PDF contains page 2 repeated 10 times.

I'm enabling the PDF export like this:

.ToolBar(tools => tools.Pdf())
.Pdf(pdf => pdf.AllPages())

Has anyone run into this issue or have any suggestions on what I'm missing here?

Thanks!

1 Answer, 1 is accepted

Sort by
1
Accepted
Mihaela
Telerik team
answered on 07 Aug 2025, 02:25 PM

Hello Mo,

The issue you are experiencing is caused by a regression bug introduced in version 2024.2.514:

https://github.com/telerik/kendo-ui-core/issues/7829

The bug has been fixed in the next version 2024.3.806.

If you prefer to continue using version 2024.2.514, implement the following workaround:

@(Html.Kendo().Grid<TOrderViewModel>()
            .Name("grid")
            .ToolBar(tools => tools.Pdf())
            .Pdf(pdf => pdf.AllPages())
            .Events(ev => ev.PdfExport("onPdfExport"))
            ...
)

<script>
    function onPdfExport(e) {
        e.sender.wrapperClone.addClass('k-clone'); // add class "k-clone" to Grid's wrapperClone element:
    }
</script>

<style>
    .k-pdf-export .k-clone,
    .k-pdf-export .k-loader-container {
        display: none; /* Hide the "wrapperClone" and the loader container element in the exported PDF */
    }
</style>

If you have any additional questions, please let me know.

Regards,
Mihaela
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Mo
Top achievements
Rank 1
commented on 07 Aug 2025, 07:34 PM

That worked, thank you very much!
Tags
Grid
Asked by
Mo
Top achievements
Rank 1
Answers by
Mihaela
Telerik team
Share this question
or