Results 1 to 4 of 4

Thread: Multipage Printing

  1. #1
    Join Date
    Jan 2006
    Location
    Como (Italy)
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Multipage Printing

    I need to print a table of data, I used a QTextEdit to layout a simple html table but I have a problem...
    How can I repeat the first row with the header data for each page that needs to be printed?

    *EDIT*
    I am using Qt-4.1
    Last edited by Ryo Saeba 83; 25th January 2006 at 11:41. Reason: Added needed Qt version

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    52
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Multipage Printing

    well haven't done so myself, but I would assume that when printing, you can get the device caps, meaning the height and width of the printing device - here a piece of paper (Letter/A4/...) so you would need to get the height of a line in pixel, then calculate how many lines would fit onto one page ...
    When the new page starts you can print out the header again, and then append the remaining lines until all have been rendered onto the printer device. Don't you not also get events when a page has been done and a new one starts? You should try looking in that direction. Look at: http://doc.trolltech.com/4.1/qprinter.html there you find a method called pageRect() which would be something you need...

  3. #3
    Join Date
    Jan 2006
    Posts
    75
    Thanks
    3
    Thanked 5 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Multipage Printing

    is there any open-source library that can handle this well which support utf-8?

    i know for java there is a 'jasper report' that can write xml tag to format a beautiful report printing which the developer no need to care about those 'header' or 'footer' drawing stuff himself

  4. #4
    Join Date
    Jan 2006
    Location
    Moscow, Russia
    Posts
    23
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Multipage Printing

    What about creating reports in RTF?

Similar Threads

  1. Printing txt file vs Printing pdf file
    By rmagro in forum Qt Programming
    Replies: 3
    Last Post: 9th July 2012, 16:45
  2. Printing header and footer with different data
    By sepeth in forum Qt Programming
    Replies: 1
    Last Post: 19th February 2009, 22:51
  3. Qt4 poor printing performance
    By seneca in forum Qt Programming
    Replies: 4
    Last Post: 22nd January 2009, 15:23
  4. Printing problem in windows
    By joseph in forum Qt Programming
    Replies: 6
    Last Post: 12th July 2007, 09:04
  5. Replies: 0
    Last Post: 28th June 2006, 21:49

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.