Results 1 to 1 of 1
Thread: read printer queue
- 08-14-2009, 02:34 PM #1
Member
- Join Date
- Aug 2009
- Posts
- 1
- Rep Power
- 0
read printer queue
hi
i've wrote an application for monitoring printers.i wanna read printer queue and see if the job printing is completed,do somethings.(printing must be completed not canceled or failed)
could anyone help me?
this is my listener :
public class Listener implements PrintServiceAttributeListener {
public void attributeUpdate(PrintServiceAttributeEvent e) {
// Some event occurred with a print service
Attribute[] attrs = e.getAttributes().toArray();
for (int i = 0; i < attrs.length; i++) {
String attrName = attrs[i].getName();
// New value
String attrValue = attrs[i].toString();
System.out.println("Name : " + attrName + " Value : " + attrValue);
}
}
}
Similar Threads
-
How to change paper source or printer tray of a printer in java code
By JAVA_ER in forum Advanced JavaReplies: 2Last Post: 02-20-2009, 07:25 AM -
java.io.IOException: Unable to read entire block; 493 bytes read before EOF; expected
By kushagra in forum New To JavaReplies: 5Last Post: 10-17-2008, 02:13 PM -
Specifying a Network Printer in Printer Servlet
By shapez in forum New To JavaReplies: 0Last Post: 03-06-2008, 03:21 PM -
Using a queue
By Krmeus in forum New To JavaReplies: 0Last Post: 12-10-2007, 03:38 PM -
please help on java program for printer : this printer is connected to system which
By for453 in forum Java 2DReplies: 0Last Post: 08-09-2007, 06:30 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks