473,395 Members | 1,941 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 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 7092
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: rbt | last post by:
Hello there, Depending on the firmware version of the HP printer and the model type, one will encounter a myriad of combinations of the following strings while reading the index page: hp HP...
7
by: Jim Warner | last post by:
I am having problems using Borland 5.02 C/C++ for testing printer status repeatly. I wish to use my printer to detect off-line, removing paper, and so on with my software. I have tried using...
0
by: Gordon Truslove | last post by:
I've been trying to get the printer status using GetPrinter and Printer_Info_2 I'm getting closer, but it still fails. Error 122 - The data area passed to a system call is too small. ...
3
by: Gordon Truslove | last post by:
I've been trying to get the printer status using GetPrinter and Printer_Info_2 I'm getting closer, but it still fails. Error 122 - The data area passed to a system call is too small....
0
by: cortukmehmet | last post by:
I wrote this code to check the status of printer.But it says "Unknown" as printer. /////////////////////////////////////////////////////////////////////////////...
1
by: Vanessa | last post by:
Hi, I'm trying to select a printer in the system printers collection. I'm able to do this. However, if the printer is a network printer and happens that this printer is not on or not ready, I...
6
by: Pipo | last post by:
Hi, Does anyone know how I can read out the printer status? I want to sent a bulk of documents to the printer (or 1 by 1) but if something goes wrong e.g. out of paper, cartridge empty, tray...
2
by: TARUN | last post by:
Hello all, Please help and suggest the code to get the printer status over the network. for Example, i have an string "\\\\os1\\PtName" where os1 is the system name and PtName is the printer...
9
by: id10t error | last post by:
Hello, I am going to be using a Symbol WT4090 to scan items. I need to printer a tag from the Zebra ql320 plus. I am trying to do this is Visual basic 2005. Does anyone know and good site to...
1
by: Steve | last post by:
Hi All I am using vb.net 2005 in a windows forms application I send data to the selected windows printer using a PrintDocument object Is there any way to detect if the Printer is not...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.