How to Verify Printer Status: Out of Paper Check: Difference between revisions

From wizarPOS
No edit summary
No edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
== Java API: Using queryStatus() to Check Paper Availability in Printer ==
{{Migrating|https://smartpossdk.gitbook.io/cloudpossdk/faq/printer/verify-printer-paper-status}}
* '''Purpose of queryStatus():'''
This method is used to ascertain the paper status in the printer. It is especially useful for checking if paper is available before initiating a print job. In cases of printing large receipts, it may be advisable to check the paper status after printing as well..
<syntaxhighlight lang="java" line='line'>
  device = (PrinterDevice) POSTerminal.getInstance(mContext).getDevice(POSTerminal.DEVICE_NAME_PRINTER);
  int result = device.queryStatus();
  device.close();
</syntaxhighlight>
 
* '''Understanding the Result Codes:'''
** '''Result < 0:''' Indicates an error. The specific negative value corresponds to a particular error code.
** '''Result = 0:''' Signifies that the printer is out of paper.
** '''Result = 1:''' Confirms that the printer has paper available for printing.

Latest revision as of 08:18, 7 April 2024

Please visit new link of same subject:

https://smartpossdk.gitbook.io/cloudpossdk/faq/printer/verify-printer-paper-status

We're making a move! Our site's content is migrating to a new URL, to provide you with an enhanced browsing experience. Please update your bookmarks accordingly. Thank you for your continuous support!