POS on WEB

HI Guys,

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.

I saw a free javascript which looks ok. >>https://printjs.crabbly.com

Any though on how to integrate this on our xojo web?

…won’t be easy. Basically you have 3 options:

  1. generate PDF directly from Xojo (with knwon addons) and let the user download it
  2. just show plain website and let the user print it
  3. (mix of options 1 and 2) Create website and generate serverside a pdf with wkhtmltopdf

I am not in favor of 3rd party client side Javascripts. Will it run behind blocking firewalls and secured devices?

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.

Thanks Michel,

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…

the server is VPS

followup

[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:

https://medium.com/limetray-engineering/writing-an-background-service-in-golang-6495b5c9baef

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

Hi Alex,

Does Valentina can now print directly to client printer (without preview)?

yes on desktop, on web i have to check.

oh. I am into web.

you can user http://documentation.xojo.com/index.php/WebHTMLViewer.Print and put the web view invisible and print

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.