Retrieve jobs from Print Queue

  • Thread starter Thread starter RB0135
  • Start date Start date
R

RB0135

Hi All,

Is this possible:
1) An application prints to a printer/print queue (mainly XP).
2) A vb.net application monitors the print queue (I know this can be
done)
3) Retrieve the RAW information from the PrintJob (Cant seem to find
anything on this)
4) Delete the Job when I have the RAW information (I know this can be
done)

Currently, I have the application (in #1) print to a LPD print queue,
which then creates a file in a directory, then the vb.net app picks up
the file and processes it.. This works pretty good, but if I could get
the VB.NET app pickup the print job file, then that would suit better.

Any ideas? Would prefer code, not a commercial solution..

Thanks,
Robert
 
You are right it all can be done it just requires at least Framework 3.0
and some digging in the new system.Printing namespace or a lot of API
knowledge

You can use PrintQueue.CurrentJobSettings property to get an
object(PrintJobSettings Class type) that contains the configuration settings
for the current print job. It has a property CurrentPrintTicket(PrintTicket
class type). The PrintTicket members hold all the detailed settings for the
print job

HTH

Michel Posseth
http://www.vbdotnetcoder.com/.
 
Back
Top