You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to print Arabic text on a POS printer.
i have tried both "star" and "Epson" types
and i have tested on both wpc1256_arabic and pc864_arabic .
Printing in English is working fine. printing images using <Image src.. /> also works fine.
but when I try to print an Arabic text, it shows an unknown character. (not ???)
Printer function:
constprinter=async()=>{if(!printerState){// connecting to printer
....setPrinterState(()=>characteristic);
....}printing();};
Printing function
constprinting=async()=>{constdata=awaitrender(<Printertype="star"width={88}characterSet="wpc1256_arabic"><Text>مرحبا بك في رياكت</Text></Printer>);// Print the data in chunksawaitprintChunks(printerState,data);};
printChunks function:
constsendChunk=async(printerState,chunk)=>{try{awaitprinterState.writeValueWithResponse(chunk);}catch(error){console.error(`Error sending data chunk: ${error}`);throwerror;}};
Hi @mustafa-altai77, unfortunately no.
but there is something I didn't try which is converting it to an image and printing it.
I think this would work but it will take more time to develop (which I didn't have).
I'm trying to print Arabic text on a POS printer.
i have tried both "star" and "Epson" types
and i have tested on both
wpc1256_arabic
andpc864_arabic
.Printing in English is working fine. printing images using
<Image src.. />
also works fine.but when I try to print an Arabic text, it shows an unknown character. (not
???
)Printer function:
Printing function
printChunks function:
Printer trigger:
The text was updated successfully, but these errors were encountered: