mike42 / escpos-php

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

Getting connection issue with using Epson_TM_m30II_NT printer #1066

Open RachanaTri opened 3 years ago

RachanaTri commented 3 years ago

Hello all, We are developing laravel website and want to use Epson_TM_m30II_NT printer for printing receipt. but connection issue is coming. Please suggest the solution

Getting error : Command lpstat -a failed: sh: 1: lpstat: not found We are using connector_type = cups and connector_description = Epson_TM_m30II_NT

printer_issue

kastriotgashi commented 3 years ago

Where did you find your printers connector descriptor

RachanaTri commented 3 years ago

It's the printer model name IMG_20210510_134004

RachanaTri commented 3 years ago

Also I have tried using XP-80 printer with windows I have connected XP-80 printer using USB, but it is giving me error : copy(\computer\XP-80): failed to open stream: No such file or directory

Here is my code ; use Mike42\Escpos\Printer; use Mike42\Escpos\PrintConnectors\WindowsPrintConnector; $connector = new WindowsPrintConnector("smb://computer/XP-80"); $printer = new Printer($connector); $printer -> text("Hello World!\n"); $printer -> cut(); $printer -> close();

Please suggest what I am missing. Thank You

mwellianainova commented 2 years ago

It's depend on your environment. WindowsOS, use WindowsPrintConnector MacOS, use CupsPrintConnector

This error Command lpstat -a failed: sh: 1: lpstat: not found is happened because you try to run the CupsPrintConnector other than MacOS