How to Verify Printer Status: Out of Paper Check

From wizarPOS
Revision as of 03:12, 30 January 2023 by Mahong (talk | contribs) (Created page with "== Java API: queryStatus() == Generally, call this method to check whether paper existed before one time printing, if print a large receipt, perhaps need check after printing....")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Java API: queryStatus()

Generally, call this method to check whether paper existed before one time printing, if print a large receipt, perhaps need check after printing.

  device = (PrinterDevice) POSTerminal.getInstance(mContext).getDevice(POSTerminal.DEVICE_NAME_PRINTER);
  int result = device.queryStatus();
  device.close();

result< 0 : error code;

result= 0 : out of paper;

result= 1 : has paper;