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

Grid PDF export is stopping short

3 Answers 375 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Grant
Top achievements
Rank 3
Iron
Iron
Veteran
Grant asked on 22 May 2019, 12:47 PM

Hi, 

As my title says when i export my Grid to PDF, the export is stopping short, please look at the attachment, i dont know how to explain whats happening.

My config is as follows:

<script id="template-pdf-export" type="text/x-kendo-template" data-th-inline="text">
  <div class="pdf-export">
    <div class="header">
    <div style="float: right">Page #: pageNum # of #: totalPages #</div>
  </div>
  <div class="footer">
    Page #: pageNum # of #: totalPages #
    </div>
  </div>
</script>

 

And my PDF config in my grid is here:

pdf: {
    paperSize: "A4",    // Required so that template and scale are used
    landscape: true,
    margin: { top: "2cm", right: "1cm", bottom: "1cm", left: "1cm" },
    template: $("#template-pdf-export").html(),
    scale: 0.75  // Scale down the text size when printing to PDF
},

 

I have no clue, its like kendo lost interest in drawing the rest of the grid? :D

Please advise.

Thanks,
Grant

3 Answers, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 24 May 2019, 08:18 AM
Hi Grant,

I have tested the same in the following dojo, but the behavior does not replicate:


Could you please examine it and let me know what I am missing to reproduce the issue?


Regards,
Georgi
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
Grant
Top achievements
Rank 3
Iron
Iron
Veteran
answered on 05 Jun 2019, 12:36 PM

Hi Georgi, 

Sorry its taken so long to reply, this issue has been low on my priority list. I managed to duplicate it though. The cut-off occurs because I have a 'max-height' attribute imposed on my k-grid-content class.
Heres the example: https://dojo.telerik.com/IRInIYiP 

I tried to remove the style and add it using this (https://docs.telerik.com/kendo-ui/knowledge-base/grid-exclude-columns-from-exported-pdf#using-the-k-pdf-export-class-and-css) as an example, but have been unsuccessful.

Prehaps a fresh set of eyes can help?

Thanks,
GRant

0
Georgi
Telerik team
answered on 07 Jun 2019, 06:54 AM
Hi Grant,

You could simply override the max-hide in the exported document by adding similar to the following css rule:

.k-grid-content {
  max-height: 200px
}
 
 .k-pdf-export .k-grid-content{
    max-height: 1200px
 }

Below you will find a modified version of the provided sample:


Regards,
Georgi
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.
Tags
Grid
Asked by
Grant
Top achievements
Rank 3
Iron
Iron
Veteran
Answers by
Georgi
Telerik team
Grant
Top achievements
Rank 3
Iron
Iron
Veteran
Share this question
or