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

Join Date: Jul 2007
Posts: 5
Reputation: beppeilbuono is an unknown quantity at this point 
Solved Threads: 0
beppeilbuono beppeilbuono is offline Offline
Newbie Poster

print web page

 
0
  #1
Jul 3rd, 2007
I would like to print a Web page with
javascript method window.print()
without pages number and footer.
it's possible ?
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 7,600
Reputation: ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of 
Solved Threads: 462
Super Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Failure as a human

Re: print web page

 
0
  #2
Jul 3rd, 2007
What happens when the print method is called? Does it directly print the page or pops up a print dialog?
I don't accept change; I don't deserve to live.
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 5
Reputation: beppeilbuono is an unknown quantity at this point 
Solved Threads: 0
beppeilbuono beppeilbuono is offline Offline
Newbie Poster

Re: print web page

 
0
  #3
Jul 3rd, 2007
pops up a print dialog (but this is not a problem).
I don't like on the right corner PAGE 1 OF 1 and in the footer the address of the page.
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 7,600
Reputation: ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of 
Solved Threads: 462
Super Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Failure as a human

Re: print web page

 
0
  #4
Jul 3rd, 2007
But you have got to realize that the window.print() method provides little or no control over the printing settings. Its just a nicety and is equivalent to pressing Ctrl + P.

Even the documentation doesn't provide any significant information about this function. It actually makes sense since its the user who decides what and how things have to printed and not the site developer. Messing around a bit with your printer settings is the only way to go.
I don't accept change; I don't deserve to live.
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 5
Reputation: beppeilbuono is an unknown quantity at this point 
Solved Threads: 0
beppeilbuono beppeilbuono is offline Offline
Newbie Poster

Re: print web page

 
0
  #5
Jul 3rd, 2007
I've developed an intranet application where the user click on button
PRINT INVOICE
I create the invoice into an html page and open it with minimun size, print and then close it.
ex.:
<head>
<body on load='window.print();window.close()'>
......invoice's tags.....
</body>
>/head>
I've found something about print job into CSS2 Specification arround PAGED MEDIA groups but nothing to control head and footer of printed document.
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 3,203
Reputation: MidiMagic has a spectacular aura about MidiMagic has a spectacular aura about 
Solved Threads: 165
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Nearly a Senior Poster

Re: print web page

 
0
  #6
Jul 13th, 2007
This is a function of the particular printer's driver and the PAGE SETUP function in the browser the USER of the page is using.

It belongs to the owner of that user's computer, not to the web page designer.

It is a security violation for a web page to be able to alter those settings. You have no right to change it.
Daylight-saving time uses more gasoline
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 5
Reputation: beppeilbuono is an unknown quantity at this point 
Solved Threads: 0
beppeilbuono beppeilbuono is offline Offline
Newbie Poster

Re: print web page

 
0
  #7
Jul 13th, 2007
thanks to all I've solved my problem
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
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