问题
I have printed this way
FileWriter imp = new FileWriter("COM2");
while ((linea = br.readLine()) != null) {
imp.write(linea);
imp.write(0x0A);
}
Well now Im using the port COM2, I have a printer that receive a hex code and its response will back in type byte, I dont know how to do it with java. Somebody has done it before?
Thanks.
回答1:
You could try using javax.print.attribute.standard.PrinterStateReason
This class is a part of the javax.print.* packages.
来源:https://stackoverflow.com/questions/5328519/java-get-printer-status-paper-low-out