Reputation: 21222
I have 4 divs that I want to print each one on a separate page. Is this possible if so how?
Upvotes: 2
Views: 308
Reputation: 532665
Add a print stylesheet, if you don't already have one. Set media="print"
when including that stylesheet. Among other things, add a class with the page break settings, such as:
.break-after
{
page-break-after: always;
}
Then apply that style wherever you need a page break forced.
<div id="div1" class="break-after"></div>
<div id="div2" class="break-after"></div>
<div id="div3" class="break-after"></div>
<div id="div4" class="break-after"></div>
Upvotes: 3
Reputation: 94834
Use the CSS page-break-before:always
on each DIV. See the documentation for more info.
Upvotes: 3