S
Shardool Karnik
Hi,
I have an ASP.NET page that sends a request to the server to generate some
html on the fly and print it through the server.
Once the request comes in, the page is generated.
I have a Internet Explorer Control that loads this page on the server side.
Then I am calling the print function to print that page.
The code compiles and runs, but this page is not printed after the printing
request has been executed.
There is nothing in the print spooler.
Here is the code
=======================================================
Private WithEvents browser As SHDocVw.InternetExplorer
browser = New SHDocVw.InternetExplorer()
browser.Navigate(url)
While (browser.QueryStatusWB(SHDocVw.OLECMDID.OLECMDID_PRINT) <>
(SHDocVw.OLECMDF.OLECMDF_SUPPORTED + SHDocVw.OLECMDF.OLECMDF_ENABLED))
End While
browser.ExecWB(SHDocVw.OLECMDID.OLECMDID_PRINT,
SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DONTPROMPTUSER)
=======================================================
everything executes fine, but there is nothing printed.
The control navigates to the correct page.
Does anyone know why it doesn't print ?
Only reason I can think of is the control is designed for WinForms and not
for Server Side Classes (not web forms, just a class on the server side).
Please help!!!
Regards,
Shardool Karnik.
I have an ASP.NET page that sends a request to the server to generate some
html on the fly and print it through the server.
Once the request comes in, the page is generated.
I have a Internet Explorer Control that loads this page on the server side.
Then I am calling the print function to print that page.
The code compiles and runs, but this page is not printed after the printing
request has been executed.
There is nothing in the print spooler.
Here is the code
=======================================================
Private WithEvents browser As SHDocVw.InternetExplorer
browser = New SHDocVw.InternetExplorer()
browser.Navigate(url)
While (browser.QueryStatusWB(SHDocVw.OLECMDID.OLECMDID_PRINT) <>
(SHDocVw.OLECMDF.OLECMDF_SUPPORTED + SHDocVw.OLECMDF.OLECMDF_ENABLED))
End While
browser.ExecWB(SHDocVw.OLECMDID.OLECMDID_PRINT,
SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DONTPROMPTUSER)
=======================================================
everything executes fine, but there is nothing printed.
The control navigates to the correct page.
Does anyone know why it doesn't print ?
Only reason I can think of is the control is designed for WinForms and not
for Server Side Classes (not web forms, just a class on the server side).
Please help!!!
Regards,
Shardool Karnik.