[RESOLVED] [2008] Printer - jobstream property null reference exception
Hi,
I am trying to make a program that retrieves data from print jobs. The name, job size etc works but when I attempt to read the jobstream length I get a null reference exception.
Code:
q = LocalPrintServer.GetDefaultPrintQueue
For Each pj In q.GetPrintJobInfoCollection
MsgBox(pj.Name)
MsgBox(pj.JobSize)
MsgBox(pj.JobStream.Length)
Next
Re: [2008] Printer - jobstream property null reference exception
You can't read a print job raw data from all printers - only those that suport bidirectional interface - so the PrintJob.JobStream can be null.
Re: [2008] Printer - jobstream property null reference exception
Is there another way to be able to read the raw data from print jobs?
Re: [2008] Printer - jobstream property null reference exception
Yes - set the printer to keep printed documents after they are printed and then parse the spool file...