ESC/POS commands for printer.

G

Guest

Can some angel tell me how to send HEX commands using the Whidbey Serial port
component [language C#]? I want to drive a printer that accepts commands like
"GS V", "LF", "ESC * ...." etc.

Thanks in advance.
 
D

Dmytro Lapshyn [MVP]

Hi,

I am not sure what do you mean here... if you speak of an old printer (or a
printer that supports so-called escape codes out of backwards
compatibility), you should just know the hexadecimal values of these codes.

For example, CR and LF are 0x0d and 0x0a, ESC is 0x1b

Google for the rest, keeping in mind that different printers have different
"escape sequences", and only a small subset of them is common (AFAIR).

Then, you just send these bytes to the printer's port.

However, printers are usually connected to parallel (LPT) ports and not
serial ports. Not sure if the Whidbey Serial port component you're talking
about is capable of sending data to an LPT port.

"Radhakrishna Banavalikar"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top