سؤال

We have a jsp that will be referenced from a kiosk. We need to print to a receipt printer attached to the kiosk. Customer will press a button and we will print a barcode. No dialog ... no hassle (hopefully).

How could this be done? I am guessing we will need to use a client-side script of some sort. Can we access local com ports from javascript?

The kiosk will be running some form of Windows. We do have control over what is installed there.

هل كانت مفيدة؟

المحلول

You can only print on systems that are available on the server side or by manipulating client side program (Browser Plugin).

Possible solutions include:

  1. Don't use JSP, use a Program instead.
  2. Have the Server in the same LAN and the Printer available to the server.
  3. Firefox Plugin JS Print Setup

(You could of course change the code of the browser, but I doubt you want that.)

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top