473,399 Members | 3,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

URGENT: Internet Explorer Control: Print not working

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_P RINT) <>
(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.
Nov 17 '05 #1
1 1398
> 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).


I think that that's the point: Asp.Net normaly running under the
User-Account ASPNET, witch will have no printers installed. You can try to
connect to the printer before printing using a .vbs and starting in via
Process.Start from Application_Start

GP

P.S.: Please stop crossposting!!!
Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: John | last post by:
Hi all, I did post this about 10 hours ago thinking I would have received an answer now but it is quite urgent. How do I add a COM object to a web form? I notice there's a primary interop...
4
by: zz | last post by:
Sorry for posting this here but unfortunatly I couldn't find any appropriate newsgroup for this and since I've been active here with .net question I figured you guys might be able to help. ...
3
by: laredotornado | last post by:
Hi, This problem only affects PC IE. On a secured page (a page visited via https), there is a link that reads -- "Download HTML File". The link connects to this page <?php...
1
by: henning | last post by:
Hello, I'm involved in the development of a set of web pages that are meant to be used on touch screens. We use ordinary HTML, PHP and javascript for the pages. I wold prefer a serverside...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.