This topic is locked

Customize Image in PDF

7/21/2021 11:45:07 AM
PHPRunner General questions
J
JeffDeveloper author

Good Day

I don't know if anyone has found a solution to this.

I know that in the "Print" page, you can add the background image. The thing is, this image goes to every single page of the PDF.

So therefore, I have to add as an image to the print page, this will then only show on the first page. This is where I am getting confused. I am trying to put that image to the background and fix its position. So I used Custom CSS on that image, but it's not working and I don't know what I'm doing wrong here.
This is what I tried, I'm probably using the wrong class or something.

img {
position: absolute;
top: 80px;
right: 0;
}

HJB 7/26/2021
body {
height:100%;
background:transparent url("/images/some_image.jpg") no-repeat center center fixed;
background-size:cover;
}

Give above CSS code a try under PRINT page

J
JeffDeveloper author 8/6/2021

Thanks HJB. I tried the code, didn't work. But I did send a formal ticket through and apparently it is a little more complicated which requires coding hours so I will be budgeting for that.

HJB 8/6/2021

Example 18. How to set an image as the page background.

Suggested code was taken from the manual, so it sounds strange,
it doesn't work at your end for some unknown reasons.

quote excerpt ex above URL content
Note: in some cases your CSS will not be applied to the output. In this case you need
to use !important rule to make sure your CSS code overrides the default CSS.
unquote

Maybe, you should give the !important rule a further try ...