thiendangit / react-native-thermal-receipt-printer-image-qr

React native thermal receipt printer
https://www.npmjs.com/package/react-native-thermal-receipt-printer-image-qr
111 stars 73 forks source link

when usein NetPrinter found White lines printImageBase64 #103

Open yaser-elbatal opened 1 year ago

yaser-elbatal commented 1 year ago

bill

CalmNguyen commented 11 months ago

sorry My English isn't good, i use Normal in IOS, i don't have White Lines in text and Image. But i can't use function printImageBase64 in IOS, this function isn't defind. Do you use thí function?

yaser-elbatal commented 11 months ago

ya i use it (printImageBase64) Because I take a screenshot first and then print it as a image @CalmNguyen

sorry My English isn't good, i use Normal in IOS, i don't have White Lines in text and Image. But i can't use function printImageBase64 in IOS, this function isn't defind. Do you use thí function?

CalmNguyen commented 11 months ago

Hi I use it, it work fine all print image and print image base 64 in ios, just one white / image.

yaser-elbatal commented 11 months ago

Hi I use it, it work fine all print image and print image base 64 in ios, just one white / image.

let me show your code please ?

CalmNguyen commented 11 months ago

const captureView = async (listViewShotRef, length) => { // console.log(PERMISSIONS.IOS.PHOTO_LIBRARY) // return const temp = [] for (let i = 0; i < length; i++) { if (listViewShotRef[i].current) { try { const base64Data = await listViewShotRef[i].current.capture(); const fileData = await RNFS.readFile(base64Data, 'base64'); temp.push({ image: fileData }) } catch (error) { console.error('Error capturing view:', error); } } } setListImageBase64(temp) console.log(temp) return temp || []

};
CalmNguyen commented 11 months ago

i think because your printer. If i print text, it would worked nice, just a white line/ image if i use printImageBase64. If using in android all good

CalmNguyen commented 11 months ago

await BLEPrinter.printText(printTxt, {}); await BLEPrinter.printText(${CENTER}QR Code, {});

yaser-elbatal commented 11 months ago

i think because your printer. If i print text, it would worked nice, just a white line/ image if i use printImageBase64. If using in android all good

android and ios the same issues and i use NET printer not BLE

CalmNguyen commented 11 months ago

Sorry, I just BLE

yaser-elbatal commented 9 months ago

@thiendangit

yaser-elbatal commented 9 months ago

any update here