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 1.3k Views 3 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.
  • BlasterB Offline
    BlasterB Offline
    Blaster
    wrote on 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
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on 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
      • mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on 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.

        BlasterB 1 Reply Last reply
        3
        • mrjjM mrjj

          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.

          BlasterB Offline
          BlasterB Offline
          Blaster
          wrote on 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.HilkJ 1 Reply Last reply
          0
          • BlasterB Blaster

            @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.HilkJ Online
            J.HilkJ Online
            J.Hilk
            Moderators
            wrote on 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.

            BlasterB 1 Reply Last reply
            0
            • J.HilkJ J.Hilk

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

              BlasterB Offline
              BlasterB Offline
              Blaster
              wrote on 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
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on 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

                BlasterB 1 Reply Last reply
                0
                • SGaistS SGaist

                  They are available on your system already.

                  BlasterB Offline
                  BlasterB Offline
                  Blaster
                  wrote on last edited by
                  #8

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

                  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