New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Greek character printing #50
Comments
Hi, I think you're the first person to try getting this printer working (definitely the first to try it in Greek anyway). We most likely need to assemble a Do you have any documentation available which contains a list of supported code pages for the P-822D? A quick Google search doesn't turn up much. |
Perfect, I'll post the CapabilityProfile and a test receipt when ready. Hopefully we can get this model of printer working. |
Great, thank you. |
Ok, I've added a profile matching this list of code pages. Can you pull and let me know what the output of the example (If it doesn't render correctly yet, then I'll get you to run some code snippets for debugging) <?php
/* Example of Greek text on the P-822D */
require_once(dirname(__FILE__) . "/../../Escpos.php");
// Setup the printer
$connector = new FilePrintConnector("php://stdout");
$profile = P822DCapabilityProfile::getInstance();
$printer = new Escpos($connector, $profile);
// Print a Greek pangram
$text = "Ξεσκεπάζω την ψυχοφθόρα βδελυγμία";
$printer -> text($text . "\n");
$printer -> cut();
// Close the connection
$printer -> close(); |
Hmm. It's not at all obvious to me why Chinese text appears when your printer tries to work with these code pages. From what I can find about related models on Google, DIP switches are something we may need to tweak here. Two things-
|
I'm closing this issue off, as it's likely to relate to the reporter's printer config. You may need to contact the vendor for advice about how to disable this Chinese text output. For others, the general way to print most European languages with this driver is to simply send in UTF-8- <?php
require __DIR__ . '/../../autoload.php';
use Mike42\Escpos\Printer;
use Mike42\Escpos\CapabilityProfiles\DefaultCapabilityProfile;
use Mike42\Escpos\PrintConnectors\FilePrintConnector;
// Setup the printer
$connector = new FilePrintConnector("php://stdout");
$profile = DefaultCapabilityProfile::getInstance();
$printer = new Printer($connector, $profile);
// Print a Greek pangram
$text = "Ξεσκεπάζω την ψυχοφθόρα βδελυγμία";
$printer -> text($text . "\n");
$printer -> cut();
// Close the connection
$printer -> close(); Result (TM-T20II): In the case of the P-822D, See also #62 |
Worked for me with NetworkPrintConnector $text = iconv('UTF-8', 'ISO-8859-7', "ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΧΩ"); |
Hello, I am using P-822D Thermal printer and everything is working great except from printing Greek characters (the are displayed as chinese)
Is there any settings i can do?
Thank you
The text was updated successfully, but these errors were encountered: