Set different margin top in pages in grid pdf export

1 Answer 250 Views
Grid
Marina
Top achievements
Rank 1
Iron
Marina asked on 28 Jul 2022, 10:47 AM

Hello,

I would like to ask how I could set different margin top in pages in grid pdf export.

I have a header which I need to be display only in the first page.  But this leaves a lot of big blank in other pages,

this is what I have try so far in the page template script


#if(pageNum > 1)
           {#
                     
                document.getElementByClassName("k-pdf-export k-grid").style.marginTop = "3cm";
                    
           #}#
thank you in advance

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Aleksandar
Telerik team
answered on 02 Aug 2022, 05:56 AM

Hello Marina,

The margins passed to the pdf configuration are set globally, for the entire document. When using conditional logic in the template you can render different content for the pages, for example, but changing the set margin is still not supported. We already have logged a feature request for this functionality in the Kendo UI Feedback Portal and I will urge you to vote on it. The most popular ideas get pushed forward for implementation:

https://feedback.telerik.com/kendo-jquery-ui/1365058-set-a-different-margin-for-every-page-pdf-export

Regards,
Aleksandar
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Grid
Asked by
Marina
Top achievements
Rank 1
Iron
Answers by
Aleksandar
Telerik team
Share this question
or