|
-
Dec 8th, 2008, 12:33 PM
#1
Thread Starter
Lively Member
[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
-
Dec 8th, 2008, 12:48 PM
#2
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.
-
Dec 8th, 2008, 12:52 PM
#3
Thread Starter
Lively Member
Re: [2008] Printer - jobstream property null reference exception
Is there another way to be able to read the raw data from print jobs?
-
Dec 8th, 2008, 03:29 PM
#4
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...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|