where to add page-break related css in wkhtmltopdf?
<p><em>I am using wkhtmltopdf 0.12.3.2 on Windows.</em></p>

<p>I know there are a lot of questions and answers around this topic, but I still can't find an answer to my problem; I don't know where to put the according CSS - or the CSS doesn't work for some (other) reason:</p>

<p>for example i tried to put the page-break related CSS directly into my html file which i want to render. i tried to force page-breaks with <code>&lt;span class="break_here"&gt;&lt;/span&gt;</code> in my <code>&lt;body&gt;</code>:</p>

<pre><code>&lt;!-- ... --&gt;
&lt;head&gt;
    &lt;style&gt;
        span.break_here {
            page-break-after: always !important;
        }
    &lt;/style&gt;
&lt;/head&gt;
&lt;!-- ... --&gt;
</code></pre>

<p>this didn't do anything.</p>

<p>then i also tried to put it into <code>@media print{}</code> or <code>@media screen{}</code> which did not change anything either:</p>

<pre><code>&lt;style&gt;
    @media screen{
        span.break_here {
            page-break-after: always !important;
        }
    }
&lt;/style&gt;
</code></pre>

<p>thanks for any help!</p>

<p><strong>edit:</strong> there is even another possibility by adding the <code>--user-style-sheet</code> option for using an external stylesheet.</p>