Results 1 to 2 of 2

Thread: How to add page break when printe a webview to PDF format

  1. #1
    Join Date
    Dec 2008
    Posts
    68

    Default 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!

    Last edited by richardander; 18th December 2009 at 00:47.

  2. #2
    Join Date
    May 2009
    Location
    Gorontalo
    Posts
    200
    Thanks
    20
    Thanked 5 Times in 5 Posts
    Qt products
    Platforms
    Unix/X11 Windows

    Question 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.

  3. The following user says thank you to wirasto for this useful post:

    Nero (22nd September 2010)

Similar Threads

  1. Some very weird compilation warnings
    By MarkoSan in forum Qt Programming
    Replies: 21
    Last Post: 23rd January 2008, 16:48

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.