You can define additional layouts by name, and then tell xhtml2pdf to explicitly switch using the nexttemplate tag. I did this very recently so that there is no title on the first page, but to show it on all subsequent pages.
You should change your @page definition to two different pages, possibly like this:
<style type="text/css"> @page { margin: 1cm; margin-bottom: 2.5cm; @frame footer { -pdf-frame-content: footerFirst; -pdf-frame-border: 1; bottom: 2cm; margin-left: 1cm; margin-right: 1cm; height: 1cm; } } @page innerpages { margin: 1cm; margin-bottom: 2.5cm; @frame footer { -pdf-frame-content: footerOther; bottom: 2cm; margin-left: 1cm; margin-right: 1cm; height: 1cm; } } </style>
Then in your html, where you want to switch to another layout, use a tag like this:
<pdf:nexttemplate name="innerpages"/>
The next page (and subsequent pages, until you change the template again) will use the innerpages layout with your "other" footer.
source share