What i have so far is the following code:
FileInputStream fin =new FileInputStream(filename);
DocFlavor df = DocFlavor.INPUT_STREAM.AUTOSENSE;
Doc d = new SimpleDoc(fin, df, null);
PrintService P = PrintServiceLookup.lookupDefaultPrintService();
if (P != null) {
DocPrintJob job = P.createPrintJob();
job.print(d, null);
}
fin.close;
the code is working fine but the printer does't interpret the commands if the file containing commands, it keep printing the exact string content of the file. so how to send command to Epson receipt printer ?