mike42 / escpos-php

PHP library for printing to ESC/POS-compatible thermal and impact printers
Other
2.53k stars 860 forks source link

Support for Japanese text on Epson TM-T20II (Japanese) #478

Open JefferyHus opened 6 years ago

JefferyHus commented 6 years ago

Hi I have tried many solutions suggested in the Issues tab, I couldn't print Japanese to the printer, however the printer does support all Code Pages of Japanese, but the Library doesn't, but only the half-width Katakana. Is there a way of doing it please.

JefferyHus commented 6 years ago

any update?

mike42 commented 6 years ago

You are correct, only half-width Katakna has been implemented, I don't have a Japanese Epson model to test some of the Japanese-only commands on.

Would you mind sharing your exact printer model and some example text that you are trying to print?

JefferyHus commented 6 years ago

Hi thanks for your feed back, for the exact model of my printer, this is it Epson TM-T20II Bluethooth & USB Receipt Printer (M249A). This a text example that I try to print: 訪問していただきありがとうございます

I have tried to use direct commands and failed even if I follow their document, I hope you can help me on this, I will be grateful.

mike42 commented 6 years ago

Most users can't test the Epson Japanese print commands on their printer (including me), which is probably why they haven't been implemented in this library.

We get a lot of bugs relating to specific languages and printers, so I mainly put my time into implementing things that might solve this issue for all of our users. I'm currently working on improved CJK rendering for any Epson printers using Unifont as a base rather than printer native fonts.

Early results are good. They might be a long way away from getting integrated this library, but you can experiment in the meantime, or maybe even help integrate this into escpos-php :)

echo "訪問していただきありがとうございます" | php unifont-example.php > /dev/usb/lp0
JefferyHus commented 6 years ago

thanks I will try to test this and back to you ^^