[PyQt] QtWebKit to PDF rendering

David Boddie david at boddie.org.uk
Fri Sep 25 21:48:22 BST 2009

On Wed Sep 23 19:21:31 BST 2009, Sundance wrote:

> ... Also, might be a stupid question, but what happens if you use
> QWebFrame.print() instead of .render()?

This should produce something more acceptable for printing, though what you
get depends on the style sheet.

I couldn't say if there are clipping issues with this approach, but one
problem that can occur is that titles may become separated from the
paragraphs that immediately follow them. There may be a way to write the
style sheet or HTML to prevent this - it would require a bit of
experimentation to find out.


More information about the PyQt mailing list