This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Printing without print dialog Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Printing without print dialog" Watch "Printing without print dialog" New topic

Printing without print dialog

Sahil Sharma
Ranch Hand

Joined: Aug 27, 2003
Posts: 152

I have a requirement where in i have to print a page without the header and footer. The print should happen once user clicks on the print button on the page but no print dialog should come. Is this possible using javascipt or some other API?

Rob Spoor

Joined: Oct 27, 2005
Posts: 19649

The words "page" and "javascript" make me think you want to print an HTML page, and that means this thread is off to HTML and JavaScript.

How To Ask Questions How To Answer Questions
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15376
Imagine surfing the web and all of the sudden 10000000000000000000000000000 pure black pages starts to print on your printer. Allowing a web page to print without the dialog is a bad idea, hence why you can not do it with JavaScript. If you are an IE Shop there is ActiveX controls that do it, you would have to search the net and most of them cost $$$$ money.

I agree. Here's the link:
subject: Printing without print dialog
Similar Threads
Print Review?
Iframes and print
print() method w/o dialog box
Print the content of PDF
Printing HTML file