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

Dynamic table header in pdf on page break

Hi All,


 I am working on a pdf ,In the pdf  the table has a lot of records so it is creating more then 10 page .I need the table header in each page .also in the last page I don't need the header .Can any one suggest me some solution for this .








try in the CSS file:

@page {
    size: A4;
       content : element(header);

    position : running(header);

In the VF page:
<div class="header">
    <!-- Any data here will apear in each page

for the last page I think you can define in the CSS:

@page:last {
    size: A4;
    margin: 45mm 4mm 15mm 4mm;

This way the header won't apply for the first page


Hi ,


Thanks for quick responce ,I have one doubt can i use @page:last  ,I have already used @Page:First it is working for the first page but @Page:last is not  working can u suggest me for this.Whether @Page:last is ther or not.


You're right.

There is no @page:last. Sorry for the wrong information.






Can u have any other solution that how can i avoid the header from the last page ?