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
Nitin SehgalNitin Sehgal 

Removing the footer from the last page only in the pdf

Hi All,

I am generating a pdf in which i have put footers on each page but i don't want to show the footer at the last page of the pdf.

We have @page:first which works on the first page but we don't have @page:last in css.

Is there anythink that can solve this problem?

Thanks in Advance
sam sammsam samm
Add a parameter for the last page and render the footer only when it is not equal to the parameter for the last page.
Nitin SehgalNitin Sehgal
Hi Sam Samm,

Thanks for the suggestion. Can you please give me any example for this?

I am using @Page rules to display footers.

Thanks
sam sammsam samm
Can you post code snippet if you can to make it clear
Nitin SehgalNitin Sehgal
I am using the below css to display footers on all pages:
@page {
        size: A4;
        margin: 1cm 1cm 2cm 1cm;
        @bottom-left {
              content: "My footer content in text";
        }
        @bottom-right {
              background: url(img/myImage.jpg) no-repeat;
              width:68px; height:60px;
        }
}

if we use
@page:first{
        //css
}

This will only apply to the first page. Do we have somthing which will work on the last page only?