mPDF - Generate PDF with cover and contents

1

I need to generate a PDF with cover, back cover and content. I am searching the database for the name of the backgrounds and contents. So far so good.

I've done the following:

First I searched for 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);

In 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, okay, it works fine ... Generate the PDF with the background cover. Now, I need to add the back cover and the content 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 instead of using the body, then use DIVS to print these contents?

    
asked by anonymous 16.09.2016 / 17:16

0 answers