FlorisdG
FlorisdG

Reputation: 774

MPDF - different background for first page

I am using MPDF to generate PDF-files out of HTML code. Unfortunately, the layout for the first page is different from the rest of the pages.

Is there any way to give the first page a different background from the rest? And how about layout, is there any way to set the header and footer on a different place or remove the whole header from the second till last page?

Upvotes: 1

Views: 3956

Answers (1)

gaabora
gaabora

Reputation: 332

<style>
@page :first {
    background: url("http://example.com/first.svg") 50% 0 repeat;
}
@page {
    background: url("http://example.com/page.svg") 50% 0 repeat;
}
...
</style>

Upvotes: 7

Related Questions