escpos-php icon indicating copy to clipboard operation
escpos-php copied to clipboard

Turkish Character Problem

Open cfttfc opened this issue 6 years ago • 6 comments
trafficstars

Turkish character has problem

1 2

3

cfttfc avatar Mar 02 '19 10:03 cfttfc

It looks like you could be using a Rongta 58mm printer. Which exact make/model is it?

Character encoding is printer-specific, and there is no profile for your printer in the escpos-printer-db which we use. If you would like to get this fixed quickly, please follow these instructions.

The vendor publishes some documentation here, which seems to line up with the information in your post.

image

mike42 avatar Mar 03 '19 03:03 mike42

I've typed this information into a new printer profile.

It will be a few days before I have time to do a new escpos-php release. In the meantime, can you test it?

  • Replace src/Mike42/Escpos/resources/capabilities.json in your copy of escpos-php with this version.
  • Change your code to CapabilityProfile::load("RP326")
  • See if you can print.
  • If you have any issues, replace WindowsPrintConnector with FilePrintConnector, write the data to a file (eg. "test.bin" or similar), and attach it to this issue with the corresponding PHP code, so that we can debug further.

mike42 avatar Mar 03 '19 10:03 mike42

Could you describe what you mean by thin?

There is no ESC/POS command for thin text, but you can stretch text vertically with the smaller "Font B".

<?php
require __DIR__ . '/vendor/autoload.php';

use Mike42\Escpos\EscposImage;
use Mike42\Escpos\Printer;
use Mike42\Escpos\PrintConnectors\FilePrintConnector;

$tux = EscposImage::load("example/resources/tux.png");

$connector = new FilePrintConnector("foo.bin");
$printer = new Printer($connector);

$printer->text("Normal text\n");
$printer->selectPrintMode(Printer::MODE_DOUBLE_HEIGHT);
$printer->text("Double height\n");
$printer->selectPrintMode(Printer::MODE_DOUBLE_HEIGHT);
$printer->setTextSize(1,3);
$printer->text("Triple height\n");

$printer->selectPrintMode(Printer::FONT_B);
$printer->text("Font B text\n");
$printer->selectPrintMode(Printer::FONT_B | Printer::MODE_DOUBLE_HEIGHT);
$printer->text("Double height Font B\n");
$printer->setFont(Printer::FONT_B);
$printer->setTextSize(1,3);
$printer->text("Triple height Font B\n");

$printer->cut();
$printer->close();

image

mike42 avatar Mar 05 '19 10:03 mike42

cfttfc merhaba bir konuda bana yardımcı olabilirmisiniz. [email protected]

turuygur avatar Apr 15 '19 11:04 turuygur

Text How do I do Thin. ?

İ harfi sorununu nasıl çözdün bro varsa bir çözümü bizede aktarırmısın ?

rapcrown avatar Jul 21 '19 12:07 rapcrown

THANK YOU fixed

can i know your encode value???

dinesh-krish avatar Aug 04 '20 07:08 dinesh-krish