data[1] = POSPrinterConst.PTR_BM_ASIS; // width in map mode
data[2] = POSPrinterConst.PTR_BM_CENTER; // alignment
java.awt.Image image = new javax.swing.ImageIcon("star.gif").getImage();
printer.directIO(command, data, image);
}
// 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");