mike42 / escpos-php

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

Error while connecting print using USB in windows #1067

Open RachanaTri opened 3 years ago

RachanaTri commented 3 years ago

Hello I am developing laravel based website and used this package for printing receipt. 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

Muraveiko commented 3 years ago

your website is hosted on the local network of the organization and the printer is connected to the USB port on the server?

RachanaTri commented 3 years ago

No, website is on localhost and printer is attached using USB with laptop.

rochelo commented 2 years ago

Encontraron la solucion??