douhuanglou1445 2015-09-15 06:51
浏览 158
已采纳

PHP escpos打印

Can anyone please help?

Hi , Iam using "EPSON TM-T82II Receipt" to print bills.Iam using the php code

 <?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!
");
$printer -> cut();

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

'EPSON TM-T82II Receipt' is not valid. Use local port (LPT1, COM1, etc) or smb://computer/printer notation. "

  • 写回答

1条回答 默认 最新

      报告相同问题?

      相关推荐 更多相似问题

      悬赏问题

      • ¥20 如何按照企业名字进行爬虫
      • ¥15 关于#单片机#的问题,如何解决?
      • ¥100 制作短链接和api接口的
      • ¥15 星河亮点sp9500测试指导
      • ¥15 dataframe 某列数据分列
      • ¥15 风扇导入fluent后仿真压力和速度数据卡在旋转域
      • ¥15 echarts中dataZoom报错
      • ¥15 求解答:《前端综合基础》作为一门课程的话,应该包含哪些内容?
      • ¥15 软件原型系统开发+实例测试
      • ¥50 C#上位机调试Win USB