WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Printing Information

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Sending Control Sequences to a Printer

Keywords: 	  control sequences

Question:

i would like to send a escape sequence to a laser printer via Winbatch. I know the escape sequences but i can't get it to the printer.

What i would like to to is, i want to send the escape sequence for changing the fond and the Paper orientation.

Any suggestion?

Answer:

You can often FileCopy escapt sequences to a printer.

If it is a network printer use

\\Servername\printername as the FileCopytarget.

Let's say you want you want to send ESC F CRLF to the printer LPT1

Maybe try:

	bb=BinaryAlloc(100)
	BinaryPokeStr(bb,0,Num2Char(27)) ; ESC
	BinaryPokeStr(bb,1,"F")
	BinaryPokeStr(bb,2,@CRLF)
	BinaryWrite(bb,"LPT1")
or maybe:
	BinaryWrite(bb,"\\server\printer")
then
	BinaryFree(bb)

Article ID:   W13705
Filename:   Sending Control Sequences to a Printer.txt
File Created: 1999:04:15:16:55:50
Last Updated: 1999:04:15:16:55:50