views:

580

answers:

3

Hi,

I have clients who still using dot matrix for making copies of printed documents (like invoice, reports, etc). I did a development using grails (web application) for internal company only (so it doesnt matter to install / update all java re in all computers)

I am still learning (just started) Javafx. can i use this javafx to print from file to dotmatrix printer ? or shall i use applet instead ? friends of mine told me that java has lib to print to dot matrix, that's why i am stick to javafx or applet

which one is the easier and better (also faster) using applet or javafx? the interface is quite simple, just a form with 2 input fields and a button for printing.

+1  A: 

Java has a Print Service API. It would be worth checking that out.

I suspect it won't work via an applet, however (I would guess the security model gets in the way).

Brian Agnew
+1  A: 

Any Java API/Library can be accessed from JavaFX - there is no limitation. You can do the UI of the application and core logic in JavaFX and use the existing Java Lib for printing stuff (the Print Service API might be a good start).

Doing this as an Applet might not be best idea, I would recommend using WebStart deployment.

Honza
is javafx needs kind of security something ? because i know that applet needed that.
nightingale2k1
A: 

Applets can be signed so they can print as well. In addition, Applets using the new plugin have access to the JNLP apis, which includes a secure way of doing printing for unsigned apps.