Coder Social home page Coder Social logo

januslo / react-native-bluetooth-escpos-printer Goto Github PK

View Code? Open in Web Editor NEW
349.0 10.0 408.0 92.92 MB

React-Native plugin for the bluetooth ESC/POS & TSC printers.

License: MIT License

Java 6.03% JavaScript 0.15% Objective-C 93.33% Ruby 0.17% C 0.32%

react-native-bluetooth-escpos-printer's Introduction

react-native-bluetooch-escpos-printer

React-Native plugin for the bluetooth ESC/POS & TSC printers.

Any questions or bug please raise a issue.

##Still under developement

#May support Android /IOS

GitHub license npm version

Installation

Step 1

Install via NPM Check In NPM

npm install react-native-bluetooth-escpos-printer --save

Or install via github

npm install https://github.com/januslo/react-native-bluetooth-escpos-printer.git --save

Step2

Link the plugin to your RN project

react-native link react-native-bluetooth-escpos-printer

Manual linking (Android)

Ensure your build files match the following requirements:

  1. (React Native 0.59 and lower) Define the react-native-bluetooth-escpos-printer project in android/settings.gradle:
include ':react-native-bluetooth-escpos-printer'
project(':react-native-bluetooth-escpos-printer').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-bluetooth-escpos-printer/android')
  1. (React Native 0.59 and lower) Add the react-native-bluetooth-escpos-printer as an dependency of your app in android/app/build.gradle:
...
dependencies {
  ...
  implementation project(':react-native-bluetooth-escpos-printer')
}
  1. (React Native 0.59 and lower) Add import cn.jystudio.bluetooth.RNBluetoothEscposPrinterPackage; and new RNBluetoothEscposPrinterPackage() in your MainApplication.java :

Step3

Refers to your JS files

    import {BluetoothManager,BluetoothEscposPrinter,BluetoothTscPrinter} from 'react-native-bluetooth-escpos-printer';

Usage and APIs

BluetoothManager

BluetoothManager is the module for Bluetooth service management, supports Bluetooth status check, enable/disable Bluetooth service, scan devices, connect/unpair devices.

  • isBluetoothEnabled ==> async function, checks whether Bluetooth service is enabled. //TODO: consider to return the the devices information already bound and paired here..
     BluetoothManager.isBluetoothEnabled().then((enabled)=> {
                alert(enabled) // enabled ==> true /false
            }, (err)=> {
                alert(err)
            });
  • enableBluetooth ==> diff + ANDROID ONLY async function, enables the bluetooth service, returns the devices information already bound and paired. diff - IOS would just resovle with nil
BluetoothManager.enableBluetooth().then((r)=>{
                var paired = [];
                if(r && r.length>0){
                    for(var i=0;i<r.length;i++){
                        try{
                            paired.push(JSON.parse(r[i])); // NEED TO PARSE THE DEVICE INFORMATION
                        }catch(e){
                            //ignore
                        }
                    }
                }
                console.log(JSON.stringify(paired))
            },(err)=>{
               alert(err)
           });
  • disableBluetooth ==> diff + ANDROID ONLY async function ,disables the bluetooth service. diff - IOS would just resovle with nil
BluetoothManager.disableBluetooth().then(()=>{
            // do something.
          },(err)=>{alert(err)});
  • scanDevices ==> async function , scans the bluetooth devices, returns devices found and paired after scan finish. Event [BluetoothManager.EVENT_DEVICE_ALREADY_PAIRED] would be emitted with devices bound; event [BluetoothManager.EVENT_DEVICE_FOUND] would be emitted (many time) as long as new devices found.

samples with events:

 DeviceEventEmitter.addListener(
            BluetoothManager.EVENT_DEVICE_ALREADY_PAIRED, (rsp)=> {
                this._deviceAlreadPaired(rsp) // rsp.devices would returns the paired devices array in JSON string.
            });
        DeviceEventEmitter.addListener(
            BluetoothManager.EVENT_DEVICE_FOUND, (rsp)=> {
                this._deviceFoundEvent(rsp) // rsp.devices would returns the found device object in JSON string
            });

samples with scanDevices function

BluetoothManager.scanDevices()
            .then((s)=> {
                var ss = JSON.parse(s);//JSON string
                this.setState({
                    pairedDs: this.state.pairedDs.cloneWithRows(ss.paired || []),
                    foundDs: this.state.foundDs.cloneWithRows(ss.found || []),
                    loading: false
                }, ()=> {
                    this.paired = ss.paired || [];
                    this.found = ss.found || [];
                });
            }, (er)=> {
                this.setState({
                    loading: false
                })
                alert('error' + JSON.stringify(er));
            });
  • connect ==> async function, connects the specified device, if not bound, bound dailog prompts.
    BluetoothManager.connect(rowData.address) // the device address scanned.
     .then((s)=>{
       this.setState({
        loading:false,
        boundAddress:rowData.address
    })
    },(e)=>{
       this.setState({
         loading:false
     })
       alert(e);
    })
  • unpair ==> async function, disconnects and unpairs the specified devices
     BluetoothManager.connect(rowData.address)
     .then((s)=>{
        //success here
     },
     (err)=>{
        //error here
     })
  • Events of BluetoothManager module
Name/KEY DESCRIPTION
EVENT_DEVICE_ALREADY_PAIRED Emits the devices array already paired
EVENT_DEVICE_DISCOVER_DONE Emits when the scan done
EVENT_DEVICE_FOUND Emits when device found during scan
EVENT_CONNECTION_LOST Emits when device connection lost
EVENT_UNABLE_CONNECT Emits when error occurs while trying to connect device
EVENT_CONNECTED Emits when device connected
EVENT_BLUETOOTH_NOT_SUPPORT Emits when device not support bluetooth(android only)

BluetoothTscPrinter

The printer for label printing.

  • printLabel ==> async function that performs the label print action.
BluetoothTscPrinter.printLabel(options)
.then(()=>{
    //success
},
(err)=>{
    //error
})

Options of printLabel( ) function: (JSON object)

width
label width , the real size of the label, measured by mm usually.
height
label height, the real size of the label, measured by mm usually.
direction
the printing direction, constants of BluetoothTscPrinter.DIRECTION, values BluetoothTscPrinter.DIRECTION.FORWARD/BluetoothTscPrinter.DIRECTION.BACKWARD (0/1)
gap
the gap between 2 labels, measured by mm usually.
reference
the "zero" position of the label, values [x,y], default [0,0]
tear
switch of the paper cut, constants of BluetoothTscPrinter.TEAR, values ON/OFF (string 'ON','OFF')
sound
switch of the bee sound, values 0/1
text
the collection of texts to print, contains following fields as the configuration:
    * text
        the text string,
    * x
        the text print start position-x
    * y
        the text print start position-y
    * fonttype
        the font type of the text, constanst of BluetoothTscPrinter.FONTTYPE,refereces as table:
            | CONSTANTS | VALUE   |
            |---|---|
            |FONT_1| "1"|
            |FONT_2| "2"|
            |FONT_3| "3"|
            |FONT_4| "4"|
            |FONT_5| "5"|
            |FONT_6| "6"|
            |FONT_7| "7"|
            |FONT_8|"8"|
            |SIMPLIFIED_CHINESE| "TSS24.BF2"|
            |TRADITIONAL_CHINESE| "TST24.BF2"|
            |KOREAN| "K"|
    * rotation
        the rotation of the text, constants of the BluetoothTscPrinter.ROTATION, referces as table:
               | CONSTANTS | VALUE   |
               |---|---|
               |ROTATION_0| 0|
               |ROTATION_90| 90|
               |ROTATION_180| 180|
               |ROTATION_270| 270|
    * xscal
        the scal in x,
    * yscal
        the scal in y, xscal/yscal is the constants of the BluetoothTscPrinter.FONTMUL, referces as table:
         | CONSTANTS | VALUE   |
         |---|---|
         |MUL_1| 1|
         |MUL_2| 2|
         |MUL_3| 3|
         |MUL_4| 4|
         |MUL_5| 5|
         |MUL_6| 6|
         |MUL_7| 7|
         |MUL_8| 8|
         |MUL_9| 9|
         |MUL_10: 10|
qrcode
the collection of qrcodes to print, contains following fields as the configuration:
    * code
        the qrcode content string.
    * x
        the print start position at x
    * y
        the print start position at y
    * level
        the error correction level, constants of BluetoothTscPrinter.EEC, referces as tables:
        | CONSTANTS | VALUE   |
        |---|---|
        |LEVEL_L|"L"|
        |LEVEL_M| "M"|
        |LEVEL_Q| "Q"|
        |LEVEL_H| "H"|
    * width
        the qrcode size (width X width),since the qrcode are square normally, so we just config the width.

    * rotation
        rotation. the same as text object.
barcode
the collection of barcode to print, contains following fields as configuration
  * x
    the print start position of x,
  * y
    the print start position of y,
  * type
    the barcode type, constants of BluetoothTscPrinter, definition as table:
    | CONSTRANTS | VALUE |
    |---|---|
    | CODE128 | "128" |
    | CODE128M | "128M" |
    | EAN128 | "EAN128" |
    | ITF25 | "25" |
    | ITF25C | "25C" |
    | CODE39 | "39" |
    | CODE39C | "39C" |
    | CODE39S | "39S" |
    | CODE93 | "93" |
    | EAN13 | "EAN13" |
    | EAN13_2 | "EAN13+2" |
    | EAN13_5 | "EAN13+5" |
    | EAN8 | "EAN8" |
    | EAN8_2 | "EAN8+2" |
    | EAN8_5 | "EAN8+5" |
    | CODABAR | "CODA" |
    | POST | "POST" |
    | UPCA | "EAN13" |
    | UPCA_2 | "EAN13+2" |
    | UPCA_5 | "EAN13+5" |
    | UPCE | "EAN13" |
    | UPCE_2 | "EAN13+2" |
    | UPCE_5 | "EAN13+5" |
    | CPOST | "CPOST" |
    | MSI | "MSI" |
    | MSIC | "MSIC" |
    | PLESSEY | "PLESSEY" |
    | ITF14 | "ITF14" |
    | EAN14 | "EAN14" |

 * height
  the height of the barcode.
 * readable
  the human readable factor, 0-not readable, 1-readable.
 * rotation
  rotation, the same as text.
 * code
  the code to generate and print, should follow the restriction of the code type using.
 * wide
 the wide bar lines width (dot)
 * narrow
 the narrow bar line width (dot)
image
the collection of the image to print.
 * x
 the print start position x.
 * y
 the print start position y.
 * mode
 the bitmap mode of print, constants of BluetoothTscPrinter.BITMAP_MODE, valuse OVERWRITE(0),OR(1),XOR(2).
 * width
 the width of the image to print. (height will be calculated by image ratio)
 * image
 the base64 encoded image data(without schema)

demo of printLabel() options

let options = {
   width: 40,
   height: 30,
   gap: 20,
   direction: BluetoothTscPrinter.DIRECTION.FORWARD,
   reference: [0, 0],
   tear: BluetoothTscPrinter.TEAR.ON,
   sound: 0,
   text: [{
       text: 'I am a testing txt',
       x: 20,
       y: 0,
       fonttype: BluetoothTscPrinter.FONTTYPE.SIMPLIFIED_CHINESE,
       rotation: BluetoothTscPrinter.ROTATION.ROTATION_0,
       xscal:BluetoothTscPrinter.FONTMUL.MUL_1,
       yscal: BluetoothTscPrinter.FONTMUL.MUL_1
   },{
       text: 'ไฝ ๅœจ่ฏดไป€ไนˆๅ‘ข?',
       x: 20,
       y: 50,
       fonttype: BluetoothTscPrinter.FONTTYPE.SIMPLIFIED_CHINESE,
       rotation: BluetoothTscPrinter.ROTATION.ROTATION_0,
       xscal:BluetoothTscPrinter.FONTMUL.MUL_1,
       yscal: BluetoothTscPrinter.FONTMUL.MUL_1
   }],
   qrcode: [{x: 20, y: 96, level: BluetoothTscPrinter.EEC.LEVEL_L, width: 3, rotation: BluetoothTscPrinter.ROTATION.ROTATION_0, code: 'show me the money'}],
   barcode: [{x: 120, y:96, type: BluetoothTscPrinter.BARCODETYPE.CODE128, height: 40, readable: 1, rotation: BluetoothTscPrinter.ROTATION.ROTATION_0, code: '1234567890'}],
   image: [{x: 160, y: 160, mode: BluetoothTscPrinter.BITMAP_MODE.OVERWRITE,width: 60,image: base64Image}]
}

BluetoothEscposPrinter

the printer for receipt printing, following ESC/POS command.

printerInit()

init the printer.

printAndFeed(int feed)

printer the buffer data and feed (feed lines).

printerLeftSpace(int sp)

set the printer left spaces.

printerLineSpace(int sp)

set the spaces between lines.

printerUnderLine(int line)

set the underline of the text, @param line -- 0-off,1-on,2-deeper

printerAlign(int align)

set the printer alignment, constansts: BluetoothEscposPrinter.ALIGN.LEFT/BluetoothEscposPrinter.ALIGN.CENTER/BluetoothEscposPrinter.ALIGN.RIGHT. Does not work on printPic() method.

printText(String text, ReadableMap options)

print text, options as following:

  • encoding => text encoding,default GBK.
  • codepage => codepage using, default 0.
  • widthtimes => text font mul times in width, default 0.
  • heigthTimes => text font mul times in height, default 0.
  • fonttype => text font type, default 0.

printColumn(ReadableArray columnWidths,ReadableArray columnAligns,ReadableArray columnTexts,ReadableMap options)

print texts in column, Parameters as following:

  • columnWidths => int arrays, configs the width of each column, calculate by english character length. ex:the width of "abcdef" is 5 ,the width of "ไธญๆ–‡" is 4.
  • columnAligns => arrays, alignment of each column, values is the same of printerAlign().
  • columnTexts => arrays, the texts of each colunm to print.
  • options => text print config options, the same of printText() options.

setWidth(int width)

sets the width of the printer.

printPic(String base64encodeStr,ReadableMap options)

prints the image which is encoded by base64, without schema.

  • options: contains the params that may use in printing pic: "width": the pic width, basic on devices width(dots,58mm-384); "left": the left padding of the pic for the printing position adjustment.

setfTest()

prints the self test.

rotate()

sets the rotation of the line.

setBlob(int weight)

sets blob of the line.

printQRCode(String content, int size, int correctionLevel)

prints the qrcode.

printBarCode(String str,int nType, int nWidthX, int nHeight, int nHriFontType, int nHriFontPosition)

prints the barcode.

Demos of printing a receipt

await BluetoothEscposPrinter.printerAlign(BluetoothEscposPrinter.ALIGN.CENTER);
await BluetoothEscposPrinter.setBlob(0);
await  BluetoothEscposPrinter.printText("ๅนฟๅทžไฟŠ็ƒจ\n\r",{
  encoding:'GBK',
  codepage:0,
  widthtimes:3,
  heigthtimes:3,
  fonttype:1
});
await BluetoothEscposPrinter.setBlob(0);
await  BluetoothEscposPrinter.printText("้”€ๅ”ฎๅ•\n\r",{
  encoding:'GBK',
  codepage:0,
  widthtimes:0,
  heigthtimes:0,
  fonttype:1
});
await BluetoothEscposPrinter.printerAlign(BluetoothEscposPrinter.ALIGN.LEFT);
await  BluetoothEscposPrinter.printText("ๅฎขๆˆท๏ผš้›ถๅ”ฎๅฎขๆˆท\n\r",{});
await  BluetoothEscposPrinter.printText("ๅ•ๅท๏ผšxsd201909210000001\n\r",{});
await  BluetoothEscposPrinter.printText("ๆ—ฅๆœŸ๏ผš"+(dateFormat(new Date(), "yyyy-mm-dd h:MM:ss"))+"\n\r",{});
await  BluetoothEscposPrinter.printText("้”€ๅ”ฎๅ‘˜๏ผš18664896621\n\r",{});
await  BluetoothEscposPrinter.printText("--------------------------------\n\r",{});
let columnWidths = [12,6,6,8];
await BluetoothEscposPrinter.printColumn(columnWidths,
  [BluetoothEscposPrinter.ALIGN.LEFT,BluetoothEscposPrinter.ALIGN.CENTER,BluetoothEscposPrinter.ALIGN.CENTER,BluetoothEscposPrinter.ALIGN.RIGHT],
  ["ๅ•†ๅ“",'ๆ•ฐ้‡','ๅ•ไปท','้‡‘้ข'],{});
await BluetoothEscposPrinter.printColumn(columnWidths,
  [BluetoothEscposPrinter.ALIGN.LEFT,BluetoothEscposPrinter.ALIGN.LEFT,BluetoothEscposPrinter.ALIGN.CENTER,BluetoothEscposPrinter.ALIGN.RIGHT],
  ["React-Nativeๅฎšๅˆถๅผ€ๅ‘ๆˆ‘ๆ˜ฏๆฏ”่พƒ้•ฟ็š„ไฝ็ฝฎไฝ ็จๅพฎ็œ‹็œ‹ๆ˜ฏไธๆ˜ฏ่ฟ™ๆ ท?",'1','32000','32000'],{});
    await  BluetoothEscposPrinter.printText("\n\r",{});
  await BluetoothEscposPrinter.printColumn(columnWidths,
  [BluetoothEscposPrinter.ALIGN.LEFT,BluetoothEscposPrinter.ALIGN.LEFT,BluetoothEscposPrinter.ALIGN.CENTER,BluetoothEscposPrinter.ALIGN.RIGHT],
  ["React-Nativeๅฎšๅˆถๅผ€ๅ‘ๆˆ‘ๆ˜ฏๆฏ”่พƒ้•ฟ็š„ไฝ็ฝฎไฝ ็จๅพฎ็œ‹็œ‹ๆ˜ฏไธๆ˜ฏ่ฟ™ๆ ท?",'1','32000','32000'],{});
await  BluetoothEscposPrinter.printText("\n\r",{});
await  BluetoothEscposPrinter.printText("--------------------------------\n\r",{});
await BluetoothEscposPrinter.printColumn([12,8,12],
  [BluetoothEscposPrinter.ALIGN.LEFT,BluetoothEscposPrinter.ALIGN.LEFT,BluetoothEscposPrinter.ALIGN.RIGHT],
  ["ๅˆ่ฎก",'2','64000'],{});
await  BluetoothEscposPrinter.printText("\n\r",{});
await  BluetoothEscposPrinter.printText("ๆŠ˜ๆ‰ฃ็Ž‡๏ผš100%\n\r",{});
await  BluetoothEscposPrinter.printText("ๆŠ˜ๆ‰ฃๅŽๅบ”ๆ”ถ๏ผš64000.00\n\r",{});
await  BluetoothEscposPrinter.printText("ไผšๅ‘˜ๅกๆ”ฏไป˜๏ผš0.00\n\r",{});
await  BluetoothEscposPrinter.printText("็งฏๅˆ†ๆŠตๆ‰ฃ๏ผš0.00\n\r",{});
await  BluetoothEscposPrinter.printText("ๆ”ฏไป˜้‡‘้ข๏ผš64000.00\n\r",{});
await  BluetoothEscposPrinter.printText("็ป“็ฎ—่ดฆๆˆท๏ผš็Žฐ้‡‘่ดฆๆˆท\n\r",{});
await  BluetoothEscposPrinter.printText("ๅค‡ๆณจ๏ผšๆ— \n\r",{});
await  BluetoothEscposPrinter.printText("ๅฟซ้€’ๅ•ๅท๏ผšๆ— \n\r",{});
await  BluetoothEscposPrinter.printText("ๆ‰“ๅฐๆ—ถ้—ด๏ผš"+(dateFormat(new Date(), "yyyy-mm-dd h:MM:ss"))+"\n\r",{});
await  BluetoothEscposPrinter.printText("--------------------------------\n\r",{});
await  BluetoothEscposPrinter.printText("็”ต่ฏ๏ผš\n\r",{});
await  BluetoothEscposPrinter.printText("ๅœฐๅ€:\n\r\n\r",{});
await BluetoothEscposPrinter.printerAlign(BluetoothEscposPrinter.ALIGN.CENTER);
await  BluetoothEscposPrinter.printText("ๆฌข่ฟŽไธ‹ๆฌกๅ…‰ไธด\n\r\n\r\n\r",{});
await BluetoothEscposPrinter.printerAlign(BluetoothEscposPrinter.ALIGN.LEFT);

Demo for opening the drawer

BluetoothEscposPrinter.opendDrawer(0, 250, 250);

react-native-bluetooth-escpos-printer's People

Contributors

igorassis avatar januslo avatar lluis-sancho avatar natlify avatar pilot4u avatar rejunges avatar shubhamdeol avatar tusharkhatiwada avatar vgvishal538 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-native-bluetooth-escpos-printer's Issues

Image not printing on iOS

Hi,

I actually have same issue with #21. I have printPic command followed by few lines of printColumn and printText.

It works on Android but on iOS, the printer starts to feed few lines of the paper then stops (no image printed) while there are still lines of text to be printed. When I remove printPic command, the columns and the texts print well.

Is there some way I could make the image to print on iOS?
Thanks for the great library.

Small letters

Hi, can you please add an example to print with small letters...I can see in the selftest of the printer at the end but i see no options to set...I was thinking maybe setWidth(int width) but is not working...Now i can print 32 characters per line...i need to print 42..
Thanks in advance

Anyone can help me ? evaluating 'BluetoothTscPrinter.DIRECTION

i have this problem

`undefined is not an object (evaluating 'BluetoothTscPrinter.DIRECTION = {
FORWARD: 0,
BACKWARD: 1
}')
Captura de Tela 2019-05-04 ร s 19 29 56

index.js:5:20 loadModuleImplementation require.js:292:12 SellScreen.js:7:2 loadModuleImplementation require.js:292:12 MainTabNavigator.js:7 loadModuleImplementation require.js:292:12 AppNavigator.js:3 loadModuleImplementation require.js:292:12 App.js:4 loadModuleImplementation require.js:292:12 AppEntry.js:2 loadModuleImplementation require.js:292:12 guardedLoadModule require.js:179:45 global code :0`

Cannot print

i have try printText("hello world") but printer can't print that text, you have solution?

Encoding UTF-8

I need print some text with encoding UTF-8.
Seem this library does not support UTF-8.
Is it right?

Thermal printer

I have a thermal printer Honeywell RP4, when I use your example for test. It can connect via bluetooth but when I press any button like Self Test, Print Label.. It can't happen, Is my printer not suitable for your lib? May my printer doesn't have right input mode.

Persistent bluetooth connection

I have small question. How to implement persistent bluetooth connection in the background? Any idea? I used ver 0.0.2 and the examples/App.js in one of my bottom tabnavigator. I can connect to the device and print my receipt but whenever I change tab and come back to the printer view tab I need to rescan and reconnect device. Any plan to include this in the future? Thanks for this great package

local image not working

Hello

import RNFetchBlob from "react-native-fetch-blob";
import {BluetoothManager,BluetoothEscposPrinter,BluetoothTscPrinter} from 'react-native-bluetooth-escpos-printer';

const options = { width: 15, height:100}
const path = 'file:///D://Nemelt//ReactNative//Print//Code//BarCodeShoshigLast//src//resources//images//Frame1.png';

frame1

RNFetchBlob.fs.readFile(path, 'base64')
.then((data) => {
console.log('--------------------->>>'+data)
BluetoothEscposPrinter.printPic(data, options)

})

can not printing image HELP ME
thank you

Image not printing from iOS

I am able to print an image from android phone, but when I try from iOS, the printer prints the first few lines of the image, but then stops feeding the paper, and just keeps printing on the same line. I wonder if anyone else has come across this? I actually reproduced this behaviour in some other software that isn't part of this repo, so I am wondering whether it is a printer bug.

Any help would be appreciated! I have attached pic of the result. Ignore the "hi there" that was from a previous test.

whatsapp image 2019-01-09 at 23 15 02

TSC Alpha-3RB

Hi, thx for the lib.
I have printer Alpha-3RB , blue-tooth connection trigger EVENT_CONNECTION_LOST, after connect on android.

Also, i have printer milestone mht-l5801, he connect and print fine.

Something wrong with image

My code:

var img = 'iVBORw0KGgoAAAANSUhEUgAAANIAAAAzCAYAAADigVZlAAAQN0lEQVR4nO2dCXQTxxnHl0LT5jVteHlN+5q+JCKBJITLmHIfKzBHHCCYBAiEw+I2GIMhDQ0kqQolIRc1SV5e+prmqX3JawgQDL64bK8x2Ajb2Bg7NuBjjSXftmRZhyXZ1nZG1eL1eGa1kg2iyua9X2TvzvHNN/Ofb2Z2ZSiO4ygZGZm+EXADZGSCgYAbICMTDATcABmZYCDgBsjIBAMBN0BGJhgIuAEyMsGA1wQdHZ1UV1cX5XK5qM7OzgcMRuNTrSbTEraq6strhdfzruTk5Wpz8q5c1l7Jyb6szc3K1l7RggtFxcWX2dvVB02mtmVOp3NIV2fnQFie2WyB5QS84TIy/YnXBFBI8BMM/pDqat0XzIVM08lTSVxyytn6jAuZV4FuzmtzclJz8/LT8vML0nJzr54HYkpLS88oTkxMMZ48mchlXrxUX1ffcBCUM8xms8lCkgk6pCT6aZvZvCrzYpbu2PfxHAg8l+obGmOt1vaJQBAPkvI5nM5fWyyWWTU1tfuA+IqOHDvGgehVCK4pA91oGZn+xluCAc0thtj4hCT72XOp9S0thi2FBQWPvb13z9RN61QH5s8NYxbMDct7KXyudt7MGeeWLFrwn8iVKz7auDZy3Z7dbzz91p43B8ZsjYLlDKmprd3/ffwpLjWNqbW32xcFuuEyMv2J2M1BJpMpKiExxZKZeamira1tvvqdt8OWL1l8asq4kNbRzz7NTRo7uuMPo4Y7Rz/zFBc64lluzHNDuZFDFe5PICx25/aY2B3bogf/dd9fKCA+CuytohOSkjuyLmtLXRwXGujGy8j0F8Qbdrt9bDpzQQ8jSHl5+dLt0VsOThgzwj7i6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vj10Wksz9CCeCaDSC+CQkGInq6utF90Q8oIzf5l0tuFheXvkPsI962HN6JwtJ5n6FofEiwn3hsxeShVQF9kVQRPDfSZKwN6Kampt3Xiu83mQymcL5a/BrE1BMspBk7kNUdO8TVeGJoCiShOR+DaiuTvKfFQbpHqmoqMzW6/WJ8PgbOQ6XkQlKsBd5IUFaDAbJkQhitdpWgKUg226zLYS/y0KS+TGAvdjc3OKmqamFamtroywWq+gpHY/ZbBnU3GL4FHx+A8r5BeEhrYxM0BFwA2RkgoGAGyAjEwwE3AAZmWAg4AbIyAQDATdARiYYCLgBMjLBQMANkJEJBgJugIxMMPBfChd6NRZ5pkMAAAAASUVORK5CYII=';

await BluetoothEscposPrinter.printPic(img,{width:210});

5705fb2d-b973-4543-8488-f1a7dbb18807

Image printing

Can you share demo with image printing using BluetoothEscposPrinter class? I have crash on printing this image:

data:image/gif;base64,R0lGODlhPQBEAPeoAJosM//AwO/AwHVYZ/z595kzAP/s7P+goOXMv8+fhw/v739/f+8PD98fH/8mJl+fn/9ZWb8/PzWlwv///6wWGbImAPgTEMImIN9gUFCEm/gDALULDN8PAD6atYdCTX9gUNKlj8wZAKUsAOzZz+UMAOsJAP/Z2ccMDA8PD/95eX5NWvsJCOVNQPtfX/8zM8+QePLl38MGBr8JCP+zs9myn/8GBqwpAP/GxgwJCPny78lzYLgjAJ8vAP9fX/+MjMUcAN8zM/9wcM8ZGcATEL+QePdZWf/29uc/P9cmJu9MTDImIN+/r7+/vz8/P8VNQGNugV8AAF9fX8swMNgTAFlDOICAgPNSUnNWSMQ5MBAQEJE3QPIGAM9AQMqGcG9vb6MhJsEdGM8vLx8fH98AANIWAMuQeL8fABkTEPPQ0OM5OSYdGFl5jo+Pj/+pqcsTE78wMFNGQLYmID4dGPvd3UBAQJmTkP+8vH9QUK+vr8ZWSHpzcJMmILdwcLOGcHRQUHxwcK9PT9DQ0O/v70w5MLypoG8wKOuwsP/g4P/Q0IcwKEswKMl8aJ9fX2xjdOtGRs/Pz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IJGQAZcNmdmUc210hs35nCyJ58fgmIKX5RQGOZowxaZwYA+JaoKQwswGijBV4C6SiTUmpphMspJx9unX4KaimjDv9aaXOEBteBqmuuxgEHoLX6Kqx+yXqqBANsgCtit4FWQAEkrNbpq7HSOmtwag5w57GrmlJBASEU18ADjUYb3ADTinIttsgSB1oJFfA63bduimuqKB1keqwUhoCSK374wbujvOSu4QG6UvxBRydcpKsav++Ca6G8A6Pr1x2kVMyHwsVxUALDq/krnrhPSOzXG1lUTIoffqGR7Goi2MAxbv6O2kEG56I7CSlRsEFKFVyovDJoIRTg7sugNRDGqCJzJgcKE0ywc0ELm6KBCCJo8DIPFeCWNGcyqNFE06ToAfV0HBRgxsvLThHn1oddQMrXj5DyAQgjEHSAJMWZwS3HPxT/QMbabI/iBCliMLEJKX2EEkomBAUCxRi42VDADxyTYDVogV+wSChqmKxEKCDAYFDFj4OmwbY7bDGdBhtrnTQYOigeChUmc1K3QTnAUfEgGFgAWt88hKA6aCRIXhxnQ1yg3BCayK44EWdkUQcBByEQChFXfCB776aQsG0BIlQgQgE8qO26X1h8cEUep8ngRBnOy74E9QgRgEAC8SvOfQkh7FDBDmS43PmGoIiKUUEGkMEC/PJHgxw0xH74yx/3XnaYRJgMB8obxQW6kL9QYEJ0FIFgByfIL7/IQAlvQwEpnAC7DtLNJCKUoO/w45c44GwCXiAFB/OXAATQryUxdN4LfFiwgjCNYg+kYMIEFkCKDs6PKAIJouyGWMS1FSKJOMRB/BoIxYJIUXFUxNwoIkEKPAgCBZSQHQ1A2EWDfDEUVLyADj5AChSIQW6gu10bE/JG2VnCZGfo4R4d0sdQoBAHhPjhIB94v/wRoRKQWGRHgrhGSQJxCS+0pCZbEhAAOw=="

the printer prints dot at the beginning of the line

I am trying to print on a bluetooth dpp 350 printer.
The printer is printing correctly. However, a point is leaving at the beginning of each line.

I already tried several encoding and also codepage and I could not remove that point at the beginning of the line.

            let config = {
                encoding: 'ISO8859_1',
                codepage: 1,
                widthtimes: 0,
                heigthtimes: 0,
                fonttype: 1
            }

            await  BluetoothEscposPrinter.printText("Testando impressรฃo!\r\n", config);     
            await  BluetoothEscposPrinter.printText("I need help!\r\n", config);     
            await  BluetoothEscposPrinter.printText("I need help!\r\n", config);     
            await  BluetoothEscposPrinter.printText("I need help!\r\n", config);     
            await  BluetoothEscposPrinter.printText("I need help!\r\n", config);

Please, does anyone know how to remove this point from the beginning of the line?

How can I balance the columnWidths?

I have tried to print for printing column but the width of columns display wrong.
I want to balance the width of the columns. How can I resolve it?

If you see the example below, You will see the price is not balance.

This is an example that I got.
s__3907588

usb thermal printer

Hi,
Thanks for your work.
Does the package work with a usb thermal printer?
if not, would you be able to refer me to a proper package?
Thanks

Text split

Hi! How make text split in two columns, like

<View style={{flexDirection: 'row', justifyContent:'space-between', flex:1}}/>
  <Text>1</Text>
  <Text>2</Text>
</View>

I use this code:

const textConfig = {
      encoding: 'UTF-8',
      codepage: 0,
      widthtimes: 0,
      heigthtimes: 0,
      fonttype: 0
    }

BluetoothEscposPrinter.printerAlign(BluetoothEscposPrinter.ALIGN.LEFT)
BluetoothEscposPrinter.printText('1:', textConfig)
BluetoothEscposPrinter.printerAlign(BluetoothEscposPrinter.ALIGN.RIGHT)
BluetoothEscposPrinter.printText('2', textConfig)
BluetoothEscposPrinter.printText('\n', textConfig)

But get
1:2 aligned to right side of paper

align

Error while compiling

Hi, seems a nice package! Unfortunately i've got an error while compiling the package:

> Task :react-native-bluetooth-escpos-printer:compileDebugJavaWithJavac FAILED /Users/jeffreyvanhees/Projects/emeals_terminal/node_modules/react-native-bluetooth-escpos-printer/android/src/main/java/cn/jystudio/bluetooth/tsc/TscCommand.java:372: error: cannot find symbol public void add1DBarcode(int x, int y, BARCODETYPE type, int height, READABEL readable, ROTATION rotation, ^ symbol: class READABEL location: class TscCommand /Users/jeffreyvanhees/Projects/emeals_terminal/node_modules/react-native-bluetooth-escpos-printer/android/src/main/java/cn/jystudio/bluetooth/tsc/RNBluetoothTscPrinterModule.java:190: error: cannot find symbol private TscCommand.READABEL findReadable(int readable) { ^ symbol: class READABEL location: class TscCommand Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: /Users/jeffreyvanhees/Projects/emeals_terminal/node_modules/react-native-bluetooth-escpos-printer/android/src/main/java/cn/jystudio/bluetooth/tsc/TscCommand.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 2 errors

FAILURE: Build failed with an exception.

Location permission in module

Hi

When i use your module, app asks me allow location permission.
I do not know why this module need location permission? please can you give me detail.

I found this code in android module:

int permissionChecked = ContextCompat.checkSelfPermission(reactContext, android.Manifest.permission.ACCESS_COARSE_LOCATION);
if (permissionChecked == PackageManager.PERMISSION_DENIED) {
// // TODO: 2018/9/21
ActivityCompat.requestPermissions(reactContext.getCurrentActivity(),
new String[]{android.Manifest.permission.ACCESS_COARSE_LOCATION},
1);
}
Thanks so much

framesToPop: 1, code: EUNSPECIFIED

when I am calling
BluetoothEscposPrinter.printerAlign(BluetoothEscposPrinter.ALIGN.CENTER)
.then(() => alert('success')).catch(err => alert(JSON.stringify(err)))

also, function to initialize printer is not found :(

How can I print larger English word font size?

Hi
I would like to print larger English font size.
The example are able to print large chinese font size, but when come to Alphabet it was not able to do so.

This was my code:
image

And this is the result:
image

COMPATIBLE PRINTERS

printLabel undefined is not a function

When I am running BluetoothTscPrinter.printLable function. warning comes up with "undefined is not a function". I think you have implemented BluetoothTscPrinter package yet.
all other commands are working as they are called with BluetoothEscposPrinter, for Example, this BluetoothEscposPrinter.printText("Hello world\n\r",{}); works completely fine.

How to print table view, like orders details with Items, price and total price

I can see that we can use print column method, like below

await BluetoothEscposPrinter.printColumn(columnWidths, [ BluetoothEscposPrinter.ALIGN.LEFT, BluetoothEscposPrinter.ALIGN.CENTER, BluetoothEscposPrinter.ALIGN.CENTER, BluetoothEscposPrinter.ALIGN.RIGHT, ], ['Order Id', 'Item', 'Price', 'test'], {});

my doubt is what is this emoty object parameter in the end. what I can pass into it.

Printer inmediatly disconnects after first connection

I get this error when trying to connect to the printer. It is working with other models but not with this 3nStar PPT200BT
It connects correctly, but then it disconnects.
Why could this happen? I tested this printer with apps from Play Store and it is working, but not with the example from this repository (which it works with others printers I am testing)

Undefined is not an object BluetoothTscPrinter.Direction

hello, i added your package through yarn add, does adding that way causing the library to break or something?

i don't really use BluetoothTscPrinter on my screen, even tho i excluded it. the error came from index.js in the library.

Screenshot_20190403-125830_Aulia

my MainApplication.java
`package com.rnfirebasedemo;

import android.app.Application;

import com.facebook.react.ReactApplication;
import cn.jystudio.bluetooth.RNBluetoothEscposPrinterPackage;
import com.learnium.RNDeviceInfo.RNDeviceInfo;
import com.oblador.vectoricons.VectorIconsPackage;
import com.kishanjvaghela.cardview.RNCardViewPackage;
import com.swmansion.gesturehandler.react.RNGestureHandlerPackage;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
import com.facebook.soloader.SoLoader;

import java.util.Arrays;
import java.util.List;

public class MainApplication extends Application implements ReactApplication {

private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
@OverRide
public boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
}

@Override
protected List<ReactPackage> getPackages() {
  return Arrays.<ReactPackage>asList(
      new MainReactPackage(),
        new RNBluetoothEscposPrinterPackage(),
        new RNDeviceInfo(),
        new VectorIconsPackage(),
        new RNCardViewPackage(),
        new RNGestureHandlerPackage()
  );
}

@Override
protected String getJSMainModuleName() {
  return "index";
}

};

@OverRide
public ReactNativeHost getReactNativeHost() {
return mReactNativeHost;
}

@OverRide
public void onCreate() {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
}
}
`

my MainActivity.java
`package com.rnfirebasedemo;
import android.content.Intent;

import com.facebook.react.ReactActivity;

public class MainActivity extends ReactActivity {
/**
* Returns the name of the main component registered from JavaScript.
* This is used to schedule rendering of the component.
*/
@OverRide
protected String getMainComponentName() {
return "rnFirebaseDemo";
}
}
`

Would be grateful if anyone could provide any solution for this. thanks!

How do I know Printer paper roll is finished?

Is there any way to know if there is an error in printing the bill when paper roll is finished. For now, if I try printing and printer is in error state, because printing paper got finished.
Promise never resolves for this case?

Please suggest me a way to solve this problem

error

Could not resolve all files for configuration ':app:debugRuntimeClasspath'.

Could not find any version that matches com.facebook.react:react-native:0.55+.
Versions that do not match:
0.20.1
0.20.0
0.19.1
0.19.0
0.18.0
+ 13 more
Searched in the following locations:
file:/Users/i/Library/Android/sdk/extras/m2repository/com/facebook/react/react-native/maven-metadata.xml
file:/Users/i/Library/Android/sdk/extras/m2repository/com/facebook/react/react-native/
file:/Users/i/Library/Android/sdk/extras/google/m2repository/com/facebook/react/react-native/maven-metadata.xml
file:/Users/i/Library/Android/sdk/extras/google/m2repository/com/facebook/react/react-native/
file:/Users/i/Library/Android/sdk/extras/android/m2repository/com/facebook/react/react-native/maven-metadata.xml
file:/Users/i/Library/Android/sdk/extras/android/m2repository/com/facebook/react/react-native/
https://jitpack.io/com/facebook/react/react-native/maven-metadata.xml
https://jitpack.io/com/facebook/react/react-native/
https://maven.google.com/com/facebook/react/react-native/maven-metadata.xml
https://maven.google.com/com/facebook/react/react-native/
https://oss.sonatype.org/content/repositories/snapshots/com/facebook/react/react-native/maven-metadata.xml
https://oss.sonatype.org/content/repositories/snapshots/com/facebook/react/react-native/
https://dl.google.com/dl/android/maven2/com/facebook/react/react-native/maven-metadata.xml
https://dl.google.com/dl/android/maven2/com/facebook/react/react-native/
file:/Users/i/.m2/repository/com/facebook/react/react-native/maven-metadata.xml
file:/Users/i/.m2/repository/com/facebook/react/react-native/
https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml
file:/Users/i/fuwuqi/works/eryiSY/node_modules/react-native/android/com/facebook/react/react-native/maven-metadata.xml
Required by:
project :app > project :react-native-bluetooth-escpos-printer

PrintPic weird character 'B'

Can somebody help me with this?

I tried PrintPic and it is working correctly. However after the image it prints a weird 'B' character at the end of line (don't know why). How do i get rid of it?

I'm using the library v0.0.5 btw and this is the image and codes I used:

    _printImage = async (img) => {
        try{
            await BluetoothEscposPrinter.printPic(img,{width:250,left:50});
        }catch(e){
          alert(e.message || "ERROR")
        }      
    }
const BASE64_LOGO = "/9j/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCAGQAZADASIAAhEBAxEB/8QAHAABAAICAwEAAAAAAAAAAAAAAAcIAQYDBAUC/8QAUhAAAgECAwMGBg0ICAUFAQAAAAECAwQFBhEHITESQVFhcYEIExQikaEVFyMyN0JSVJSxs8HRFiRicnWSk9IzNUNTVYKisjQ2dMLhJ2Nkc4Tw/8QAGwEBAAIDAQEAAAAAAAAAAAAAAAUGAwQHAgH/xABAEQABAwICBQcJBwMFAQAAAAAAAQIDBAURIQYSMUFRExQyYXGRoRUWIlOBscHR4SMzQlJUYvAXJPElJjQ1ckP/2gAMAwEAAhEDEQA/ALUgAAAAAAAAAAAAAAAAAAAAAGJSUVq2kgDINPzNtGy1l5yheYhCrcR/sLf3SevQ0ty72iLMw7d7yq5U8Aw2nQhzVbp8uWn6sdEvSzWlq4oukpM0Ngr67BYo1w4rkniWCcklq9yPExfNWBYQmsSxazt5r4k6qUv3eJVHG88ZkxpyV/jF1KnLjSpy8XD92Oifea3z7zRkuqfgaWuk0BeudTLh1InxUtBiW2rKlpqred3eyW73Gi0vTPkmrYht8Sk1h+BykuaVeul6lF/WQQDUdcpl2ZE/BoVbYk9JFcvWvyJZu9uuY6jatrLDaMf0oTk/9yPKuNsWb62vJu7ej+pQj9+pHYMK1ky/iUk2aOWxiZQt95u89qmc5P8ArqS6lb0v5T5W1LOS4Y3U76FL+U0oHnnMv5lM3kO3+ob3Ib9R2t5xpvzsThU/Xt6f3JHpW227NNHTxlPD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xveh4wNho5JzPWaUMAxNfrW8o/Wkejb7Ms4V2uRglaPXOpCP1yR6SCRdjVMMl1oo0xdM1PahpoJOsdima7nTxvkFsufxlZtr91M2TDdgdblJ4ljUVHnhQo/e39xmbQzu/CR8+lFrh2yovZmQafVOEqk4wpxlKcnooxWrbLP4VsWyrZtO4hdX0lv93q6L0R5Ju+E5dwfCIcnDMNtLXdo3SpKLfa1vZtR2t69NcCCqtPKZmVPGrl68kKsYBs1zTjUouhhdW3pS/tbr3JLufnPuRJ2W9hFtS5NTMOIzryW90bZciHY5Pe12aE3aGTdit8TM1zKtXaY3GqxaxUYnVt7zxcv5ZwfL9BUsIw+3tlpo5Rj58u2T3vvZ7QBvNajUwQq8kj5Xaz1xXrAAPp4AAAAAAAAAAAAAAAAAAP/Z";

//then:
//some codes...
		     this._printImage(BASE64_LOGO);

can anyone who've faced the issue help or can someone try this? Any suggestion/help is much appreciated!

Build error

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not resolve all files for configuration ':app:debugRuntimeClasspath'.

Could not find any version that matches com.facebook.react:react-native:0.55+.
Versions that do not match:
0.20.1
0.20.0
0.19.1
0.19.0
0.18.0
+ 13 more

"react": "16.6.1",
"react-native": "0.57.5",

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.