Click here to Skip to main content
11,922,534 members (32,077 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# printing USB
How can i get Total Pages Jammed,Model ,Black Supply(Available) ,serial number ,etc from usb connected printer to my c# app? I am trying to fetch these details by using Windows Spooler but i am not getting these details. Can anyone plz tell me how can i retrieve printer's details?
Posted 10-Aug-12 1:49am
Wes Aday 10-Aug-12 10:20am
"Windows Spooler but i am not getting these details "... of course not. I would be surprised if you were.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

The main problem with your question is I dont think we can answer it. Printers have some default settings that can be set via the .NET assembelies:[^]

Your printer my store additional properties not required by the default printer class, and if you are going to get these then you will have to look in the printer documentation for the individual product.
AlluvialDeposit 10-Aug-12 10:25am
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

There is no vendor-independent approach, especially for direct attached printers. As there is no standard and/or interface the driver must comply in this matter. Every vendor will use it's own dll-s, own methods to signal such conditions to the user (if at all).
For network printers the only not vendor-specific approach of monitoring them is using SNMP if the device supports it. Consult this article:[^]. And only network printers will have an embedded web server, that can be also used to retrieve this kind of information. But USB printers do not have this either.

Update: there is something you could follow. The PRINTER_INFO_2 structure contains a status field that is near of what you want. You need to call out to unmanaged api.
Read these:[^]
Changing printer settings using C#[^]
Printers and SafeHandles[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 453
1 Dave Kreskowiak 335
2 Sergey Alexandrovich Kryukov 263
3 Richard MacCutchan 225
4 ppolymorphe 175
0 OriginalGriff 7,231
1 KrunalRohit 4,530
2 Sergey Alexandrovich Kryukov 3,356
3 George Jonsson 2,865
4 Suvendu Shekhar Giri 2,216

Advertise | Privacy | Mobile
Web02 | 2.8.151120.1 | Last Updated 10 Aug 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100