I'm wondering if someone has a pointer for me to investigate this topic, I'm interested in implementing receipt printing on a shiny app but I haven't managed to find anything about this on the internet. Does anybody know if this is even possible to implement?
I'm playing with the idea of developing a Point Of Sale (POS) on a Shiny App to use on a tablet, all the other needed functionalities are fairly easy to implement I can even report the emitted receipts to my country's tax authority trough an API but a physical receipt representation to hand to the client is the only functionality I'm missing.
This is a very silly app but it does print a file. It allows selecting from a set of file names, then clicking the Write button writes the unaltered file out to the app's directory and then clicking Print prints that file. I am using a Linux system, so the print command is lp. I am not sure how to do that on Windows or a Mac.
The system call would only work if the printer is connected to the server so I don't think it is a practical solution, I would need to be able to print on a printer that is connected to the clients system, ideally a receipt printer connected to an android tablet via Bluetooth or wifi.
Trying to find out, I discovered that Epson receipt printers support driverless printing through a JavaScript library and also by sending XML or JSON data to the printer, so it might be possible to do it using httr. Now I have a ton of technical manuals to read to find out how.