// the ESC + "|100fP" control code causes the printer to execute a paper cut
// after feeding to the cutter position
// printer.printNormal(POSPrinterConst.PTR_S_RECEIPT, ESC + "|100fP");
// terminate the transaction causing all of the above buffered data to be sent to the printer
printer.transactionPrint(POSPrinterConst.PTR_S_RECEIPT, POSPrinterConst.PTR_TP_NORMAL);
// exit our printing loop
final JFrame frame = new JFrame("Printing");
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);