Open dadhaniamitul opened 5 years ago
This is a server-side print library, and I'm guessing that your dedicated server does not have a printer connected to it.
I would suggest sharing the printer, and printing over the LAN (put the PHP instance on the same LAN as the printers it is going to print to). You can use new WindowsPrintConnector("smb://user:password@host/printer")
over the LAN from a Windows or Linux host.
We also have information in the FAQ under "Can I print from my server on the Internet?. Internet printing is possible, but it's a lot more work to securely and reliably.
Remember that PHP runs on the server, not your browser!
I need to print receipt by using esc-pos PHP library. So my code is working fine in localhost but in dedicated sever its giving "Couldn't print to this printer: Failed to copy file to printer" error. I have used WindowsPrintConnector
$connector = new WindowsPrintConnector('XP-80C');