Formatowanie POS dla .Net - nie można użyć znaku ucieczki (znaku) 27

Zorientowałem się, jak wydrukować podstawowy tekst na naszej drukarce POS, ale nie wiem, jak uruchomić znaki ucieczki (pogrubienie, wyrównanie tekstu itp.). Na razie testuję tylko z Microsoft PosPrinter Simulator.

Oto, co próbuję

_printer.PrintNormal(PrinterStation.Receipt, (char)27 + "|bC" + printText + (char)13 + (char)10);

Spodziewam się, że wydrukuje mojeprintText pogrubiony, po którym następuje podział linii. Kiedy wyjmę(char)27 + "|bC" to działa dobrze.

Thedokumentacja kodów ucieczki znajduje się tutaj

Błąd, który dostaję, jest

Wystąpił wyjątek pierwszej szansy typu „System.FormatException” w łańcuchu wejściowym Microsoft.PointOfService.ControlBase.dll o niepoprawnym formacie.

Spróbowałem kilku odmian, ale nie wydaje mi się, żeby zawinął mi głowę.

Edytować. Oto ślad stosu ..

   at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
   at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
   at System.Int32.Parse(String s, IFormatProvider provider)
   at Microsoft.PointOfService.DeviceSimulators.PosPrinterSimulatorWindow.ProcessEscapes(String str)
   at Microsoft.PointOfService.DeviceSimulators.PosPrinterSimulatorWindow.DisplayText(String str)
   at Microsoft.PointOfService.DeviceSimulators.PosPrinterSimulator.PrintNormalImpl(PrinterStation station, PrinterState printerState, String data)
   at Microsoft.PointOfService.BaseServiceObjects.PosPrinterBase.OutputRequestHandler(OutputRequest Request)
   at Microsoft.PointOfService.Internal.PosCommonInternal.ProcessOutputRequest(OutputRequest request, Boolean asyncOperation)
   at Microsoft.PointOfService.BaseServiceObjects.PosPrinterBase.ProcessRequest(PrintOperation operation)
   at Microsoft.PointOfService.BaseServiceObjects.PosPrinterBase.PrintNormal(PrinterStation station, String data)
   at MyProjectNamespace) in MyFile.cs:line 74

questionAnswers(7)

yourAnswerToTheQuestion