Print automatically to local printer

This thread raises the question how to print a file automatically to a local printer. Are there besides the Google Cloud printing and the SFTP solution other alternatives to do this? We need functionality to print a file to a local printer, which printer is depending on the content of the file.
2 answers

The best way locally seems to be google cloud printing, this seems very easy to implement as it is just a REST API.

But otherwise if the server is local then a printer can be connected to it and you can follow the standard way of printing files in Java.

There are several examples of "PrintJobWatcher" out there, simply search for "javax.print" or "PrintService" Java Example" you will get results like the following :

If you guys still have a problem just email me directly. The second link seems to be very helpful.

Sorry for not giving code for a mendix java action but those examples should be sufficient to implement print functionality.


I think stack overflow has some answers: See also the documentation for the Java PrintService: