Click here to Skip to main content
13,049,263 members (68,102 online)
Rate this:
Please Sign up or sign in to vote.
See more:
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 0: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
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 10 Aug 2012
Copyright © CodeProject, 1999-2017
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