开发者

Force browser not to show print dialog

i want to print a document from browser using window.print(). I want browser not to show standart print dialog on current 开发者_如何学JAVAmachine. 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.


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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜