mike42 / escpos-php

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

Xprinter XP-Q800 Turkish characters Problem #771

Open rapcrown opened 5 years ago

rapcrown commented 5 years ago

My problem turkish Charters

where is profile ? $profile = CapabilityProfile::load("TUP500");

`
$connector = null; $connector = new WindowsPrintConnector("kasayazici"); $printer = new Printer($connector,);

    /* Information for the receipt */
    $items = array(
        new yaziciveri("Example item #1", "4.00"),
        new yaziciveri("Another thing", "3.50"),
        new yaziciveri("Something else", "1.00"),
        new yaziciveri("A final item", "4.45"),
    );
    $subtotal = new yaziciveri('Subtotal', '12.95');
    $tax = new yaziciveri('A local tax', '1.30');
    $total = new yaziciveri('Total', '14.25', true);

    $date = "Monday 6th of April 2015 02:56:25 PM";

    $printer = new Printer($connector);

    /* Name of shop */
    $printer -> selectPrintMode(Printer::MODE_DOUBLE_WIDTH);
    $printer -> text("ExampleMart Ltd.\n");
    $printer -> selectPrintMode();
    $printer -> text("Shop No. 42.\n");
    $printer -> feed();

    /* Title of receipt */
    $printer -> setEmphasis(true);
    $printer -> text("SALES INVOICE\n");
    $printer -> setEmphasis(false);

    /* Items */
    $printer -> setJustification(Printer::JUSTIFY_LEFT);
    $printer -> setEmphasis(true);
    $printer -> text(new yaziciveri('', '$'));
    $printer -> setEmphasis(false);
    foreach ($items as $item) {
        $printer -> text($item);
    }
    $printer -> setEmphasis(true);
    $printer -> text($subtotal);
    $printer -> setEmphasis(false);
    $printer -> feed();

    /* Tax and total */
    $printer -> text($tax);
    $printer -> selectPrintMode(Printer::MODE_DOUBLE_WIDTH);
    $printer -> text($total);
    $printer -> selectPrintMode();

    /* Footer */
    $printer -> feed(2);
    $printer -> setJustification(Printer::JUSTIFY_CENTER);
    $deneme = "Bizleri Tercih Ettiğiniz İçin Teşekkürler\n";
    $printer -> text($deneme);

    $printer -> text("Tekrar görmek isteriz LÜTFEN BİZİMLE KALIN\n");
    $printer -> feed(2);
    $printer -> text($date . "\n");

    $printer -> cut();
    $printer -> pulse();
    $printer -> close();`
rapcrown commented 5 years ago

Not write İ Ş Ğ please help me :)

rapcrown commented 5 years ago

@mike42

asilbalaban commented 4 years ago

any update i have same issue

rapcrown commented 4 years ago

any update i have same issue

Bütün yazıları TR TO İng yaparak geçici bir çözüm üretebilirsin bunun dışında bir çözüm bulamadım.

asilbalaban commented 4 years ago

connect device via usb and set language code to 62 after that, you can set compability like this $profile = CapabilityProfile::load("TUP500"); and everything ok