C# – Windows API for detecting out of paper on specific printer tray


I'm looking for a way to determine if a specific tray on a given printer in Windows is out of paper. Currenly I'm using the WMI Win32_Printer object to get the status of the entire printer, and if one of the trays is out of paper I do get a status that tells me the entire printer is out of paper.

But I'd like to know if a specific tray is out of paper. Copious Google searches have come up with nothing.

I'm writing the app in c# but pointers to examples in any language would do.

Thanks, in advance..

Best Solution

That is because they are usually hardware specific interfaces. If you use one hardware vendor like HP or Dell then you can probably find a way to figure this out. But the Windows interface seems to only allow notification of the printer being totally out of paper.

Related Question