michaelrsweet / htmldoc

HTML Conversion Software
https://www.msweet.org/htmldoc
GNU General Public License v2.0
208 stars 47 forks source link

Background image not on certain pages #475

Closed BartVanderDonck closed 2 years ago

BartVanderDonck commented 2 years ago

Hello,

I'm using htmldoc to generate invoices in PDF. The invoice might be 1, 2, 3, ... pages and has the customer logo at the top and some info at the footer. The final page are the Sales Conditions and these shouldn't have logo nor footer. For this final page, I was hoping for a thing like:

<!-- MEDIA BACKGROUND NO -->

But it appears impossible to leave it out. I've both working with fixed header/footers and a background. Is there a way to achieve this ?

Thanks Bart

michaelrsweet commented 2 years ago

HTMLDOC currently doesn't support multiple background images. But have you looked at using header/footer images instead?

BartVanderDonck commented 2 years ago

Thanks, I understand. I don't know how many pages my invoice will hold. There might be 1, 10 or 100 products on it, each resulting in an additional price line.

It looks like the following should do the trick indeed:

  1. At the beginning of the output, as to print the logo on every page <!-- HEADER LEFT "logo" -->

  2. After everything has been outputted, take a new page without logo: <!-- NEW PAGE --> <!-- HEADER LEFT "" -->

Bart