Arabic String not work with thermal printer
See original GitHub issueI use this function to add Persian text :
.setText("سلام : HELLO")
.setEmphasizedMode(DefaultPrinter.EMPHASIZED_MODE_BOLD) //Bold or normal
.setFontSize(DefaultPrinter.FONT_SIZE_NORMAL)
.setUnderlined(DefaultPrinter.UNDERLINED_MODE_OFF) // Underline on/off
.setCharacterCode(byte) // Character code to support languages
.setLineSpacing(DefaultPrinter.LINE_SPACING_30)
.setNewLinesAfter(1)
printableList.add(printable.build())```
But only some incomprehensible text is printed.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
C# Thermal Printer Doesn't Print Arabic Characters
Yes i can print from notepad and word Arabic texts. I'm using to print a library called ESCPOS_NET. Well there's your problem, ...
Read more >ESC/POS thermal printers showing incorrect Arabic characters
My client says it broke the cursive writing style of Arabic and therefore while it might be correct alphabetically, it is still wrong...
Read more >EOS thermal printer does not print Arabic characters properly ...
Coding example for the question EOS thermal printer does not print Arabic characters properly when using Flutter framework-Flutter.
Read more >Writing arabic caracters using textstream to receipt printer
Hi, Is there a way to write arabic caracters using textstream to a receipt printer.? I can write arabic caractere using paradox report,...
Read more >How to print Arabic with Android Printing SDK to ESC/p
First, an Arabic font like Arabs or DOS864 font with codepage 864 or ISO-8859-6 needs to be installed on the printer running ESC/P....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@iman2420 Finally I was able to fix this by passing a custom converter, it was already built with the library ArabicConverter() like this
.setCustomConverter(ArabicConverter())
It is worth mentioning that CP864 codepage value might be different from printer company to another, CHARCODE_ARABIC_CP864 in the library equals to 0x0E, but with my printer company it was 22 inside their codepage table so you might need to check your printer documentation, then pass the custom character code like this.setCharacterCode(22)
جرب كده