How to print HTML-page programmatically without promting Print dialog?

  • Thread starter Thread starter Sergey Goncharov
  • Start date Start date
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!
 
Sergey Goncharov said:
I need to print HTML-page or ASPX-page programmatically
without Print-Dialog appearance using client-side
languages such as JavaScript or VBScript.

Sergey,

This newsgroup is primarily for end users to discuss the UI and
help each other resolve problems. Unfortunately there isn't much
programming expertise here.

The closest that I can recall us having a discussion relating to your
question involves a recurring question about font size in footers.
Apparently there is a company which has programming support for that.

Here's an excerpt from a previous post about that in case the link leads
you somewhere useful.

<excerpt>
In March Henri found a third-party product you could try:

< http://www.htmlprinting.com/ >


<
http://groups.google.com/[email protected]&rnum=1 >

</excerpt>


Good luck

Robert Aldwinckle
---
 
Back
Top