Open aasuparekh1 opened 9 months ago
Seems not. I am trying out this repo instead -- https://github.com/pajkho/react-native-thermal-receipt-printer-image-qr/tree/main/example -- works pretty well but requires legacy peer deps, so needs to be updated. Can print images and QRs.
you can use it in latest repo, just have to update method in node-modules after install it
Hello , how i can use this library for print a qrcode too , need some help . this one looks great if u guys have some way to print qrcode a i'll be very grateful
const [printers, setPrinters] = useState([]); const [currentPrinter, setCurrentPrinter] = useState();
useEffect(() => { BLEPrinter.init().then(()=> { BLEPrinter.getDeviceList().then(setPrinters); }); }, []);
_connectPrinter => (printer) => { //connect printer BLEPrinter.connectPrinter(printer.inner_mac_address).then( setCurrentPrinter, error => console.warn(error)) }
printTextTest = () => { currentPrinter && USBPrinter.printText("sample text \n");
}
printBillTest = () => { currentPrinter && USBPrinter.printBill("sample bill ");
}
...
return (
)