Open komailabbas12 opened 2 years ago
@lcang121 Hi thank you for your help. please guide me.
1) which package you use for buffer 2) where i find this value ['\u001B', '\u0070', '\u0000', '\u0025', '\u0250']. for my cash drawer or this is static for all cash drawer
@lcang121
@komailabbas12 have you tried the COMMAD given by this library? like import { COMMANDS, } from 'react-native-thermal-receipt-printer-image-qr';
COMMANDS.CASH_DRAWER.CD_KICK_2; OR COMMANDS.CASH_DRAWER.CD_KICK_5; Let me know if this solutions works for you. FYI @lcang121
@MaheshKaemSolutions yaah and its working
const openDrawerBuffer = new Buffer( ['\u001B', '\u0070', '\u0000', '\u0025', '\u0250'].join('') ); USBPrinter.printRaw(openDrawerBuffer.toString('base64'));
and import is below
import { Buffer } from 'buffer' import { ColumnAliment, COMMANDS, USBPrinter } from 'react-native-thermal-receipt-printer-image-qr';
Thank you @MaheshKaemSolutions @lcang121
is it working on IOS @komailabbas12 @lcang121 ?
the library doesn't have a method to open cash drawer. I'm using this to open the drawer instead:
const openDrawerBuffer = new Buffer( ['\u001B', '\u0070', '\u0000', '\u0025', '\u0250'].join('') ); USBPrinter.printRaw(openDrawerBuffer.toString('base64'));