471,594 Members | 2,240 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,594 software developers and data experts.

Printer Ink Status

Hi guys,

I'm working on a small desktop publishing software project where I need
to display the default printer's ink status/level in the status bar of
the main form. For the past 2 days I've been trying to find a way of
getting the printer ink level from the printer but I haven't been able
to find something that's generic. I looked at the:

* PJLMON.dll - PJL language commands for parrallel port or USB
printers. Got stuck on the implementation and usability :(

* OLEPRNLib ( http://blog.crowe.co.nz/archive/2005/08/08/182.aspx ) -
but its mainly via SNMP for network printers.

* WMI (System.Management namespace)? I'm not sure if this will tell the
current printer ink level.

Here's something interesting I read elsewhere, "IEEE 1284 compliant
devices connected to a parallel port or a USB port can transmit a
Device ID when asked to do so. The device ID of inkjet printers often
contains the level of ink available." Now how do I get this Device ID
and what's the format/syntax to be parsed to fetch the ink level?

The closest I could find is the libinklevel library (
http://libinklevel.sourceforge.net ), but its for Linux.

Do you guys have any suggestions or ideas on how I can accomplish this
"simple" task :) Thanks!

Nov 3 '06 #1
2 6694
On 3 Nov 2006 00:01:01 -0800, up*************@jetable.org wrote:
Hi guys,

I'm working on a small desktop publishing software project where I need
to display the default printer's ink status/level in the status bar of
the main form. For the past 2 days I've been trying to find a way of
getting the printer ink level from the printer but I haven't been able
to find something that's generic. I looked at the:

* PJLMON.dll - PJL language commands for parrallel port or USB
printers. Got stuck on the implementation and usability :(

* OLEPRNLib ( http://blog.crowe.co.nz/archive/2005/08/08/182.aspx ) -
but its mainly via SNMP for network printers.

* WMI (System.Management namespace)? I'm not sure if this will tell the
current printer ink level.

Here's something interesting I read elsewhere, "IEEE 1284 compliant
devices connected to a parallel port or a USB port can transmit a
Device ID when asked to do so. The device ID of inkjet printers often
contains the level of ink available." Now how do I get this Device ID
and what's the format/syntax to be parsed to fetch the ink level?

The closest I could find is the libinklevel library (
http://libinklevel.sourceforge.net ), but its for Linux.

Do you guys have any suggestions or ideas on how I can accomplish this
"simple" task :) Thanks!
I doubt there's anything universal or generic. It will depend on what the
printer vendor will make available. There are win32_Printer and
win32_printerconfiguration WMI classes, but they don't provide any ink
information. I can get that information for my HP PSC2100 through HP
software, but I don't know if that information is available through a COM
object or anywhere else. It might be worth a chat with the vendor to see
if they provide access to that information through an automation object.

--
Jeffery Hicks - www.ScriptingAnswers.com
SAPIEN Technologies - Scripting, Simplified. www.SAPIEN.com
Scripting books: www.SAPIENPress.com
Nov 3 '06 #2
In this case I do think approach your printer vendors such as HP or Canon
will be faster.

chanmm

<up*************@jetable.orgwrote in message
news:11**********************@b28g2000cwb.googlegr oups.com...
Hi guys,

I'm working on a small desktop publishing software project where I need
to display the default printer's ink status/level in the status bar of
the main form. For the past 2 days I've been trying to find a way of
getting the printer ink level from the printer but I haven't been able
to find something that's generic. I looked at the:

* PJLMON.dll - PJL language commands for parrallel port or USB
printers. Got stuck on the implementation and usability :(

* OLEPRNLib ( http://blog.crowe.co.nz/archive/2005/08/08/182.aspx ) -
but its mainly via SNMP for network printers.

* WMI (System.Management namespace)? I'm not sure if this will tell the
current printer ink level.

Here's something interesting I read elsewhere, "IEEE 1284 compliant
devices connected to a parallel port or a USB port can transmit a
Device ID when asked to do so. The device ID of inkjet printers often
contains the level of ink available." Now how do I get this Device ID
and what's the format/syntax to be parsed to fetch the ink level?

The closest I could find is the libinklevel library (
http://libinklevel.sourceforge.net ), but its for Linux.

Do you guys have any suggestions or ideas on how I can accomplish this
"simple" task :) Thanks!

Nov 3 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by rbt | last post: by
reply views Thread by Gordon Truslove | last post: by
3 posts views Thread by Gordon Truslove | last post: by
reply views Thread by cortukmehmet | last post: by
1 post views Thread by Vanessa | last post: by
6 posts views Thread by Pipo | last post: by
2 posts views Thread by TARUN | last post: by
9 posts views Thread by id10t error | last post: by
reply views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by Anwar ali | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.