Printing to passbook printer from Java Web based app ?

X

xtanto

Hi All,

We want to move from Windows terminal server based GUI application to
Java based web application (using JSP/JSF). The application must print
Ticket using passbook printer : Epson Passbook Printer, TM-U950 /
0950P.

Is there any solution for my above requirement ?

Thank you for your help,
Krist
 
T

Thomas Weidenfeller

We want to move from Windows terminal server based GUI application to
Java based web application (using JSP/JSF). The application must print
Ticket using passbook printer : Epson Passbook Printer, TM-U950 /
0950P.

I don't know that particular printer. In general, printing from Java is
not for the fainted of heart. So, you might want to write a prototype to
verify that you can talk to that printer on your target platform in the
desired language. Doing it on the target platform is essential.

I particular, if you want to print on the client site, then you picked
the wrong technology from the Java ABC (or better JKL) alphabet soup.
Simplified, you get web pages with JSP. Unless you throw in more
technology, this leaves you with the print capabilities of the browser.

Is that enough for your application? If not, consider to write a real
Java application, and deploy it via JWS (Java Web Start).

If you print on the server site, then you have the same printing APIs
(yes, there is more than one) as in an application - unless I missed
some printing extension in J2EE.

/Thomas
 
X

xtanto

Hi Thomas,
Thanks for your reply.

The majority of the apps should be JSP/JSF.

If use Java Apps (Swing) ONLY for the printing part, and call that
printing screen from JSP/JSF, how can I do that ?

Thank you,
Krist
 
R

Roedy Green

We want to move from Windows terminal server based GUI application to
Java based web application (using JSP/JSF). The application must print
Ticket using passbook printer : Epson Passbook Printer, TM-U950 /
0950P.

Is there any solution for my above requirement ?

Usually you would handle this as you did back in the days of DOS with
your own little printer specific device driver. You send commands out
the USB, parallel or serial port, and the printer renders the
characters. For this you will need a printer manual that explains the
command set (Hard to get nowadays. They are not longer packed with the
printer. Perhaps Epson has it in PDF on the web.)

Failing that, you fall back on the basic Epson command set and some
experimenting. I wrote about 75 of such things in the DOS days for
the Abundance language.

You also will of course need some way to poke a character out the
port.
See http://mindprod.com/jgloss/parallelport.html
http://mindprod.com/jgloss/serialport.html

If worse comes to worse, you write some JNI.

To do this well, you want to get feedback from the printer, out of
paper, offline etc. so you can explain to the user what is going on.
 
R

Roedy Green

If use Java Apps (Swing) ONLY for the printing part, and call that
printing screen from JSP/JSF, how can I do that ?

if you are using desktop or bigger machines attached to the printer
you can use the builtin-in the rather crummy port io in Java or if the
printer is supported as a system device, using the bitmap style
dumping described at http://mindprod.com/jgloss/printing.html


If the printer is attached to something tiny like a handheld, then you
have a more difficult time finding port support and you are definitely
pushed to character mode for reasonable speed.

A assumed the printer might be attached to something in between, a
single board computer in an ATM, which may be running something off
the beaten track.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top