Print Page - Remove Headers and Footers

G

Guest

I need to print a web page. It is my preference that my users just do a
File/Print from explorer. That way my users will get the print dialog that
will allow them to select the fax printer. The only problem with doing this
is that a header (name of the page and Page x of x) and footer (actual page
filename the date) are included. I am proficient with using Crystal Reports
v10 (developers version) which will create a PDF file for you to print
without the header and footer I am trying to avoid. The problem for our
company with using Crystal reports is that they want to charge us $1600 (to
update to their advance developers version) to use Crystal on another web
server (we have already used our one license that comes with the developers
version of Crystal Reports v10).

I also looked at using window.print(); but it also prints the header and
footer that I am trying to avoid. I have also tried using
Response.ContentType = "application/msword" . This solution does work and
excludes the header and footer; but the user may have to use Citrix to get to
the intranet page and this would mean installing Word on a Citrix server
(then we would have to pay Microsoft for a license to install Word on Citrix
just to be able to print a page from explorer).

Does anyone know how to suppress the header or footer when printing from
explorer; or is their a cheap way to move a aspx page to PDF format (the way
Crystal does) , or move the page programmatically to some other reader
application that would allow for printing (would be nice if MS had a Word
reader that would cost nothing to put on a server).

Thanks for any help.

Robert
 
J

John Timney \(ASP.NET MVP\)

start by looking at the CSS print options, that can automatically remove
sections of your page you dont want ptinting in compliant browsers

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director
 
M

Mythran

Robert Adkison said:
I need to print a web page. It is my preference that my users just do a
File/Print from explorer. That way my users will get the print dialog
that
will allow them to select the fax printer. The only problem with doing
this
is that a header (name of the page and Page x of x) and footer (actual
page
filename the date) are included. I am proficient with using Crystal
Reports
v10 (developers version) which will create a PDF file for you to print
without the header and footer I am trying to avoid. The problem for our
company with using Crystal reports is that they want to charge us $1600
(to
update to their advance developers version) to use Crystal on another web
server (we have already used our one license that comes with the
developers
version of Crystal Reports v10).

I also looked at using window.print(); but it also prints the header and
footer that I am trying to avoid. I have also tried using
Response.ContentType = "application/msword" . This solution does work and
excludes the header and footer; but the user may have to use Citrix to get
to
the intranet page and this would mean installing Word on a Citrix server
(then we would have to pay Microsoft for a license to install Word on
Citrix
just to be able to print a page from explorer).

Does anyone know how to suppress the header or footer when printing from
explorer; or is their a cheap way to move a aspx page to PDF format (the
way
Crystal does) , or move the page programmatically to some other reader
application that would allow for printing (would be nice if MS had a Word
reader that would cost nothing to put on a server).

Thanks for any help.

Robert

Those headers and footers are controlled by IE settings...the only way to
remove those is by either having the user change the settings on IE (IE
6.0 - File->Page Setup->Header textbox and Footer textbox) or by modifying
the clients registry (find the text in the Page Setup dialog box then do a
search in the registry for the Registry values to change). Either-or
requires modifying those entries on the clients machine.

HTH,
Mythran
 
M

Mike Hofer

In said:
Those headers and footers are controlled by IE settings...the only way
to remove those is by either having the user change the settings on
IE (IE 6.0 - File->Page Setup->Header textbox and Footer textbox) or
by modifying the clients registry (find the text in the Page Setup
dialog box then do a search in the registry for the Registry values
to change). Either-or requires modifying those entries on the
clients machine.

HTH,
Mythran

Actually, I found an ActiveX control that will let you do this from
script in your web pages. It's free, and freely distributable, to boot!! :)

Check out this URL: http://www.meadroid.com/scriptx/intro62.asp

It lets you set margins, and customize the header and footer. (You can
even put HTML in the header & footer.)

Cheers!
 
G

Guest

This is a very cheap (no cost) and easy solution (no extra code) to
implement.

Thank you very much.
 
G

Guest

Mike,

Thanks for the info about the component. In the short term, I may take
the easy way out using the solution suggested by Mythran, but since I have
Citrix to contend with, and I do not want to have to set everyone's browers
(remove the header and footers), the component in the long run may be the
better solution.

Robert
 
G

Guest

Hi,

I'm having the same problem here, and I like the idea to use CSS, but I
can't find info about, con you help out?

Thanks
--
So as you read this know my friends
I''d love to stay with you all
Please smile when you think of me
My body''s gone that''s all

A tout le monde, A tous mes amis
Je vous aime, Je dois partir
 
T

Terry Burns

If you have internet you have browser access, then google on the internet. I
recommend W3schools as a good compact reference to all sorts of stuff
including CSS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top