ANNOUNCEMENT
Starting today, this library will be abandoned and will no longer be distributed.
A new, more comprehensive Android library for ESC/POS thermal printers will be released. (BT, BLE, LAN, USB) (here)
(No WRAP, No Java Only B4A)
BT_Printer library allows you to print text and image to a
thermal printers (Bluetooth and BLE) with ESC/POS language
(For B4J versione see Here, for B4i versione see Here, for ZEBRA printer Here)
To print the QR CODES with your BT thermal printer you can create an image containing the QR code with the help of the @Erel library (here) or can use library of @Johan Schoeman (here)
WARNING: Make sure the library meets all your needs, is compatible with the printer you need to use.
To try print with the demo version (rel. 0.21) you can only use the FlushAndClose command which lasts 14 days and then disables.
The full version of the library will be issued to those making a donation (Contact me in private before making a donation). In the donation indicate the library you want and your NickName. Those requesting the full version will receive updates for 3 months.
SD_BT_Printer
Author: Star-Dust
Version: 0.21
Starting today, this library will be abandoned and will no longer be distributed.
A new, more comprehensive Android library for ESC/POS thermal printers will be released. (BT, BLE, LAN, USB) (here)
(No WRAP, No Java Only B4A)
BT_Printer library allows you to print text and image to a
thermal printers (Bluetooth and BLE) with ESC/POS language
(For B4J versione see Here, for B4i versione see Here, for ZEBRA printer Here)
To print the QR CODES with your BT thermal printer you can create an image containing the QR code with the help of the @Erel library (here) or can use library of @Johan Schoeman (here)
WARNING: Make sure the library meets all your needs, is compatible with the printer you need to use.
To try print with the demo version (rel. 0.21) you can only use the FlushAndClose command which lasts 14 days and then disables.
The full version of the library will be issued to those making a donation (Contact me in private before making a donation). In the donation indicate the library you want and your NickName. Those requesting the full version will receive updates for 3 months.
SD_BT_Printer
Author: Star-Dust
Version: 0.21
- BLE_Printer
- Events:
- Connected (services As List)
- Disconnected
- ImageWriteComplete
- PrinterFound (Name As String, ID As String)
- StateChanged (msg As String)
- WriteComplete (Characteristic As String, Success As Boolean)
- Fields:
- CharatteristicName As String
- currentState As Int
- ServiceName As String
- Functions:
- AddTab (ArrayTab As Int()) As String
Add Tab
eg. PrinterBLE.AddTab(Array As Byte(100,150,121)) - CenterJustify As String
after this command calls SendBufferToPrinter - Class_Globals As String
- Connect (ID As String) As String
- Initialize (CallBack As Object, EventName As String, EncodingType As String) As String
Initializes the object. You can add parameters to this method if needed. - InitializePrinter As String
- IsInitialized As Boolean
Verifica se l'oggetto sia stato inizializzato. - LeftJustify As String
after this command calls SendBufferToPrinter - PrintBitmap (bmp As Bitmap)
- RightJustify As String
after this command calls SendBufferToPrinter - ScanPrinter As String
- SetCodePage (Code As Byte) As String
es. Printer.SetCodePage(06) for umlauts char - Write (Text As String) As String
Write (Print) a Text - Write_ArrayByte (B As Byte()) As String
Write (Send to Printer) a Array of Byte
eg. PrinterBLE.Write_ArrayByte(Array As Byte(0x1D,150,23))
eg. PrinterBLE.Write_ArrayByte("Text".GetBytes("UTF8")) - WriteBarCode (Code As String) As String
- WriteLine (Text As String) As String
Write (Print) a Text + CHLF - WriteList (list As List) As String
Write (Print) a List
- AddTab (ArrayTab As Int()) As String
- Properties:
- CodeTable
es. printer.setCodeTable(Ecoding.Code_WPC1252)
aftet this command calls SendBufferToPrinter - isConnect As Boolean [read only]
- isScanning As Boolean [read only]
- Spacing
after setSpacing command calls SendBufferToPrinter
- CodeTable
- Events:
- BT_Printer
Note: AddPermission(android.permission.ACCESS_COARSE_LOCATION)- Events:
- BluetoothIsDisabled
- ConnectedToPrint (Success As Boolean)
- DataReceived (Buffer() As Byte)
- DisconnectToPrint (Mac As String)
- DiscoveryComplete (Printers As Map)
- DiscoveryFinished
- DiscoveryNewPrinter (PrintedFound As Map, DeviceClass As Int)
- DiscoveryNoDeviceFound
- ErrorDiscovery
- ListPrinterAssociated (ListNameAndMac As Map)
- SendingError (Mac As String)
- SendTerminated
- Fields:
- Const_AUDIO_VIDEO As Int
- Const_COMPUTER As Int
- Const_HEALTH As Int
- Const_IMAGING As Int
- Const_MISC As Int
- Const_NETWORKING As Int
- Const_PERIPHERAL As Int
- Const_PHONE As Int
- Const_TOY As Int
- Const_UNCATEGORIZED As Int
- Const_WEARABLE As Int
- Functions:
- AddBuffer_ArrayByte (B As Byte()) As String
- AddBuffer_BarCode (Code As String) As String
- AddBuffer_Bitmap (Bmp As Bitmap, ShiftLeft As Int) As String
- AddBuffer_BitmapAlternativeCoding (Bmp As Bitmap) As String
- AddBuffer_List_Write (list As List) As String
- AddBuffer_List_WriteLine (list As List) As String
- AddBuffer_Tab (ArrayTab As Int()) As String
- AddBuffer_Write (Text As String) As String
- AddBuffer_WriteLine (Text As String) As String
- AddPrintDefineImage As String
- CenterJustify As String
after this command calls SendBufferToPrinter - ChangeEncoding (EncodingType As String) As String
- Class_Globals As String
- ClearBuffer As String
- Close As String
- Connected As Boolean
- DefineImage (Image As Bitmap)
- flushAllAndClose
- Initialize (CallBack As Object, EventName As String, EncodingType As String) As String
Initializes the object. You can add parameters to this method if needed. - InitializePrinter As String
- IsInitialized As Boolean
Verifica se l'oggetto sia stato inizializzato. - LeftJustify As String
after this command calls SendBufferToPrinter - Preview As Bitmap
- ResetPreViewWidth (NewWidth As Int) As String
- RightJustify As String
after this command calls SendBufferToPrinter - SearchNewPrinter As String
select -------------------------------------------- - SelectFromAssociatedPrinter As String
- SelectFromMac (Mac As String) As String
- SendBufferToPrinter
- SetCodePage (Code As Byte) As String
es. Printer.SetCodePage(06) for umlauts char
- Properties:
- CodeTable
es. printer.setCodeTable(Ecoding.Code_WPC1252)
aftet this command calls SendBufferToPrinter - Spacing
after setSpacing command calls SendBufferToPrinter
- CodeTable
- Events:
- ESC_POS
Code module
Subs in this code module will be accessible from all modules.- Fields:
- BoldOff As String
- BoldOn As String
- DoubleOff As String
- DoubleOn As String
- FontA_Bold As String
- FontA_DoubleHight As String
- FontA_DoubleWide As String
- FontA_DoubleWideHeight As String
- FontA_Normal As String
- FontB_Bold As String
- FontB_DoubleHeight As String
- FontB_DoubleWide As String
- FontB_DoubleWideHeight As String
- FontB_Normal As String
- Horizzontal As String
- InitializePrinter As String
- ItalicFontOff As String
- ItalicFontOn As String
- NoUnderline As String
- QueryErrorCauses As String
- QueryOfflineCauses As String
- QueryPaperStatus As String
- QueryPrinterStatus As String
- Underline1 As String
- Underline2 As String
- Vertical As String
- Functions:
- Process_Globals As String
- Fields:
- Encoding
Code module
Subs in this code module will be accessible from all modules.- Fields:
- Chinese As String
- ChineseS As String
- Code_PC437 As Int
- Code_PC850 As Int
- Code_PC857 As Int
- Code_PC858 As Int
- Code_PC860 As Int
- Code_PC863 As Int
- Code_WPC1252 As Int
- DOS_Latin_1 As String
- IBM_PC As String
- ISO8859 As String
- UTF8 As String
- Windows1252 As String
- Functions:
- Process_Globals As String
- Fields:
Attachments
Last edited: