/    Sign up×
Community /Pin to ProfileBookmark

Printing Options

Hello,
I want to print the page by clicking on a button. I have done that, It’s printing the page as well but I don’t want the dialog box that appears when Clicked on print button. Is there any option in window.print() function in javascript to print directly without the print dialog box for printer?

to post a comment
JavaScript

12 Comments(s)

Copy linkTweet thisAlerts:
@CharlesAug 27.2005 — No.
Copy linkTweet thisAlerts:
@BigMoosieAug 27.2005 — Why the hell would you want to? I know that would piss me off if I didnt have a chance to adjust the printer settings.
Copy linkTweet thisAlerts:
@CharlesAug 27.2005 — Or to cancel the printing.
Copy linkTweet thisAlerts:
@chestertbSep 01.2005 — I'll tell you why you'd want to do it...

You have an application that prints, say, a receipt.

You just want to print the damned receipt. It's not a book, a dissertation, or a doctoral thesis. It's a receipt. It's pre-formatted, and only a few lines long. It will never change. Each time you print it, out it comes. There's nothing to adjust. No paper supply options, no quality options, no colour options... nothing. It's just a receipt.

Customer hands over a $50, you give him his change, click "Paid" and the receipt ought to spit out of the designated printer. The last thing you want is a stupid dialog box popping up that offers you printing choices that you'll never use.

Sadly, it seems programmers don't spend enough time in the real world actually doing business with customers to understand that. They assume they'd get pissed off if they couldn't adjust something... thereby demonstrating a mindset that delivered operating systems and scripting languages that insist on showing us a useless bloody dialog box.

It was a reasonable question. The way you two have dealt with it is arrogant and disrespectful. Ravindra came to this forum for help. Those 'helping' might like to try being a little more open minded.

CTB
Copy linkTweet thisAlerts:
@BigMoosieSep 01.2005 — If the browser could print without a dialogue box then what is to stop a website printing hundreds of pages of black?

And I frankly dont give a crap if you don't like my response, piss off.
Copy linkTweet thisAlerts:
@chestertbSep 01.2005 — If the browser could print without a dialogue box then what is to stop a website printing hundreds of pages of black?

And I frankly dont give a crap if you don't like my response, piss off.[/QUOTE]


You know, BigMoosie, you make a valid point in the first half of your response...

...then you throw it all away in the second half. How sad you're not prepared to stretch your mind a little and see that there is no black or white. There are only shades of grey.
Copy linkTweet thisAlerts:
@BigMoosieSep 01.2005 — That point I made is so blantantly obvious and I'm sure that Rivandra was probably intending something like that, we get people here asking if javaScript can shut down computers and crap like that, it is the reason for the impatient responses. I am not being narrow minded I am being realistic.
Copy linkTweet thisAlerts:
@chestertbSep 01.2005 — Actually, it wasn't blatantly obvious.

I actually came across this thread because I have a need to bypass the print dialog box myself to print that receipt on a system that runs on an internal intranet. My goal has nothing to do with shutting down someone's computer, because it would be my computer I'd be shutting down.

Again, though, I take your point. There are a few too many people here who have less than honourable motives. But not everyone who asks a question like this one is a cyber terrorist. Some of us just want to do stuff that's a little unusual.

CTB
Copy linkTweet thisAlerts:
@RavindraauthorDec 23.2005 — I would like to thank you all for the replies. But till now I am sure that there is no way to hide this popup dialog box for IE ver 6.0.2900 which I am using. I have tried all the functions available to do this but it does not work. If any one has the solution then please let me know about this ASAP.

Ravindra
Copy linkTweet thisAlerts:
@mylocMar 02.2006 — I'm looking for the answer to the same question.

Not having a dialog box is I think a very valid question. I need to create a 'print-screen' function for use in Kiosks located around the campus. The student is suppose to hit the 'print' button on the screen, it prints out and the student picks it up.

Everyone says it is not possible but there must be a way. If I have a IE toolbar with the 'print' button on it, if I press the button, it prints without the dialog box asking me anything.

I'll just keep searching.
Copy linkTweet thisAlerts:
@felgallMar 02.2006 — Maybe I have several printers attached to my network. Without the dialog box how would your page know which printer it is supposed to print to?

Web pages have no access to anything outside of the browser and limited access to the browser. The printer belongs to the hardware/operating system and the web page therefore doesn't even know if there is a printer connected and relies on the operating system generated print dialog box to allow the owner of the computer to decide where to send the printed output.
Copy linkTweet thisAlerts:
@David2376Feb 04.2007 — Yes it is possible. I too had the need to print receipts on my local machine. You just need an ActiveX component installed on your machine. After much searching I found ASP printer. I am using XP Pro with IIS enabled, I am able to print directly with no dialog box from any ASP page. If you are not familiar with ASP then you might have trouble getting this working. Check out the link below:

http://www.vbgold.com/asp-printer-component-help/index.html?printhtmlfilemethod.htm

David
×

Success!

Help @Ravindra spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...