Forum How do I...?

How do I ... insert an empty page at the very top of the doc

ssoberni
Honourable Princes,

I got a markup, generated by the asciidoc html backend, of this kind:

<html>
<head>...</head>
<body class="article">
<div id="header">...</div>
<div id="content">...</div>
<div id="footer">...</div>
</body>
</html>

In the generated PDF, I would like to have an empty page as the first page. Is there a way of instructing prince to do so. I played with "page-break-before: always" for the header div, or using page-break-before on the @page :first instruction. Got nothing so far ...

I'd appreciate any hints!

Thx
//stefan
mikeday
Try "page-break-before: left", or right.
ssoberni
Thx, Mike!

That did the trick ... is there any explanation why the property value "always" does not work, do I misunderstand anything here? ... or does this fall into the same category as "browser XYZ does not support the property values foo, bar, baz", for whatever reasons ...

//stefan
mikeday
It's because "page-break-before: always" on an element means "make sure this element begins at the top of a page, inserting a page break if necessary". If the element is already at the top of the page for some reason, eg. if it is on the first page, then it is unnecessary to insert another page break. If you want to leave a blank page then you can add an empty block element before it and say "page-break-after: always", or use the left/right trick.