PHP escpos Печать

Может кто-нибудь, пожалуйста, помогите?

Привет ,
Я использую «EPSON TM-T82II Receipt» для печати счетов. Я использую код php

 <?php
require_once(dirname(__FILE__) . "/Escpos.php");
try {

$connector = null;
$connector = new WindowsPrintConnector("EPSON TM-T82II Receipt");
/* Print a "Hello world" receipt" */
$printer = new Escpos($connector);
$printer -> text("Hello World!\n");
$printer -> cut();

/* Close printer */
$printer -> close();
} catch(Exception $e) {
echo "Couldn't print to this printer: " . $e -> getMessage() . "\n";
}
Iam getting this error "Couldn't print to this printer: Printer

‘EPSON TM-T82II Receipt’ недействителен. Использовать локальный порт (LPT1, COM1 и т. Д.)
или smb: // нотация компьютера / принтера. «

0

Решение

Вы должны сделать именно так, как говорит ошибка — вместо WindowsPrintConnector("EPSON TM-T82II Receipt")нужно использовать WindowsPrintConnector("LPT1") или же WindowsPrintConnector("smb://XXX")где XXX — это сетевой путь вашего принтера.

0

Другие решения

Других решений пока нет …

По вопросам рекламы ammmcru@yandex.ru
Adblock
detector