If you are/can use Firefox there is a plug in which allows unattended printing without print dialog.
I have also read that you can do it in IE, but requires ActiveX, for example:
<script language=JScript>
function doprint() {
document.body.insertAdjacentHTML("beforeEnd", "<object id='idWBPrint' width=0 height=0 classid='clsid:8856F961-340A-11D0-A96B-00C04FD705A2'></object>");
idWBPrint.ExecWB(6, -1);
idWBPrint.outerHTML = ""; }
</script>
Or similar in VBScript:
<script language='VBScript'>
Sub Print()
OLECMDID_PRINT = 6
OLECMDEXECOPT_DONTPROMPTUSER = 2
OLECMDEXECOPT_PROMPTUSER = 1
call WB.ExecWB(OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER,1)
End Sub
document.write "<object ID='WB' WIDTH=0 HEIGHT=0 CLASSID='CLSID:8856F961-340A-11D0-A96B-00C04FD705A2'></object>"
</script>
That Sub Print effectively replaces the default print function. All you then need in Javascript is...
window.print();
There's also a commercial product that may help.