M
mrnicelife
Hi,
When using WebBrowser object to print an html page, the ExecWB call
has a nice argument that allows an application to wait for the
completion of the print job. When an app call ExecWB with the right
argument, ExecWB method blocks until the page finishes spooling.
If we pass the argument:
PRINT_WAITFORCOMPLETION(0x02) on the third argument of ExecWB call, it
will block the call until the spooling finishes. It is documented on:
http://msdn.microsoft.com/library/d...owser/webbrowser/reference/methods/execwb.asp
When using IE Print Templates that behaviour is no long possible. Why?
Because the third argument is the path for the print template, so if
we use a print template we loose the ability to pass
PRINT_WAITFORCOMPLETION value.
I tried to use the event PrintTemplateTeardown.....do all work inside
a thread and wait for the thread to die in order to detect the end of
spooling, but it didn't work.
Any solutions?
Best Regards,
Miguel Lopes
*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*
When using WebBrowser object to print an html page, the ExecWB call
has a nice argument that allows an application to wait for the
completion of the print job. When an app call ExecWB with the right
argument, ExecWB method blocks until the page finishes spooling.
If we pass the argument:
PRINT_WAITFORCOMPLETION(0x02) on the third argument of ExecWB call, it
will block the call until the spooling finishes. It is documented on:
http://msdn.microsoft.com/library/d...owser/webbrowser/reference/methods/execwb.asp
When using IE Print Templates that behaviour is no long possible. Why?
Because the third argument is the path for the print template, so if
we use a print template we loose the ability to pass
PRINT_WAITFORCOMPLETION value.
I tried to use the event PrintTemplateTeardown.....do all work inside
a thread and wait for the thread to die in order to detect the end of
spooling, but it didn't work.
Any solutions?
Best Regards,
Miguel Lopes
*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*