Auto-repeat table headers with HTML to PDF converter using Blink binaries

Hi,

I'm using the HTML to PDF converter with the Blink engine (which I find is the only one that properly respects CSS standards), however this appears to be missing the facility to trigger an auto-repeat of table headings when an automatic page break is inserted. The facility seems to be there for Webkit.

Is there any way - using Blink binaries - to do this (e.g. hook into an event that is triggered by a page boundary during conversion) ?

Thanks,

Charles

3 Replies 1 reply marked as answer

GK Gowthamraj Kumar Syncfusion Team September 11, 2020 12:58 PM UTC

Hi Charles, 

Thank you for using Syncfusion products.   
  
Blink rendering engine internally using a chrome headless browser for converting HTML to PDF. It will preserve the PDF document like how the input HTML/URL is displayed in chromium-based web browsers. It supports all the new standards of CSS styles. However, we can add the repeat header/footer support to the HTML table by setting the media type as “Print” in our blink converter settings. Kindly please try the Blink conversion with print media type for enabling repeat table header support.        
   
      
settings.MediaType = MediaType.Print;   
   
Kindly please share with us more details about your exact requirement from Blink to check in our end. So, that it will be helpful for us to analyze and assist you further on this.   

Regards, 
Gowthamraj K 


Marked as answer

SS Shivam Singhal February 3, 2025 09:03 AM UTC

Hi @Gowthamraj Kumar


I am using this setting and it work perfectly fine for the header with smaller height but It fails as the height of the header increase it Stop printing the header from the next page how I fix this issue



AM Arumugam Muppidathi Syncfusion Team February 3, 2025 12:27 PM UTC

Hi Shivam,


Thank you for getting back to us.


We have checked the reported issue on our end. Upon further analysis, Our HTML converter uses the Blink rendering engine, which in turn utilizes the Chromium executable in headless mode for converting HTML to PDF. This conversion process preserves the PDF document layout as it appears in Chromium-based web browsers (such as the Chrome print preview).  We recommend checking your input HTML in the Chrome print preview to ensure that the layout is rendered correctly before conversion.  Please refer to the screenshot below for reference


undefined

 


Additionally, we created a sample input HTML file with a long table header and used the MediaType property in BlinkConverterSettings to ensure the table header is repeated on all pages in the HTML to PDF conversion. Unfortunately, the reported issue was not reproduced, and the conversion worked as expected. The table header was preserved across all pages in the output document.

Please find the sample and it’s corresponding output document attached for your reference

We kindly request that you try the sample on your end and let us know the results. If you continue to face issues, please share the modified sample, complete code snippet, input HTML document, Syncfusion package name and version, and the .NET version you are using. This information will help us analyze the issue more effectively and provide a prompt solution.


Regards,
Arumugam M


Attachment: HTMLtoPDFSample_4d62a70d.zip

Loader.
Up arrow icon