Exporting to PDF

Is it possible to repeat the Grid Column Headers on each page but not repeat the header.

I have created a header that has the report Title and I only want it on the first page but I would like to repeat the column headers on every page.


Thanks


5 Replies

RS Renjith Singh Rajendran Syncfusion Team March 16, 2022 04:09 PM UTC

Hi David, 
 
Greetings from Syncfusion support. 
 
We are checking the reported scenario from our side. We will update you further details within two business days.  
 
Until then we appreciate your patience. 
 
Regards, 
Renjith R 



RS Renjith Singh Rajendran Syncfusion Team March 17, 2022 02:38 PM UTC

Hi David, 
 
We have inbuilt support to repeat the headers(both pdf header and gridcolumn header) in all the pdf pages by enabling the IsRepeatHeader property. Please refer the below documentation for more details, 
 
And we would like to inform you that, enabling IsRepeatHeader will repeat both pdf and gridcolumn headers in all pages. It is not possible to repeat only the gridcolumn header alone in all pdf pages. This is the default behavior of repeat headers in our PdfLibrary. Please get back to us if you need further assistance. 
 
Regards, 
Renjith R 



DA david March 17, 2022 07:11 PM UTC

Is this a feature that maybe added in the future, as it is a waste of paper repeating the report Title and Criteria on each page for my customer.



MS Monisha Saravanan Syncfusion Team March 18, 2022 01:16 PM UTC

Hi David, 

Currently we are validating your requirement at our end and we will update further details within two business days on or before(22.03.2022). until then we appreciate your patience. 

Regards, 
Monisha 



RS Renjith Singh Rajendran Syncfusion Team March 22, 2022 11:54 AM UTC

Hi David, 

As explained in our previous update, we do not have direct support to add PDF page header for selective pages. So based on your requirement we suggest you to do a custom way of exporting using PdfLibrary instead of using Grid’s inbuilt PdfExport method. 
 
With this approach, we can access page graphics and draw header content as PdfTemplate. We suggest you to refer to the below kb for more details regarding this approach of adding page header into only the first page of the PDF. 
 
We have also prepared a sample by using the above approach with Grid’s data exporting. Please download and refer the sample from the link below, 
 
 
public async Task ToolbarClickHandler(Syncfusion.Blazor.Navigations.ClickEventArgs args) 
    { 
        if (args.Item.Id == "Grid_pdfexport") //Id is combination of Grid's ID and itemname 
        { 
            //instaed of calling inbuilt Grid’s PdfExport method, customize and generate pdf using Pdf library. 
            PdfDocument doc = new PdfDocument(); 
            ... 
            ... 
       } 
    } 
 
 
 
Please get back to us if you need further assistance. 
 
Regards, 
Renjith R 


Loader.
Up arrow icon