I want to generate a PDF with DOMPDF tool in CodeIgniter.
I have an image and I want to display it in a background full DIN A4 PDF page, when I try to do this:
body{
background-image: url('http://blogs.ucl.ac.uk/quantum/files/2013/12/artwork-fullsize.jpg'); background-position: bottom right; background-repeat: no-repeat;
background-size: 100%;
width:100%;
height:100%;
padding: 0px;
margin: 0px;
}
I have a PDF but it appear a margin (or padding). I want without margin or padding, just a full 100% image background.
Thank you,
dompdf does not yet support the
background-size
declaration. The easiest work-around is to absolutely position an image and set the dimensions to those of the page (percent calculations still appear to be a bit off). You have to take into account the page margins, so you should set those as well.I also stumbled upon your problem long time ago. This what i did to make the page no margins.