What’s the easiest way to do this? I’ve done some research and came up with the
<div style="page-break-before:always"> </div>
to put in the CSS but I’m not sure how to do this. I’m using it to generate PDF’s and I’m looking for a way to start a new page without filling up empty space on a previous one.
Not sure if I understand your concern fully, but creating a page break like that is the way to go.
Let’s say you have some markup like:
Then this will cause the second div to appear on a new page. Whether the previous page gets filled or not is upto the contents of the first div (or previous markup until that point).
The only requirement is that second
divshould not be empty or hidden (this is why you at least need one whitespace character inside thediv). But if you have other content (and the content isvisible), you don’t have to worry about that either.Hope this makes sense.