Monitor Events of Printer in a PC's Network

J

julielaurek

Hey guys!

Sorry if you read something similar to this from me twice; I thought I
had posted it a few days ago but I can't even find it on profile. But
here goes:

Let's say you have 3 printers that you can print to from this one
laptop you have. Using the java print API you can easily get all the
names of your printers using lookupPrntServices(null, null). You
select one of those printers. Everything up t othis point was done
using java code.

Now, you'd like to normally print a document, without using java. So
you ctrl-p from a different window and you start printing, normally.

I'd like to use Java code at this point to monitor printing events
from this printer, like rate of printing, time of start, maybe even
anticipated time of end... that kind of stuff... So far, after
thoroughly befirending Google, I have not been able to find a way to
do so with the java print api. Does anyone happen to know if it's
first of all possible to do that, and next if I could do so in Java or
what language I could use otherwise? I really only (have begun to)
know Java, so I was looking into using JNI but I don't know what
language to even start from if I want to follow that line of
thought...

s.o.s... =)

JL
 
J

Joshua Cranmer

I'd like to use Java code at this point to monitor printing events from
this printer, like rate of printing, time of start, maybe even
anticipated time of end... that kind of stuff... So far, after
thoroughly befirending Google, I have not been able to find a way to do
so with the java print api. Does anyone happen to know if it's first of
all possible to do that, and next if I could do so in Java or what
language I could use otherwise? I really only (have begun to) know Java,
so I was looking into using JNI but I don't know what language to even
start from if I want to follow that line of thought...

s.o.s... =)

JL

I doubt that could be done. First of all, printing is amazingly low-level
API; the main high-level API I've seen is "choose a printer, change some
settings, and print." From a cursory examination of the Windows API, it
does not appear to have functions to do this. However, if you're using
*nix, the CUPS API might have functions that does what you want.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top