S
Sergey Goncharov
I need to print HTML-page or ASPX-page programmatically
without Print-Dialog appearance using client-side
languages such as JavaScript or VBScript. I need to print
the page to default printer without any promting, in other
words. (Click the button "Print" on Internet Explorer's
toolbar and you will see result what I need).
I've found the article in MSDN: ms-
help://MS.MSDNQTR.2004APR.1033/dnie55/html/wb_print.htm
But examlpes from this one don't work as I need.
<HTML>
<HEAD>
<OBJECT ID="wb" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-
340A-11D0-A96B-00C04FD705A2"></OBJECT>
<SCRIPT LANGUAGE="JavaScript">
function PrintPage()
{
wb.ExecWB(6, 2, 2, 2);
// wb.ExecWB(6, 2, 0, 0);
// wb.ExecWB(6, 2);
}
function SetupPage()
{
wb.ExecWB(8, 0, 0, 0);
}
</SCRIPT>
<TITLE>New Page</TITLE>
</HEAD>
<BODY>
<INPUT TYPE="BUTTON" VALUE="Print Page" ONCLICK="PrintPage
()">
<INPUT TYPE="BUTTON" VALUE="Print Setup" ONCLICK="SetupPage
()" id=BUTTON1 name=BUTTON1>
</BODY>
</HTML>
Print dialog arrear in any case.
Please, help!
without Print-Dialog appearance using client-side
languages such as JavaScript or VBScript. I need to print
the page to default printer without any promting, in other
words. (Click the button "Print" on Internet Explorer's
toolbar and you will see result what I need).
I've found the article in MSDN: ms-
help://MS.MSDNQTR.2004APR.1033/dnie55/html/wb_print.htm
But examlpes from this one don't work as I need.
<HTML>
<HEAD>
<OBJECT ID="wb" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-
340A-11D0-A96B-00C04FD705A2"></OBJECT>
<SCRIPT LANGUAGE="JavaScript">
function PrintPage()
{
wb.ExecWB(6, 2, 2, 2);
// wb.ExecWB(6, 2, 0, 0);
// wb.ExecWB(6, 2);
}
function SetupPage()
{
wb.ExecWB(8, 0, 0, 0);
}
</SCRIPT>
<TITLE>New Page</TITLE>
</HEAD>
<BODY>
<INPUT TYPE="BUTTON" VALUE="Print Page" ONCLICK="PrintPage
()">
<INPUT TYPE="BUTTON" VALUE="Print Setup" ONCLICK="SetupPage
()" id=BUTTON1 name=BUTTON1>
</BODY>
</HTML>
Print dialog arrear in any case.
Please, help!