Greetings,
(.NET 2.0, WinXP Pro/Server 2003, IE6 with latest service packs).
I've decided to take advantage of the layout characteristics of HTML
documents to simplify my printing tasks, but of course it's thrown up a
whole host of new issues...
I'm generating a multi page printable document in HTML from my app, and
displaying it in a WebBrowser control. I've looked into using some CSS
commands to control pagination, but nothing seems to fit the bill so far.
I need to include a custom header/footer (imported from another HTML file)
on every page that's printed. I also need to draw a border around each
page. The closest I can get to the border is putting all my print-content
inside an HTML table, which looks ugly because it doesn't close off at the
foot of each page - it only draws its final horizontal line at the very end
of the document.
I tried inheriting from WebBrowser and overriding the OnPrint event, but
this never seems to get called? I've found an example on the MSDN site, but
it's all in C++ and seems designed around MFC.
How can I hang on to the snazzy built-in formatting features of HTML, but
still have control over the printed output & pagination? Help!
Thanks in advance,
Alex Clark
(.NET 2.0, WinXP Pro/Server 2003, IE6 with latest service packs).
I've decided to take advantage of the layout characteristics of HTML
documents to simplify my printing tasks, but of course it's thrown up a
whole host of new issues...
I'm generating a multi page printable document in HTML from my app, and
displaying it in a WebBrowser control. I've looked into using some CSS
commands to control pagination, but nothing seems to fit the bill so far.
I need to include a custom header/footer (imported from another HTML file)
on every page that's printed. I also need to draw a border around each
page. The closest I can get to the border is putting all my print-content
inside an HTML table, which looks ugly because it doesn't close off at the
foot of each page - it only draws its final horizontal line at the very end
of the document.
I tried inheriting from WebBrowser and overriding the OnPrint event, but
this never seems to get called? I've found an example on the MSDN site, but
it's all in C++ and seems designed around MFC.
How can I hang on to the snazzy built-in formatting features of HTML, but
still have control over the printed output & pagination? Help!
Thanks in advance,
Alex Clark
Comment