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. can't get small size file when painter.setResolution to small number

can't get small size file when painter.setResolution to small number

Scheduled Pinned Locked Moved Unsolved General and Desktop
painter
3 Posts 2 Posters 278 Views
  • 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.
  • T Offline
    T Offline
    tigerlfj
    wrote on 23 Jul 2022, 13:02 last edited by
    #1

    no effect , change the resolution when print out file.
    i want to get small file size , so i change resolution when print out as below

    QPainter painter;
    painter.setResolution(100);
    

    my printer support the highest dpi is 600 ( pdf printer).
    but i set painter.setResolution(100); 200 300 600 , all the file is same.
    how can i get small size file ?

    1 Reply Last reply
    0
    • C Offline
      C Offline
      ChrisW67
      wrote on 24 Jul 2022, 02:13 last edited by
      #2

      How are you producing the PDF? If you are sending to a virtual printer that produces PDF files then you need to ask that driver to do something different.

      If you are using QPdfWriter to create the PDF then tell us what happens when you use QPdfWriter::setResolution()

      T 1 Reply Last reply 24 Jul 2022, 13:31
      0
      • C ChrisW67
        24 Jul 2022, 02:13

        How are you producing the PDF? If you are sending to a virtual printer that produces PDF files then you need to ask that driver to do something different.

        If you are using QPdfWriter to create the PDF then tell us what happens when you use QPdfWriter::setResolution()

        T Offline
        T Offline
        tigerlfj
        wrote on 24 Jul 2022, 13:31 last edited by
        #3

        @ChrisW67 Yes, i use QPrinter sending to a virtual PDF printer,but no effect.
        I will have a try by QPdfWriter::setResolution.

        1 Reply Last reply
        0

        1/3

        23 Jul 2022, 13:02

        • Login

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