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
Alexander AtkinsonAlexander Atkinson 

Footer on the last page of document (Visual Force)

Hello i've made a visual force page. I have a footer containing general terms and conditions, but I only want it on the last page. My problem is the footer appears on every page right now.

Help would be appreciated, thanks!
<apex:page >
        
    <head>
        <style>
            .footer {
                position: fixed;
                left: 0;
                bottom: 0;
                width: 100%;
                text-align: center;
            }     

        </style>
    </head>

    <body>
        <img src="{!$Resource.Logo}" align="right" style="vertical-align: top;" width="25%"/>
        <div>
             Main content here
	</div>
        <div class="footer">
            <hr/>
                stuff here on bottom of last page
            </p>
        </div>
    </body>
</apex:page>

 
Raj VakatiRaj Vakati
You need to do it as libe below
 
footer.page:last {

    // add spacing element so it appears in center

    content: text;

}

Refer this link 

https://salesforce.stackexchange.com/questions/153315/facing-problem-adding-footer-in-the-last-page-vf-rendered-as-pdf
 
Alexander AtkinsonAlexander Atkinson
Could I get an example of using @page or where to put this code in my example please?