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: http://stackoverflow.com/questions/11230502/how-to-use-java-to-print-on-a-network-printer See also the documentation for the Java PrintService: http://docs.oracle.com/javase/8/docs/technotes/guides/jps/spec/JPSTOC.fm.html