473,399 Members | 4,254 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Printing from webbrowser control...

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

Sep 15 '06 #1
2 2620
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

"johnb41" <js********@gmail.comschreef in bericht
news:11**********************@d34g2000cwd.googlegr oups.com...
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

Sep 15 '06 #2
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
Cor Ligthert [MVP] wrote:
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
Sep 15 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: John Bowman | last post by:
Hi, I've been reading through the threads on using the WebBrowser control in C# app's and how to print it's contents. I've got that much working. However, the big problem is I can't figure out...
3
by: larry mckay | last post by:
I'm trying to programatically print the content that is rendered in an internet explorer control. if do webbrowser.navigate ("http://www.yahoo.com") the content of the webpage appears in the...
2
by: Chris Bingham | last post by:
Hi everyone, Does anyone know how to fix the paper orientation depending on the paper size used when printing with the WebBrowser control please? What I've got is a HTML file, containing 1 big...
3
by: John Peterson | last post by:
Hello all! I'm at my wits end trying to search for what I assumed to be a relatively straightforward task. I have a Web application written in C#, and I have a button on the form that I want to...
1
by: eskildb | last post by:
First, please be gently. I am fairly new to the programming world (1.5 years with some expermentation prior to). I have been working on a project that has to print HTML pages with graphics in a...
1
by: eskildb | last post by:
First, please be gently. I am fairly new to the programming world (1.5 years with some expermentation prior to). I have been working on a project that has to print HTML pages with graphics in a...
12
by: Alex Clark | last post by:
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...
0
by: nikhilgargi | last post by:
Requirement: I need to provide printing capability in a C# desktop application that I am developing The documents that need to be printed can be in Rich Text Format (RTF) or HTML. Custom...
18
by: Brett | last post by:
I have an ASP.NET page that displays work orders in a GridView. In that GridView is a checkbox column. When the user clicks a "Print" button, I create a report, using the .NET Framework printing...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.