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. Font size in QPrinter

Font size in QPrinter

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 526 Views 2 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.
  • HoMaH Offline
    HoMaH Offline
    HoMa
    wrote on last edited by
    #1

    If I use drawContent to print QTextDocument into a QPrinter (or a QPrintPreview) I find, that the font size, which I set to 10pt in the html style, is apparently bigger than 10pt. I found no reason for this - do you have an idea?

    Regards
    Holger
    PS: You can see the effect with this sample code:
    https://github.com/Schachigel/QtLetter

    K 1 Reply Last reply
    0
    • HoMaH HoMa

      If I use drawContent to print QTextDocument into a QPrinter (or a QPrintPreview) I find, that the font size, which I set to 10pt in the html style, is apparently bigger than 10pt. I found no reason for this - do you have an idea?

      Regards
      Holger
      PS: You can see the effect with this sample code:
      https://github.com/Schachigel/QtLetter

      K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      @HoMa

      This might depend on your OS.

      From QPrinter documentation:
      When printing directly to a printer on Windows or macOS, QPrinter uses the built-in printer drivers. On X11, QPrinter uses the Common Unix Printing System (CUPS) to send PDF output to the printer. As an alternative, the printProgram() function can be used to specify the command or utility to use instead of the system default.

      Therefore you need to check with other tools if you see the same effect. Probably you will.

      Vote the answer(s) that helped you to solve your issue(s)

      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