No page header and footer when printing a web page

Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: Sep 2004
Posts: 24
Reputation: chunguy is an unknown quantity at this point 
Solved Threads: 0
chunguy's Avatar
chunguy chunguy is offline Offline
Newbie Poster

No page header and footer when printing a web page

 
0
  #1
Dec 13th, 2004
hihi,

is there a way to rid of the page header (usually it's the page title and url) and the page footer (usually it's the page number and date) without having user to change from the web browser's the page setup ?

Can this be done using javascript or just html meta tags?

Also we control the contents of what is printed from a web page without having to redirect the page? Example, I have three paragraphs on a web page and I don't want the middle paragraph to be printed.

thanks
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 1,655
Reputation: tgreer is an unknown quantity at this point 
Solved Threads: 35
Team Colleague
tgreer tgreer is offline Offline
Made Her Cry

Re: No page header and footer when printing a web page

 
0
  #2
Dec 13th, 2004
Research the CSS Print Profile: http://www.w3.org/TR/2004/CR-css-print-20040225/
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 24
Reputation: chunguy is an unknown quantity at this point 
Solved Threads: 0
chunguy's Avatar
chunguy chunguy is offline Offline
Newbie Poster

Re: No page header and footer when printing a web page

 
0
  #3
Dec 15th, 2004
hi,

thanks for your reference given but i still can't get it rite. i tested by including this in a cascading style sheet.

@page {
@top-left{
font-family: Helvetica, Arial, sans-serif;
font-size: 18pt;
font-weight: bolder;
content: "XHTML-Print: A Proposal --- August 25, 2000";
}
}
by right, this should print out "XHTML-Print: A Proposal --- August 25, 2000" on the top left of the page right. but it doesn't. This is just testing. Anyway, my problem is I want to get rid of the header and footer without having to change it using the page setup of the browser. by the way, i'm using mozilla browser.

please help.
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 24
Reputation: chunguy is an unknown quantity at this point 
Solved Threads: 0
chunguy's Avatar
chunguy chunguy is offline Offline
Newbie Poster

Re: No page header and footer when printing a web page

 
0
  #4
Dec 22nd, 2004
anyone have any idea whether we can eliminate the headers and footers with PHP ? or any other languages ?
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 1,655
Reputation: tgreer is an unknown quantity at this point 
Solved Threads: 35
Team Colleague
tgreer tgreer is offline Offline
Made Her Cry

Re: No page header and footer when printing a web page

 
0
  #5
Dec 23rd, 2004
The headers and footers are put there by your printing subsystem, not by the page or the browser. What that means is, this particular attribute is in the hands of the user. Much like screen resolution or brower width. I always find it irritating when programmers try to override my perceived control.
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 24
Reputation: chunguy is an unknown quantity at this point 
Solved Threads: 0
chunguy's Avatar
chunguy chunguy is offline Offline
Newbie Poster

Re: No page header and footer when printing a web page

 
0
  #6
Dec 25th, 2004
hi tgreer,

thanks for your time and info so far. sorry, if anything i asked irritated you.
I've got further questions though. If lets say i'm doing a web application (using PHP) in a closed environment, when a user submit a form for example, the info is sent to the server. On the server, the necessary processing is done and the content is sent by the server to the right printer to print. How do I get about to do this?

In this case can the page to print be processed automatically without the header and footer before being sent to printer ?
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 1,655
Reputation: tgreer is an unknown quantity at this point 
Solved Threads: 35
Team Colleague
tgreer tgreer is offline Offline
Made Her Cry

Re: No page header and footer when printing a web page

 
0
  #7
Dec 25th, 2004
Don't misunderstand me, your POST didn't irritate me at all.

Your server can print to a printer attached to the server. You can't force something to print on the users printer.

The headers and footers are put there by the operating system's printing subsystem. It's not something you can control with a scripting language.
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 24
Reputation: chunguy is an unknown quantity at this point 
Solved Threads: 0
chunguy's Avatar
chunguy chunguy is offline Offline
Newbie Poster

Re: No page header and footer when printing a web page

 
0
  #8
Dec 26th, 2004
ok tgreer. i get the point with the header and footer now.

any tips on how i can select which printer to print on the server using scripting language or any other related languages?
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 1,655
Reputation: tgreer is an unknown quantity at this point 
Solved Threads: 35
Team Colleague
tgreer tgreer is offline Offline
Made Her Cry

Re: No page header and footer when printing a web page

 
0
  #9
Dec 28th, 2004
You're posting this in the JavaScript/DHTML forum. To control the printer on the server, you would have to use a server-side language. Which server-side language do you know?
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 24
Reputation: chunguy is an unknown quantity at this point 
Solved Threads: 0
chunguy's Avatar
chunguy chunguy is offline Offline
Newbie Poster

Re: No page header and footer when printing a web page

 
0
  #10
Dec 28th, 2004
initially, i had hoped this could be done with javascript, so i posted the question here. Anyway, I did post a similar question in the PHP forum at this link http://www.daniweb.com/techtalkforums/thread15881.html .

I know ASP and PHP but on this assignment I have to use PHP. So, ... PHP it is.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the JavaScript / DHTML / AJAX Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC