Hi, I am new in October CMS and I need help I am use version 3.7.5 of October and Renatio.DynamicPDF 7.1.2.
The background image is not displayed in the created pdf. The image is in the public folder. I have probably tried everything. Can anyone help me? THNX!
In controller:
PDF::loadTemplate(‘jch.wallet::pdf.qr_multi’, [‘number’ => $number,‘cislo’ => $cislo, ‘img’ => $imgPath])->setDpi(300)->setIsRemoteEnabled(true)->setIsPhpEnabled(true)
->save(storage_path(‘app/resources/pdf/qr-’.$wallet->id. ‘-’ . $cislo . ‘.pdf’));
In template:
<style type="text/css" media="screen">
html{
margin-left:0;
margin-right:0;
margin-top:121px;
}
.vizitka{
width:9cm;
height: 5cm;
display: inline-block;
background-image: url("{{ img }}");
background-size: cover;
position: relative;
}
.qr{
position: absolute;
top:2.4cm;
left: 6.35cm;
width:2.2cm;
height:2.2cm;
}
.vizitka:nth-of-type(odd) {
}
</style>
<div id="container"><div class="vizitka">
<img src="{{ number.getPath() }}" class="qr" />
</div>
....