c# - Print in Arial Font or any other font by sending raw data to the printer -


private void printfunction(string cmd)   {    string command = cmd;     // create buffer command    byte[] buffer = new byte[command.length];    buffer = system.text.encoding.ascii.getbytes(command);     // use createfile external functo connect lpt1 port    safefilehandle printer = createfile("lpt1:", fileaccess.readwrite, 0, intptr.zero, filemode.open, 0, intptr.zero);     // aqui verifico se impressora é válida    if (printer.isinvalid == true)    {     messagebox.show("printer not found!", "error", messageboxbuttons.ok, messageboxicon.error);     return;    }     // open filestream lpt1 port , send command    filestream lpt1 = new filestream(printer, fileaccess.readwrite);    lpt1.write(buffer, 0, buffer.length);     // close filestream connection    lpt1.close();   } 

i've been using code function above send raw data esc/pos supported epson tm88iii printer.

i've 3 sent of fonts default in printer. wan't print in arial font. how can print in arial font.

please don't suggest me use windows print spooler or printer driver. want print sending raw data.

how can this?

the coding done in c#.net using visual studio 2008.

as far know, tm88's windows driver sends print output bitmap printer, because tm88 not natively support more fixed-width text, barcodes, , bitmaps.

you can use escape codes switch between serif , sans-serif fonts, both fixed-width.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -