Make browser not display print dialog

I want to print a document from a browser using window.print (). I want the browser not to show the standard print dialog on the current computer. I have all the access to the registry and settings. Is there any way to configure the system this way?

ps. Sorry for my english.

0
source share
1 answer

Not sure if this still works, but there is an ActiveX control that 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> 
+1
source

Source: https://habr.com/ru/post/886837/


All Articles