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. Count printed pages by printer

Count printed pages by printer

Scheduled Pinned Locked Moved Unsolved General and Desktop
8 Posts 4 Posters 989 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.
  • B Offline
    B Offline
    Blaster
    wrote on 20 Nov 2018, 18:46 last edited by Blaster
    #1

    Hi. A friend asked me for software that would tell him the number of pages printed by his printer. I want to add a plus using this method for all printers connected to the computer. The problem is that I can not find a way to count the printed pages. Besides that, is there any way to differentiate between standard printing and photo printing?
    I think something like an access to the print spooler is needed to know the document that is being printed and the number of pages. But I also do not find how

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 20 Nov 2018, 20:31 last edited by
      #2

      Hi,

      That's something that is outside the scope of Qt. A quick search returns this for Windows which is outdated but you can follow up until the actual version of the API.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • M Offline
        M Offline
        mrjj
        Lifetime Qt Champion
        wrote on 20 Nov 2018, 20:35 last edited by
        #3

        Hi
        I assume you are on Windows...

        https://docs.microsoft.com/en-us/windows/desktop/printdocs/printing-and-print-spooler-functions
        and
        https://docs.microsoft.com/en-us/windows/desktop/printdocs/job-info-1

        allows you to enumerate jobs and get total pages.

        • is there any way to differentiate between standard printing and photo printing?

        I dont think so as that would be a pr. printer check. Besides what do you mean by photo printing ? On special paper or
        that is an image being printed ?
        So i think it would be hard to detect in all cases.

        B 1 Reply Last reply 20 Nov 2018, 20:45
        3
        • M mrjj
          20 Nov 2018, 20:35

          Hi
          I assume you are on Windows...

          https://docs.microsoft.com/en-us/windows/desktop/printdocs/printing-and-print-spooler-functions
          and
          https://docs.microsoft.com/en-us/windows/desktop/printdocs/job-info-1

          allows you to enumerate jobs and get total pages.

          • is there any way to differentiate between standard printing and photo printing?

          I dont think so as that would be a pr. printer check. Besides what do you mean by photo printing ? On special paper or
          that is an image being printed ?
          So i think it would be hard to detect in all cases.

          B Offline
          B Offline
          Blaster
          wrote on 20 Nov 2018, 20:45 last edited by
          #4

          @mrjj

          @mrjj said in Count printed pages by printer:

          Hi
          I assume you are on Windows...

          https://docs.microsoft.com/en-us/windows/desktop/printdocs/printing-and-print-spooler-functions
          and
          https://docs.microsoft.com/en-us/windows/desktop/printdocs/job-info-1

          allows you to enumerate jobs and get total pages.

          Thanks, but how do I use that in Qt?

          • is there any way to differentiate between standard printing and photo printing?

          I dont think so as that would be a pr. printer check. Besides what do you mean by photo printing ? On special paper or
          that is an image being printed ?
          So i think it would be hard to detect in all cases.

          It is very true what you say.

          J 1 Reply Last reply 20 Nov 2018, 20:48
          0
          • B Blaster
            20 Nov 2018, 20:45

            @mrjj

            @mrjj said in Count printed pages by printer:

            Hi
            I assume you are on Windows...

            https://docs.microsoft.com/en-us/windows/desktop/printdocs/printing-and-print-spooler-functions
            and
            https://docs.microsoft.com/en-us/windows/desktop/printdocs/job-info-1

            allows you to enumerate jobs and get total pages.

            Thanks, but how do I use that in Qt?

            • is there any way to differentiate between standard printing and photo printing?

            I dont think so as that would be a pr. printer check. Besides what do you mean by photo printing ? On special paper or
            that is an image being printed ?
            So i think it would be hard to detect in all cases.

            It is very true what you say.

            J Offline
            J Offline
            J.Hilk
            Moderators
            wrote on 20 Nov 2018, 20:48 last edited by
            #5

            @Blaster
            click on one of the links on that page, it shows you c++ syntax examples, requiered dlls and includes etc.


            Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


            Q: What's that?
            A: It's blue light.
            Q: What does it do?
            A: It turns blue.

            B 1 Reply Last reply 20 Nov 2018, 20:53
            0
            • J J.Hilk
              20 Nov 2018, 20:48

              @Blaster
              click on one of the links on that page, it shows you c++ syntax examples, requiered dlls and includes etc.

              B Offline
              B Offline
              Blaster
              wrote on 20 Nov 2018, 20:53 last edited by Blaster
              #6

              @J.Hilk said in Count printed pages by printer:

              @Blaster
              click on one of the links on that page, it shows you c++ syntax examples, requiered dlls and includes etc.

              Yes, that's happens, but where do I get the dlls?

              1 Reply Last reply
              0
              • S Offline
                S Offline
                SGaist
                Lifetime Qt Champion
                wrote on 20 Nov 2018, 21:00 last edited by
                #7

                They are available on your system already.

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                B 1 Reply Last reply 20 Nov 2018, 21:12
                0
                • S SGaist
                  20 Nov 2018, 21:00

                  They are available on your system already.

                  B Offline
                  B Offline
                  Blaster
                  wrote on 20 Nov 2018, 21:12 last edited by
                  #8

                  @SGaist my mistake, I will try a then tell you guys

                  1 Reply Last reply
                  0

                  8/8

                  20 Nov 2018, 21:12

                  • Login

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