I have tried this jquery plugin to print the content of a div element and I must say it works like a charm, but I'm looking for something that would print the div content to the default printer directly, not show the confirmation window first and then print it. The app is intended to run on localhost so client and server side are on the same side. Also would it be possible to use PHP instead of javascript?
Well taking the current context ( that the server and client are the same machine ), you can loosen a bit the servers settings, and allow php to execute command line external programs ( exec() ) . Then it's just a matter of finding out ( and install if not currently on the system ) a program that prints files .