QPrinter printing image won't scale on real printer



  • I'm using QPrinter to print out image from my computer. When I use a virtual printer, it prints out perfectly with A4 size. But when I print it through actual printer, it shrink to the top left corner, with the whole thing estimate is only A6 size best. Anyone know a solution?

    I've been trying out adding settings like setFullPage, resolution, but nothing change.


  • Qt Champions 2017

    Hi
    Do you scale the image to the printer resolution ?

    http://doc.qt.io/qt-4.8/printing.html
    see the
    Printing Widgets

    Same idea with images as when printed in normal size they only take up tiny part of page.

    please see
    http://doc.qt.io/qt-5/qtwidgets-widgets-imageviewer-example.html
    It has a print image function. Not sure it scales but it worth a look.



  • Thanks, I'll give it a look. Currently, I scaled it by multiplied the numbers in the parameter by 2, so far, it hasn't show any sign of distortion. and prints out like it did in the virtual printer, which outputs a pdf file.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.