c# - How to print code hexadecimal OR decimal OR binary in printer? -
i want execute commands of 1 printer epson tm-t88iii.
to more specific:
- i want print symbol €... printer epson tm-t88iii , generic print/txt only
- with investigation found solutions, , credible here http://www.novopos.ch/client/epson/tm-u230/apg_div_printer.pdf on last pages
and doubts are: how this? how set commands printer way of c#? choose? hexodecimal? binary? decimal? i'm confused!
thank you
in c# can communicate printer using (for example) serial port classes (if printer has serial interface) or standard i/o classes (for example if has parallel interface you'll address lptx: device).
printer character device you'll send bytes (one character = 1 byte because printer uses 8 bit ascii). it'll interpret bytes ascii codes (according current code page) print characters. send command them have use language, because ascii characters special (everything code less 32) it'll interpret sequences commands.
don't confuse way write commands in documentation (decimal, hex) send: character a has ascii code 65 (in decimal , 41 in hexadecimal) , it's byte value ascii code.
for epson printers use escape character (ascii code 27) start command sequence, bytes follows interpreted commands , won't printed text (let's imagine send sequence: 27 65, won't print a character it'll interpret command number 65 - if exists). let's see example documentation:
ascii esc m n hex 1b 4d n decimal 27 77 n
you have 3 ways represent sequence (first ascii , names, second hexadecimal values , third decimal values). it's you, printer send 3 bytes (again bytes not string decimal representation).
symbol € isn't known character printer (otherwise may set code page , live happy). can discard 1 of characters have don't use , replace custom character using esc & command (page 113 of documentation example), you'll send bitmap (=a matrix of 1 , 0) printer print character.
Comments
Post a Comment