if (printer.getCapRecBarCode() == true)
{
// print a Code 3 of 9 barcode with the data "123456789012" encoded
// the 10 * 100, 60 * 100 parameters below specify the barcode's height and width
// in the metric map mode (1cm tall, 6cm wide)
printer.printBarCode(POSPrinterConst.PTR_S_RECEIPT, "123456789012", POSPrinterConst.PTR_BCS_Code39, 10 * 100, 60 * 100, POSPrinterConst.PTR_BC_CENTER, POSPrinterConst.PTR_BC_TEXT_BELOW);
}
// printer.printNormal(POSPrinterConst.PTR_S_RECEIPT, ESC + "|cA" + ESC + "|4C" + ESC + "|bC" + "Thank you" + LF);
// the ESC + "|100fP" control code causes the printer to execute a paper cut