shangmisunmi / SunmiPrinterDemo

printer test demo
290 stars 139 forks source link

how we can use with Laravel #78

Open netplexsolutions opened 1 year ago

netplexsolutions commented 1 year ago

How can we use with PHP Laravel to print on android

netplexsolutions commented 1 year ago

Any solution please

ZheruiL commented 1 year ago

If I understand correctly, your use case is to run a web app on a sunmi device, and print from the HTML page? In this case I suggest you to run a background program on the device and launch a HTTP server listening for the print command, then on clicking the button, you request 'localhost' to send what you want to print to the local HTTP server, then the HTTP server call the sunmi print function

eleazan commented 5 months ago

1 year later...

You can do an webview with kotlin, and "expose" a kotlin function to JS for print purposes :)