0

i want to print receipts as bitmaps on Epson POS printers. The printers are not directly attached though. The receipt rendering is done on the backend webservice, and the generated bytes will be sent to the frontend, where the printer is actually attached.

So i took a look into the Epson JavaPOS ADK, but i found only code to call directly attached printers, but no utility classes or so.

So my question is: Does anyone know a way to use the Epson JavaPOS ADK to "print" to bytes instead to a printer?

Thx!

Andrés Alcarraz
  • 1,570
  • 1
  • 12
  • 21

1 Answers1

1

The following means are conceivable.

  1. Store in BMP file and print.

    • Store the Bitmap data notified from the Web service as a BMP file in the frontend file system (not the session local storage of the browser).
    • Print the BMP file using the printBitmap method of the POSPrinter device.
    • Delete the BMP file when printing is completed normally.

  2. Print data as it is in memory. (When EPSON JavaPOS and printer supports it)

    • Convert the Bitmap data notified from the Web service into the BMP file image on the memory.
    • Print the BMP file image using the printMemoryBitmap method of the POSPrinter device.
    • When the printing is completed normally, release the memory of the BMP file image.

  3. (When the front end is a Windows machine) Print on a Windows standard printer.

    • Handle printers as Windows standard printers rather than handling them in JavaPOS.
    • Switch the printer mode setting and device driver to those of Windows standard printer.
    • Convert Bitmap data like page printing using the Windows standard printing API and print it.

Of course, it is necessary to convert the Bitmap data notified from the Web service into BMP file or Windows print data, but it can be done by using API of your OS or Java library function.


Postscript added based on comment.

In that case, you may be using the ePOS SDK instead of the JavaPOS ADK.
However, at least some software development is necessary.

There are four types below, so please try it according to your frontend environment.

Epson ePOS SDK for Universal Windows apps
Epson ePOS SDK for Android
Epson ePOS SDK for iOS
Epson ePOS SDK for JavaScript

kunif
  • 4,060
  • 2
  • 10
  • 30
  • thank you, kunif, for answering. but i think, i was not very precise in my question. basically i know the flows, you described. the issue is, the frontends in my case can only send raw bytes to the pos printer, so the webservice has to somehow call the "printBitmap" methods. of course there is no printer attached on the backend, so i was looking for concrete methods in the ADK, which do the same as the "print" methods, but instead return raw bytes, i then can send to the frontends. (i don't want to implement the algorithm described in https://files.support.epson.com/pdf/general/escp2ref.pdf) – Simon Kronawitter Aug 12 '18 at 07:46