How to get the c/c++ standard representation of all the esc/p2 and pcl commands?

84 Views Asked by At

I found a reference manual for esc/p2.

ESC / Select vertical tab channel — · · C-67
ESC 0 Select 1/8-inch line spacing · · · C-51
ESC 1 Select 7/72-inch line spacing — — · C-60
ESC 2 Select 1/6-inch line spacing · · · C-53
ESC 3 Set n/180-inch line spacing · · — C-55
ESC 3 Set n/216-inch line spacing — — · C-56
ESC 4 Select italic font · · · C-114
ESC 5 Cancel italic font · · · C-116
ESC 6 Enable printing of upper control codes · · · C-151
ESC 7 Enable upper control codes · · · C-153
ESC 8 Disable paper-out detector — — · C-165
ESC 9 Enable paper-out detector — — · C-16
etc.. 

All of them are in text format , can I get the commands for the to use in c++ ,which are the hexadecimal values to be written to the printer device file

example.

"ESC @":

The "ESC @" escape sequence is used in documentation or when describing the ESC/P or ESC/P2 commands in text format. It is commonly used to indicate the printer reset command in plain text, explaining the action to be taken. "\x1B@E":

The "\x1B@E" escape sequence is used in C and other programming languages to represent the escape sequence as a hexadecimal character. It is used when sending commands directly to the printer through code (e.g., when using C/C++ and writing to the printer device file). In this representation, "\x1B" is the hexadecimal representation of the escape character (ASCII 27), and "@" follows it to form the sequence.

where "ESC @" represented as "\x1B@E" , similarly How to get c standard representation for programming purpose ,of ESC/p2 and PCL formats

0

There are 0 best solutions below