escpos-php
escpos-php copied to clipboard
printing very slow for arabic char
i am using pos printer i send data by ethernet "ip" but the printing process is very slow for arabic character
Hi,
It's not clear to me whether you are using escpos-php. If so, can you please share a minimal, self-contained PHP example which shows the problem, and describe the printing hardware and platform you're running on?
hi sir, i used more than one printer type and same resulkt i get , i used xprinter and tysso printer , and here is my code idk where is the delay
`$textUtf8 = "$food"; $maxChars = 80; $fontSize = 40;
mb_internal_encoding("UTF-8"); $Arabic = new \I18N_Arabic('Glyphs');
$textLtr = $Arabic -> utf8Glyphs("\n".$textUtf8, $maxChars); $textLine = explode("\n", $textLtr);
$noteLtr = $Arabic -> utf8Glyphs("\n".$note, $maxChars); $notetLine = explode("\n", $noteLtr);
date_default_timezone_set("Asia/baghdad");
try {
$buffer = new ImagePrintBuffer();
} catch (\Exception $e) {
}
$buffer -> setFont($fontPath);
$buffer -> setFontSize($fontSize); $profile = CapabilityProfile::load("default"); try { $connector = new NetworkPrintConnector($ip, 9100); } catch (\Exception $e) { }
$printer = new Printer($connector, $profile);
$printer -> setPrintBuffer($buffer); $printer -> setJustification(Printer::JUSTIFY_CENTER); $printer->text("(".$tbnum.")"."\n"); $printer->text($kordtype);
$printer -> setJustification(Printer::JUSTIFY_RIGHT); $printer->text("no:".$id." ".date("m-d h:i"));
foreach($textLine as $text) {
$printer -> text($text . "\n");
}
$printer -> cut(); $printer -> close();
return true;`
I18N_Arabic
can you show. me how did. you invoke I18N_Arabic?