PDA

Click to See Complete Forum and Search --> : WebBrowser & Printing


Enrico
Dec 6th, 1999, 05:50 PM
I am writing a client-side application that communicates with a host on a mainframe using MQSeries.
The host sends formatted reports (HTML) in response to requests from the client.
I make use of the WebBrowser control to do the HTML rendering/display (and some additional stuff like trapping clicks on links in the HTML, and creating new requests to send to the HOST)
Addition stuff:
1) Each report has "report headings" (eg report name, selection criteria etc..)
2) the "report" returned is typically in a tabular format (multiple rows in columns), each column has a column heading
I know how to get the WebBrowser to print its contents
(WebBrowser1.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_PROMPTUSER, "", "")
The "host" app knows nothing about the hardware(printer) at the client side.
Since the user is in contol of all the things that determine the number of lines on a printed page (such as paper orientation, page size, fonts etc...) it is not feasible to have the host application determine where page breaks will occur.
I have IE5 installed (should then also be the latest & greatest WebBrowser control ??)
The WebBrowser control inherits many properties from the actual IE5 browser (ie. font size, page setup properties etc..)

My problem is this :
Column headings and page headings does not repeat on each printed page (according to the HTML reference
it should work if you use <thead>, <tfoot> and <tbody> tags !)
Is there a way to force the control to print stuff on each page from code ?
Is there a way to temporarily override the default stuff that is set up in IE5 (such as page orientation, header/footer, page margins ) ?
The MSHTML object seem to have a lot more methods & properties to work with - I have been unable to figure out what the connection between the WebBrowser control and MSHTML objects are ..
dim htmlDoc As MSHTML.HTMLDocument
Set htmlDoc = WebBrowser1.object
(I have tried numerous other combinations, but all gives me "type mismatch" errors)