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

  • Thread starter Thread starter Merrion
  • Start date Start date
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?
 
Back
Top