Link to home
Start Free TrialLog in
Avatar of frankie_jnr
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
Avatar of Mike McCracken
Mike McCracken

You should be able to.

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
Avatar of frankie_jnr

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
I cant seem to get it working. I assume i should use the SendBytesToPrinter()
part
Use the SendStringToPrinter function. Make sure you use the correct commands.
hi there i am still trying to get this working what string should i send ?
ASKER CERTIFIED SOLUTION
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial