Printing from website w/o headers and footers

YodaMan

Member
Jun 26, 2002
76
0
0
I am trying to generate a letter online using information from our database as well as info inputted by a user. I have a page where the top (letter head if you will) has the info generated by the db. The "Address to" has 4 input text boxes. The body of the letter is same for all users.

After the user enters in all the info I want them to be able to print the letter without the header and footers that are automatically generated by the browser.
Also another problem I run into is that the input boxes all have borders that print on the page. How can I have it so that the boxes dont get printed on the page.

Any suggestions?

Thanks in advance!!!
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
You could try generating and returning a text/plain .txt file instead of HTML.

If this is a well-funded project where you can buy components, visit www.textcontrol.com their TX control can output Word .doc files. I'm not sure if there are Word plugins for any browsers except IE though so those users would have to save the response and open it outside the browser.
 

Beau

Lifer
Jun 25, 2001
17,730
0
76
www.beauscott.com
I believe that the header & footeres can only be set in the page set up of the users browser. I could be mistaken.

As far as the input boxes borders go, this will vary between browsers, but you can try to create a secondary style sheet and set the media property to printer. In this CSS, set the input's border to none.

example:

<style type="text/css" media="printer">
input {
border:none;
}
</style>
 

EeyoreX

Platinum Member
Oct 27, 2002
2,864
0
0
I believe that the header & footeres can only be set in the page set up of the users browser. I could be mistaken.
You are correct sir!

In IE File -> Page Setup. There is a section for headers and footers. Make them blank, or put whatever you want there. Oh yeah. at the users computer. You can't set that to force all computers to do it though, so far as I know.

\Dan
 

YodaMan

Member
Jun 26, 2002
76
0
0
I was able to print the form without borders by creating a css file. Thanks a lot
Now I just need to know how to print this page without having the website and date appear on the bottom of the page.

 

Beau

Lifer
Jun 25, 2001
17,730
0
76
www.beauscott.com
Originally posted by: YodaMan
I was able to print the form without borders by creating a css file. Thanks a lot
Now I just need to know how to print this page without having the website and date appear on the bottom of the page.

Like I said, I don't think there's a way that you can force the user to print without headers and footers unless you go to their machine and go into file->page setup and remove everything on the header and footer lines.
 

YodaMan

Member
Jun 26, 2002
76
0
0
Hey, I understood what you were saying about having the user actually changing their own settings in order for that not to happen.

I was just hoping that someone could suggest something else, because like you said, you werent too sure. It was just a Monday morning bump that I had hoped someone had an answer to.

I am beginning to think that you might just be right....thanks a lot for your help.
If I come across something I'll be sure to post it!