mike42 / escpos-php

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

not printing online #846

Open shafkatkhan opened 4 years ago

shafkatkhan commented 4 years ago

printer is printing on localhost, not online

mike42 commented 4 years ago

There's not much to work from here.

Would you mind sharing a snippet of PHP which shows the problem, and explain how you've verified that your server is able to get data to your printer?

mutiemule commented 2 years ago

Printing on local will work well with this package.

However, to print online, you will need to develop a desktop service which has to be installed on the local computer where you need printing to be done. Operating System does not matter in this case, you can be hosting on Linux based server and printing on a windows server. This desktop service interfaces between the online service and the local service.

I resolved this by developing an electron js service, which can receive commands from the online print command and then communicate those commands to the printer through USB.