Reputation: 3
i want to print a document from browser using window.print(). I want browser not to show standart print dialog on current machine. I have all access to system registry and settings on it. Is there way to tweak the system in this way?
ps. Excuse me for my english.
Upvotes: 0
Views: 935
Reputation: 301085
Not sure if this still works, but there's an ActiveX control which can do this for you (from here)
<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>
Upvotes: 1