escpos-php icon indicating copy to clipboard operation
escpos-php copied to clipboard

Print from webserver to remote printer.

Open ajayshukla opened this issue 5 years ago • 11 comments
trafficstars

I have a website in php and I want to automatically print my orders when they come on my website through API from remote printer. Can anyone guide me how can I do this?

ajayshukla avatar Nov 29 '19 09:11 ajayshukla

Use cases with paid solutions: QZ Tray https://rawbt.ru/mike42/example_qzio/ JSPM https://rawbt.ru/mike42/example_jspm/

and from me https://rawbt.ru/mike42/example_rawbt/

Muraveiko avatar Dec 01 '19 06:12 Muraveiko

Could you explain what code to use to work with a bluetooth printer from send to android printer or simply download RawBT ESC/POS? using the code of library por the connection? in this case $connector = new Escpos\PrintConnectors\WindowsPrintConnector("btprinter");

WilsonicX avatar Dec 03 '19 15:12 WilsonicX

Perhaps I did not understand your question correctly. In the circuits I have described, the print procedure is started by a person in a browser. After clicking the "Paid" button, the bask end sends data to the client’s browser, and they get to the printer through the processing of the server’s response with the functions of the javoscript language. Javoscript sends them to intermediaries. My links show examples of how to convert data from the Mike42 library into a format that is understandable to such programs.

Muraveiko avatar Dec 03 '19 17:12 Muraveiko

@Muraveiko could u plz add a link to the qz example php file, i keep getting JSONObject["data"] is not a JSONArray. on my end, thanx.

ctf0 avatar Jul 25 '20 05:07 ctf0

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.

mutiemule avatar Apr 30 '22 09:04 mutiemule

@mutiemule hello can you share with us the solution please

ourrais avatar Feb 27 '23 15:02 ourrais

I send orders trough ssh

On Mon, Feb 27, 2023, 16:55 ourrais @.***> wrote:

@mutiemule https://github.com/mutiemule hello can you share with us the solution please

— Reply to this email directly, view it on GitHub https://github.com/mike42/escpos-php/issues/843#issuecomment-1446583036, or unsubscribe https://github.com/notifications/unsubscribe-auth/AECF5AGFWUEHUFGWXZQXQJDWZTE67ANCNFSM4JS5HGAA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

EduardVidalTulsa avatar Feb 27 '23 16:02 EduardVidalTulsa

@mutiemule can you explain me more and sorry for the inconvenience, please I want examples because I did not understand well

ourrais avatar Feb 27 '23 17:02 ourrais

ommands to the printer through USB.

@ourrais the node-escpos package on an online server needs a separate implementation on the client to communicate with the printer.

I developed a Service in NodeJS and ElectronJS using node-escpos package as the printer driver.

The service runs on the local machine while the online server hosts mike42/escpos-php. In my case, I implemented this on Laravel which is running on an online server. Then the node js/electron js service is installed on a local machine and mapped to a specific port that listens to commands from the online server for any print command.

mutiemule avatar Feb 28 '23 05:02 mutiemule

@mutiemule thank you for your answer, can you send me screenshots and thanks in advance

ourrais avatar Feb 28 '23 13:02 ourrais

i solve this by make an c# app that recieve printing request

Hussin22 avatar Jul 25 '23 10:07 Hussin22