I have a specific document. Background first and last page is different from the other pages of the document.
According to the question answered here: Flying Saucer hide header and footer on first page
The first page I defined using the trick @page :first
:
@page{
background-image: url('... my regular background ...');
}
@page :first {
background-image: url('... first page background ... ');
}
How to change the background on the last page?
If you know in advance what will be displayed on the last page, you can use CSS3 named pages.
Here is a simple example: