function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SFDCChennaiSFDCChennai 

Table Header in each page in PDF.

How to get the HTML table header in each page in PDF? I've tried with thead {display:table-header-group; } into CSS which is not supporting in HTMLTOPDF.. Please help me out.
Best Answer chosen by Admin (Salesforce Developers) 
Melvin_DeveloperMelvin_Developer

If you are trying to get the header to showup on every page, if the table over flows onto another page, you could try the following css:
-fs-table-paginate: paginate;


if you add the above to the table style, this should solve the issue!

Hope this helps,
                            Melvin!

All Answers

Melvin_DeveloperMelvin_Developer

If you are trying to get the header to showup on every page, if the table over flows onto another page, you could try the following css:
-fs-table-paginate: paginate;


if you add the above to the table style, this should solve the issue!

Hope this helps,
                            Melvin!

This was selected as the best answer
lamayclamayc
You are my new best friend!!!
Rodrigo Sakakibara (P)Rodrigo Sakakibara (P)

 Wow!!!. This line was the final tuning of my visualforce page! Thanks!!!!

 

Rodrigo Sakakibara

pravin joshi 25pravin joshi 25
<apex:pageblocktable value="{!qitem}" var="q2" border="1" cellpadding="5" >
                    <apex:column >
                        <apex:facet name="header">PO</apex:facet>
                        {!q2.Sr_No__c}
                    </apex:column>
                    <apex:column >
                        <apex:facet name="header">Product Code</apex:facet>
                        {!q2.Product2.ProductCode}
                    </apex:column>
                    <apex:column >
                        <apex:facet name="header">Delivery Time</apex:facet>
                        {!q2.Delivery_Time__c}
                    </apex:column>
                </apex:pageblocktable> 

I am also suffering from same problem. how to solve it? where to put this line??
Oleh MykytynOleh Mykytyn
Thanks, Melvin! This line helped me.