Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
5106 Widoki

I want to set a background image to the Quotation/Sales Order PDF report and I used:

<div class="page" style="background-image: url('/sale/static/img/backgroundpage.png'); background-size: 230mm 300mm;">

It works for all the pages, except for the last one. The background image doesn't fill the last page of the PDF report if the content of that page is shorter. It gets cut off at the height where the content ends. The rest of the page doesn't have a background. I've tried setting the height of the <div class="page"> to 100% but it doesn't change anything. Any thoughts?

Awatar
Odrzuć
Autor Najlepsza odpowiedź

For those who would like to know, I solved this problem by adding style="page-break-after: always;" to the last element of the page.

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
14
maj 22
46624
4
sty 25
44278
0
paź 24
1355
0
paź 24
5
1
maj 23
2878