How to add page break when printe a webview to PDF format
Hello,
I use QWebView to display some information and use QPrinter to convert the content to PDF format.
It worked. But the difficulty I am facing is how to add page break when it print to PDF?
- Is there any Html tag to control the page break in print output ?
Appreciate if anyone can help!
:confused:
Re: How to add page break when printe a webview to PDF format
<STYLE TYPE="text/css">
P.breakhere {page-break-before: always}
</STYLE>
This then will be the activator for the page break:
<P CLASS="breakhere">
You can set up as many different classes as you'd like as long as you keep following the same format as above.