frankie_jnr
asked on
sending commands to a printer
Hi all,
I have a epson lx-300+ printer. what i want to do is ask is there a way in vb that i can send a command to the printer. Currently i have to press the load/eject button on the printer before i can print to get my alignment right. I wonder if i can write a simple app to do that for me.
Thanks for the help and hope this makes sense :P
Frank
I have a epson lx-300+ printer. what i want to do is ask is there a way in vb that i can send a command to the printer. Currently i have to press the load/eject button on the printer before i can print to get my alignment right. I wonder if i can write a simple app to do that for me.
Thanks for the help and hope this makes sense :P
Frank
ASKER
how would i do that? I usally use crystal report to do my printing but i assume there is a way to send the command directly?
It has been a while since I have done it but I believe just use the PRINT statment directed to the printer.
mlmcc
mlmcc
ASKER
I cant seem to get it working. I assume i should use the SendBytesToPrinter()
part
part
Use the SendStringToPrinter function. Make sure you use the correct commands.
ASKER
hi there i am still trying to get this working what string should i send ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
In the printer manual there are ESCAPE codes for many things like formfeed.
Simply print a line like
chr(27) & vbFF
chr(27) is ESCAPE
mlmcc