This delegate is called during HTML rendering.
During the time that HTML rendering is taking place delegates
are called periodically. This gives a mechanism for tracking
progress and for intercepting and modifying or querying pages on
If the page is obtained from the cache then the delegate will not be
Note that the amount of work done during a callback should be
kept to a minimum.
The definition of the HtmlCallback multicast delegate is as
delegate void HtmlCallback(string stage, object
Delegate Sub HtmlCallback(stage As String, page As
Current values for the stage variable are 'get width', 'get
height' and 'render'. The first occurs prior to finding the natural
width of the HTML (the width it can occupy without scrolling). The
second occurs prior to finding the natural height. The third occurs
prior to translation into PDF format.
The page is provided via a mshtml.HTMLDocumentClass object - see
Microsoft documentation for details. However note that while the
interface is standard the behavior may not be identical. For
example element positions may not be available.