We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Page break in table + repeat table header.



I have added page break style property for a table, but generated PDF has not any effect of these properties. 
With SelectPDF library, Generated PDF has proper page break and repeated table header.


 <style type='text/css'>
            table { page-break-inside:auto }
            tr    { page-break-inside:avoid; page-break-after:auto }
            thead { display: table-header-group }
            tfoot { display: table-footer-group }
            </style >

4 Replies

SA Saurin February 25, 2019 01:03 PM UTC

I am able to make table rows page break properly with these settings.

WebKitConverterSettings settings = new WebKitConverterSettings
            {
                //Set WebKit path
             //   WebKitPath = "QtBinariesWindows",
                Margin = new Syncfusion.Pdf.Graphics.PdfMargins { Top = 30, Left = 30, Right = 30, Bottom = 30 },
                SplitTextLines=false,
                SplitImages = false,
                EnableRepeatTableHeader = true,
                EnableRepeatTableFooter = true
            };


Thanks.


SK Surya Kumar Syncfusion Team February 26, 2019 09:55 AM UTC

Hi Saurin, 
  
Thanks for contacting Syncfusion support. 
  
We are glad to know that you have achievied your requirement. Please refer below links for more information about WebKit HTML converter. 
  
Please let us know if you need any further assistance on this. 
  
Regards, 
Surya Kumar 



SS Somdeb Sinha Ray July 9, 2019 10:54 AM UTC

only enablerepeattableheader =true does not repeat table header. Table data and table header written in .html file. anything else i have to do? Please help. 


PV Prakash Viswanathan Syncfusion Team July 10, 2019 10:42 AM UTC

Hi Somdeb, 

Thank you for contacting Syncfusion support.  

HTML to PDF converter internally make use of QtWebKit rendering engine for converting HTML to PDF. WebKit rendering engine will repeat the table header when the table has thead tag and the table gets paginated between the PDF pages. So, please make sure that the table has the thead tag for the table header and the table is paginated between the PDF pages.  
If still you are getting the same issue, kindly share us the input HTML file and code snippet to reproduce it from our end. It will be helpful for us to analyze and assist you further.  

Regards, 
Prakash V 


Loader.
Live Chat Icon For mobile
Up arrow icon