Printing from webbrowser control...

  • Thread starter Thread starter johnb41
  • Start date Start date
J

johnb41

I'm using .NET 2.0.

My form is displaying the webbrowser control, which is displaying some
HTML text. When printing with webbrowser.print(), my printout includes
the header and footer.

How can I remove the header and footer from the print out? Can this be
done?

If i can suppress the header and footer, i think this might be a really
easy way to print out richly formatted text and graphics... without the
richtext control, and without all the code for manually handling
wrapping, etc. Just format all the text and graphics with HTML/CSS and
then do webbrowser.print(). :)

Thanks,
John
 
John,

Can you describe this a little bit more, because at least I am not aware of
a header and a footer in the webbrowser control.

Cor
 
Sorry!

You know in Internet Explorer, when you print a web page, there is
always a header and footer printed on the page. By default, the header
shows the page number, and the footer shows the file name and date.

The same is true when you print out the contents of the webbrowser
control. You add text to the control with webbrowser.documenttext =
"<H1>Sample Text</H1>" Then the webbrowser.print() command prints the
page (web page) to the printer.

John
 
Back
Top