mike42 / escpos-php

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

copy(\\DESKTOP-O2ERE3M\EPSON TM-T82 Receipt): failed to open stream: No such file or directory #881

Open lebroncho opened 4 years ago

lebroncho commented 4 years ago

Hello. When I test first on my local computer it works fine, it would print. But when I deploy it on the server, it would produce an error copy(\\DESKTOP-O2ERE3M\EPSON TM-T82 Receipt): failed to open stream: No such file or directory. The printer is already a shared one. So for short, I'm trying to print the receipt remotely over the internet after I deploy my website on the server.

$connector = new WindowsPrintConnector("EPSON TM-T82 Receipt");
$printer = new Printer($connector);
$printer -> text("Hello World\n");
$printer -> cut();
$printer -> close();

I'm using Laravel framework and in my windows server I also use XAMPP

iohaneiro commented 2 years ago

I had the same error, follow the Mike's guide https://mike42.me/blog/2015-04-getting-a-usb-receipt-printer-working-on-windows the error is a missing configuration to share the printer with the same nane you call it