mpdf / mpdf.github.io

mPDF documentation
https://mpdf.github.io
Other
508 stars 160 forks source link

template not repeated on page break #193

Closed imajim closed 1 year ago

imajim commented 1 year ago

Hello, I set a template with :

$pagecount = $mPDF->SetSourceFile($pathPdfs . 'APEM-BDC-autoconso-vierge.pdf');
            $tplId = $mPDF->ImportPage(1);
            $mPDF->UseTemplate($tplId);

i have a loop in twig :

 {% for photo in photos %}
            <img src="{{ asset(photos_dir~dossier.numeroDossier~'/'~photo.filename) }}" class="float-start" style="max-width: 160mm; height: auto; max-height: 120mm; width: auto">
        {% endfor %}

but the template is not repeated when the page break automatically , the background on page 2,3,4.. is blank. any ideas ?

Thanks ^^