I am working for a POS which run on WEB.
I am looking for a solution to directly print sales receipt to the client printer.
Any though on how to integrate this on our xojo web?
…won’t be easy. Basically you have 3 options:
- generate PDF directly from Xojo (with knwon addons) and let the user download it
- just show plain website and let the user print it
- (mix of options 1 and 2) Create website and generate serverside a pdf with wkhtmltopdf
Thanks for your advise.
Downloading pdf and print to printer takes additional steps for the POS operator just to print receipt.
The idea is to print the receipt after the sales is punched.
I believed the JS provided above provides it.
Regarding firewall, it can be open in the system, since POS is a managed operation.
I quickly went through the web page. You will need to install the library on your server. If you have a VPS with terminal access, it should not be a problem. Otherwise, you need to ask the server support to install it.
Then the bit of code that should be pasted on the page can take place in a page source.
May I know files are you pointing to be uploaded in VPS?
The server is in the same local network as the user?
Than you may access a printer in the same network…
[quote=438226:@ronaldo florendo]Thanks Michel,
May I know files are you pointing to be uploaded in VPS?[/quote]
You got to follow what is described at the page you linked to https://printjs.crabbly.com where they explain how to install it.
I should admit that after reading several times that page, I don’t see how they address a printer attached to the client machine.
A web app has no access to the client hardware. So your web app can not print to a specific printer without a dialogue. You need a local service or a server app to handle this.
Interesting blog article how to write a local background service to handle that problem with POS printers:
It would not be too difficult to have a small web service app running on the client machine that takes documents to print, and sends them to the POS printer.
i use Valentina ADK Reports and works Perfects
Does Valentina can now print directly to client printer (without preview)?
yes on desktop, on web i have to check.
I would create my own specialized “browser” for that. And such specialized client would talk to the server, find a receipt to print, download the data, and send it formatted to the printer.