How does one *PROPERLY* print rendered HTML?

  • Thread starter Thread starter Hasani
  • Start date Start date
H

Hasani

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
 
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.
 
Why loop?
Just look at the printer's spool.

Hasani said:
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.
occurred
 
Back
Top