Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

printer object

Status
Not open for further replies.

sm43

Programmer
Dec 1, 2002
155
US

Hi,
I'm trying to print using the Printer object in Visual Basic.


When I go printer.print - the print job just floats in the printer queue and doesn't print . It says "Spooling .. Printing" . I see that the printer job is showing a Port value of HP_C06A55_IP .. which is wierd. I haven't figured out how to manipulate the Printer.Port property . I don't quite know what to set it to - or how to find out what value to set it to ..

Can anyone give me some input?


Thanks.


Saad M
 
When you've finished with printing all your stuff, do a Printer.EndDoc which actually fire the job to the printer.

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 

Hi,
Thanks for your reply.. EndDoc worked .. VB is now printing to the printer.

However, I got this error message on the printout, instead of the content I was printing..


PCL XL error

SubSystem: KERNEL

Error: IllegalStreamHeader

Operator: 0x0

Position: 0



Does any one know what this error means , and how to get rid of it?


Ssad Masood
 
Have you tried the HP site? There are several related issues - try starting from:

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
Hi,
I have tried all the steps mentioned in the HP article - Thanks. I haven't been able to get rid of that error however.

I'm able to print to the printer fine from any Windows program - or from DOS. It's just the printing from the Visual Basic Printer object that gives me this problem..


Thanks..


Saad
 
Why don't you post the code that you are using? Maybe we can find your problem that way.

Thanks and Good Luck!

zemp
 
Have you tried to reboot the printer. My thought is that a buffer on the printer has junk in it. I had this same problem and I reinstalled the printer on my computer and rebooted the printer. Worked like a charm!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top