Printing to passbook printer from Java Web based app ?

Discussion in 'Java' started by xtanto, Sep 1, 2005.

  1. xtanto

    xtanto Guest

    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 /

    Is there any solution for my above requirement ?

    Thank you for your help,
    xtanto, Sep 1, 2005
    1. Advertisements

  2. 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 Weidenfeller, Sep 1, 2005
    1. Advertisements

  3. xtanto

    xtanto Guest

    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,
    xtanto, Sep 1, 2005
  4. xtanto

    Roedy Green Guest

    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

    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.
    Roedy Green, Sep 1, 2005
  5. xtanto

    Roedy Green Guest

    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

    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.
    Roedy Green, Sep 1, 2005
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.