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")thenBinaryFree(bb)
Article ID: W13705Filename: Sending Control Sequences to a Printer.txt