Sample Header Ad - 728x90

How to get supply levels of a printer via command line

5 votes
1 answer
816 views
I'm trying to get the supply levels of a printer via the command line. So far I was able to get some information with a lpoptions (marker-message property) command. The problem is that the status of it doesn't update automatically. No matter how many pages I print the result of this command doesn't change. At the same time, the standard UI (cmd+p) print utility of the macOS can get the proper information from the printer. I did a quick investigation and found out that it calls CUPS ReportLevels command. So my question is: is there a way to call that ReportLevels command manually if so, how it can be done? Or maybe there is another way to force that refresh? I would really appreciate any help, thanks in advance!
Asked by Szymon (51 rep)
Apr 20, 2022, 11:07 AM
Last activity: Jun 21, 2023, 12:59 PM