PDF background image full

What is the trick to get a full background image on the PDF?

What I am trying the image is showing half or is repeating.
I just want to stretch it over the page.

I tried:
Edit the custom css
Edit template css
body {
position: relative;
width: 21cm;
height: 29.7cm;
margin: 0 auto;
color: #3A3A3A;
background-image: url("…/img/logolarge.jpg");
background-size: 100% 100%;
background-repeat: no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
font-family: sans-serif;
font-size: 14px

Edit mpdf_helper.php
$mpdf->Image(‘logolarge.jpg’,0,0,210,297,‘jpg’,’’,true, false);

But nothing.
Can someone help pls.


Does no one has this problem??

In your “invoice_template.php” add this line after /head:

<body style="background-image: url('<?php echo base_url(); ?>assets/model.JPG');">

I’ve have made a background in JPG format, and it’s on folder “assets”.



That is not working.
Only half

You must resize the image.

HI. U saying u must resize the picture. But i do not understand why. Is there is a size using CSS ?

I do have the same issue and error saying : Message: Error parsing image file - image type not recognised

Im using the version 1.5.5

I use a slightly different approach, by modifying the assets/core/css/custom-pdf.css file.

The image needs to be scaled to around 142% of A4. The image will by default tend to appear on one side of the page. To combat this, I use the following CSS:

background: url(A4bg.png) repeat right bottom fixed;

The background image file lives in the assets/core/css/ directory.