How to know a print job was printed to a file?

  • Thread starter Thread starter Merrion
  • Start date Start date
M

Merrion

Is there a component of the JOB_INFO_2 structures that can tell you if
a print job was printed to a file rather than physically printed out?

Thanks in advance,
Duncan Jones
Merrion Computing Ltd
http://www.merrioncomputing.com
 
It doesn't appear to directly, if you want to check whether they printed
using the FILE: port then you could check the port associated with the
printer name which is included in the structure.

If your user is printing to file from the application, ie checking the print
to file box in Word for example then I don't think the job gets spooled in
quite the same way, the spooler must know where the job is going but I don't
think you are going to know that.

If you watch the printer when a print to file job is spooled you will see
the port change to the filename briefly before the job is completed, I guess
the same circumstance could arise if you using printer pooling. Also try
setting keep printed documents, you will see the job twice in the queue in
XP which is even stranger :)

Having said all that Explorer seems to know the file/port name as it
displays it in the window so maybe there is a hidden api or structure you
can use to get it. Maybe you can look at the field
JOB_NOTIFY_FIELD_PORT_NAME in PRINTER_NOTIFY_INFO_DATA?
 

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

Back
Top