Background image in PDF

Hi,

Currently i’m working on a new print format for our quotes.
We would like to have an background image on every PDF page generated.
I’ve managed to fix this for the preview version, by setting a background on thte .print-format class.
But this is not showing up on the PDF.

Is their onther any way of setting a background image in the PDF files?

Best Regards

A hack can be adding a letterhead image with absolute positioning.

<img src="/files/anand.png" style="position: absolute; left: 45%; top: 50%; opacity: 0.1">

Thanks,
Anand.

4 Likes

Hi Anand,

How can I make this image appear on every PDF page?

You can set the letterhead as the default and it should appear in every pdf.

Hi Anand,

Thank you, what do we need to add to our print format to show the Letter Head?
And how can we get this head on every page in the generated PDF files?

This is one of our last issues with Frappecloud and we’re hoping to get an subscription in the next few days.
Best Regards,

Hi,

When printing, make sure you check “Letterhead” in the print view

We’re still not able to add a background image on every PDF page (in case of a multi paged PDF) generated by ERPNext.
How can we manage this the best way?

Any help would be appriciated.

1 Like

hi, have you found any solution?

Hi,

I tried your method, but the image will be on top of the text, how to position the image to be at the back so text will visible.

Thanks

please have a look at z-index https://www.w3schools.com/cssref/pr_pos_z-index.asp

Yes, that was the first thing i add on the inline css.

but still on pdf the logo all above the text.

hi,
need to bring this topic up, yes after two years.

I am fighting with the same issues z-index is not working with PDF printing.

anyone has a sollution to this?

br
Andreas

I second this request, did anyone find a solution for this ?

Having the same issue and its 2022 now, do anyone have a solution?