473,508 Members | 2,214 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How does one *PROPERLY* print rendered HTML?

I tried using
webBrowser.ExecWB(SHDocVw.OLECMDID.OLECMDID_PRINT,
SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_PROMPTUSER)

but it returns asynchronously. Is there anyway I can know when the document
has finished printing when using webBrowser.ExecWB ?

I also tried using rundll32.exe with mshtml.dll but again it displays a
dialog. So my question to that is, how do I print using rundll32.exe w/
mshtml but not have it display the print confirmation dialog.

I tried using onlyconnect.HtmlEditor but when I use LoadDocument, and pass
in the full path of a html file located in the temporary files folder, I
get:
An unhandled exception of type 'onlyconnect.HtmlEditorException' occurred in
htmleditor.dll
Additional information: Document not created
Jul 21 '05 #1
3 4214
I guess I'll just have to call webBrowser.ExecWB and call
Application.DoEvents in a loop for 30 afterwards sec to make sure it was
sent to the spooler.
"Hasani" <bi*******@hax0r.dyndns.org> wrote in message
news:O8**************@TK2MSFTNGP09.phx.gbl...
I tried using
webBrowser.ExecWB(SHDocVw.OLECMDID.OLECMDID_PRINT,
SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_PROMPTUSER)

but it returns asynchronously. Is there anyway I can know when the document has finished printing when using webBrowser.ExecWB ?

I also tried using rundll32.exe with mshtml.dll but again it displays a
dialog. So my question to that is, how do I print using rundll32.exe w/
mshtml but not have it display the print confirmation dialog.

I tried using onlyconnect.HtmlEditor but when I use LoadDocument, and pass
in the full path of a html file located in the temporary files folder, I
get:
An unhandled exception of type 'onlyconnect.HtmlEditorException' occurred in htmleditor.dll
Additional information: Document not created

Jul 21 '05 #2
Why loop?
Just look at the printer's spool.

"Hasani" <HJ****@hotmail.c0m> wrote in message
news:Bz**********************@twister.nyc.rr.com.. .
I guess I'll just have to call webBrowser.ExecWB and call
Application.DoEvents in a loop for 30 afterwards sec to make sure it was
sent to the spooler.
"Hasani" <bi*******@hax0r.dyndns.org> wrote in message
news:O8**************@TK2MSFTNGP09.phx.gbl...
I tried using
webBrowser.ExecWB(SHDocVw.OLECMDID.OLECMDID_PRINT,
SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_PROMPTUSER)

but it returns asynchronously. Is there anyway I can know when the document
has finished printing when using webBrowser.ExecWB ?

I also tried using rundll32.exe with mshtml.dll but again it displays a
dialog. So my question to that is, how do I print using rundll32.exe w/
mshtml but not have it display the print confirmation dialog.

I tried using onlyconnect.HtmlEditor but when I use LoadDocument, and pass in the full path of a html file located in the temporary files folder, I
get:
An unhandled exception of type 'onlyconnect.HtmlEditorException'

occurred in
htmleditor.dll
Additional information: Document not created


Jul 21 '05 #3
I would but it truncates the path when it's longer than 63 characters.
"Ayende Rahien" <Ay****@no.spam> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Why loop?
Just look at the printer's spool.

"Hasani" <HJ****@hotmail.c0m> wrote in message
news:Bz**********************@twister.nyc.rr.com.. .
I guess I'll just have to call webBrowser.ExecWB and call
Application.DoEvents in a loop for 30 afterwards sec to make sure it was
sent to the spooler.
"Hasani" <bi*******@hax0r.dyndns.org> wrote in message
news:O8**************@TK2MSFTNGP09.phx.gbl...
I tried using
webBrowser.ExecWB(SHDocVw.OLECMDID.OLECMDID_PRINT,
SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_PROMPTUSER)

but it returns asynchronously. Is there anyway I can know when the

document
has finished printing when using webBrowser.ExecWB ?

I also tried using rundll32.exe with mshtml.dll but again it displays a dialog. So my question to that is, how do I print using rundll32.exe w/ mshtml but not have it display the print confirmation dialog.

I tried using onlyconnect.HtmlEditor but when I use LoadDocument, and pass in the full path of a html file located in the temporary files folder, I get:
An unhandled exception of type 'onlyconnect.HtmlEditorException'

occurred
in
htmleditor.dll
Additional information: Document not created



Jul 21 '05 #4

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

Similar topics

162
7071
by: Isaac Grover | last post by:
Hi everyone, Just out of curiosity I recently pointed one of my hand-typed pages at the W3 Validator, and my hand-typed code was just ripped to shreds. Then I pointed some major sites...
2
1441
by: Jay | last post by:
I have an application that uses the DataGrid to list several employees. You click on a button associated with an employee to display a report on one employee in a popup window. From that report you...
0
1246
by: Kresten Buch | last post by:
Hi, I have a central webapplication with lots of clients connected to it over the internet, and some of theese clients has to do a lot of printing. This is where the fun begins. One client...
3
368
by: Hasani | last post by:
I tried using webBrowser.ExecWB(SHDocVw.OLECMDID.OLECMDID_PRINT, SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_PROMPTUSER) but it returns asynchronously. Is there anyway I can know when the document has...
2
3819
by: Dan Sikorsky | last post by:
I've loaded a string variable with html from a web page URL captured using WebRequest and WebResponse. How can I send this html to the printer?
45
3350
by: salad | last post by:
I'm curious about your opinion on setting relationships. When I designed my first app in Access I'd go to Tools/Relationships and set the relationships. Over time I'd go into the window and see...
2
1366
by: MrNobody | last post by:
I have a string object filled with HTML text. I would like to have the text rendered and printed out onto paper. Any ideas on how to do this? Is there maybe a way to get this text into a TextArea...
13
3516
by: Bob Jones | last post by:
Here is my situation: I have an aspx file stored in a resource file. All of the C# code is written inline via <script runat="server"tags. Let's call this page B. I also have page A that contains...
2
1470
by: haft | last post by:
My webpage of discussion contains a javascript powered image gallery of small thumbnail images that when moused-over, display a larger image that corresponds to the current moused-over thumbnail....
0
7231
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7336
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
7401
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...
1
7063
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
5640
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,...
1
5059
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3211
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3196
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
432
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.