I have code that works in version 1.6 as the following:
` public EscPosPrinterCommander PrintToSerial(string comPort = "COM8", int baudRate = 115200) {
using (var printer = new SerialPrinter(comPort ?? "COM8", baudRate))
{
var data = _bytes.ToArray();
printer.Write(data);
}
return this;
}`
but not working in 3.0, the reaason I suspect is the printer .Open method is 3.0, the printer connection is not yet open, if I put a breakpoint on the printer.write(), the it print, that may give it time to aquire a connect to the COM port. not sure if anyone else encounter the same.
I have code that works in version 1.6 as the following: ` public EscPosPrinterCommander PrintToSerial(string comPort = "COM8", int baudRate = 115200) { using (var printer = new SerialPrinter(comPort ?? "COM8", baudRate)) { var data = _bytes.ToArray(); printer.Write(data); }
but not working in 3.0, the reaason I suspect is the printer .Open method is 3.0, the printer connection is not yet open, if I put a breakpoint on the printer.write(), the it print, that may give it time to aquire a connect to the COM port. not sure if anyone else encounter the same.