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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to send a pcl command in visual basic

Status
Not open for further replies.

allicalila

Programmer
Jul 14, 2003
3
ES
I have to count the pages printed in a hp printer and my program must be in visual basic i'm new in the pcl world and i don´t know how send the pcl commands to the chosen printer

THANKS

 
I do it in Java. You open the file LPT1 or LPT2 (but i think your printer is installed on the first paralle port -> LPT1)
and you send byte :) like if you fill into a normal file
that's all :)
I don't know the VB syntaxe but it's like that in Java :
File f = new File("LPT1");
Stream s = new Stream(f);
s.write("hello the world");
s.write(0x0D); //CR
s.write(0x0A); // LF
s.write(0x0C); // print page
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top