How to determine that a div should occupy the entire space of an A4 sheet in PDF by CSS?

1

How to determine that a div should occupy the entire space of an A4 sheet in PDF by CSS?

To generate the pdf I use PHP.

for example

<div class="page">
   // conteúdo da div
</div>

I would like that whenever I had a div with the page class it would occupy the whole page. Can anyone tell me how I determine this in CSS?

    
asked by anonymous 13.05.2016 / 19:24

1 answer

1

I was able to resolve by css as follows:

    @page {
        size: A4;
        margin: 0;
    }

    .page {
        width: 21cm;
        height: 22cm;
        padding: 2cm;
    }
    
13.05.2016 / 19:48