btPrinterPrint
Description
Sends data to a printer to print the required document.
Input / Parameter
Name | Description | Input Type | Default | Options | Required |
---|---|---|---|---|---|
text | The data to print. | String/Text | - | - | Yes |
Output
N/A
Callback
callback
The function to be executed if the data to be printed is sent to the printer successfully.
errorCallback
The function to be executed if the data to be printed is not sent to the printer successfully.
Video
Coming Soon.
Example
The user wants to print a document from the device.
Steps
Call the function
btPrinterPrint
. Call the functionformatToCPCL
in thetext
parameter of the function to convert the text to CPCL format for printing.Call the function
infoDialog
in the callbacks of thebtPrinterPrint
function to view the status.
Result
If the document is printed successfully, the success infoDialog will appear, otherwise the error infoDialog will appear.
Links
Last updated