Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QPrinter printing image won't scale on real printer
Qt 6.11 is out! See what's new in the release blog

QPrinter printing image won't scale on real printer

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 2.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by A Former User
    #1

    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.

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by mrjj
      #2

      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.

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved