1
I need to generate a PDF with cover, back cover and content. I’m searching the database for the name of the backgrounds and content. So far, so good.
I did the following procedure:
First I searched all the data I needed and called the view:
$this->load->helper('mpdf');
$html_ag = $this->load->view('cliente/geracontrato_pdf_capa', $this->data, true);
On my view, I put:
if($dados_modelo_contrato[0]->arquivo_capa){
$capa = $dados_modelo_contrato[0]->arquivo_capa;
}
<style>
body {
background-image: url(<?php echo base_url("assets/uploads/contratos/uploads/arquivo_capa/".$capa); ?>);
background-repeat: no-repeat;
background-image-resolution:300dpi;background-image-resize:6;
}
</style>
So far, ok, it works right... Generates the PDF with the background cover. Now, I need to add the back cover and the contents below it, which would be:
<capa> imagem (pode ser em background ou src, porém, sem margens)
<contracapa> imagem (pode ser em background ou src, porém, sem margens)
<conteudo> - texto com background normal
How do I stop instead of using the body, then use DIVS to print these contents?