You need to sign in to do that
Don't have an account?
JeffreyStevens
Visualforce Rendera PDF different footers for different pages
I have a VF page rendered as PDF, and I have always had one footer. Now I want two different footers.
I'm not sure how to code that.
Here is the CSS that I have for one footer...
And my VF code is
But on my first page - I want NO footer, other pages - I wan the current footer, and on my last page - I need the margin to be
margin: .25in .25in 1.25in .25in;
I've tried changing my CSS to be...
And while I did get my larger footer on my last page - I ALSO got my previous (smaller) footer with it's content also.
Any suggestions? Thanks
I'm not sure how to code that.
Here is the CSS that I have for one footer...
<style type="text/css" media="print"> @page { margin: .25in .25in 0in .25in; @top-left {content :element(header);} @bottom-left {content :element(footer);} } div.header {position: running(header); } div.footer {position: running(footer); } </style>
And my VF code is
<div class="footer" > Footer text, etc. </div>
But on my first page - I want NO footer, other pages - I wan the current footer, and on my last page - I need the margin to be
margin: .25in .25in 1.25in .25in;
I've tried changing my CSS to be...
<style type="text/css" media="print"> @page { margin: .25in .25in 0in .25in; @top-left {content :element(header);} @bottom-left {content :element(footer);} } div.header {position: running(header); } div.footer {position: running(footer); } div.footerLarge {@page {margin: .25in .25in 1.25in .25in}} </style>
And while I did get my larger footer on my last page - I ALSO got my previous (smaller) footer with it's content also.
Any suggestions? Thanks
So - how does the VF code know when it's on the last page? Do I have to code something different for the last footer?
so I added the @page:last{ margin: .25in .25in 1.25in .25in; .... to my CSS and I have
for my VF code - but it looks like the footer size doesn't change.
Here is a condensed set of that that is quick to paste in the a test VF page...
What do you think? Is it possible - it's a PDF rendering engine issue?