1

I want my application to print directly to the default printer without the Windows select printer dialog coming up and I really dont need to display the screen. All the user wants is a printout, receipt.

2
  • 3
    If javascript was allowed to do that, I would be worried. Commented Sep 16, 2011 at 17:03
  • Have u got any solution here? I want to make the webpage also print invoices automatically. Commented May 2, 2013 at 19:26

4 Answers 4

2

No, you cannot do it. You can only do window.print() with javascript and it displays the window.

Why you cannot: because safety.

Sign up to request clarification or add additional context in comments.

Comments

1

No I'm afraid this is not possible. You could just run millions of print tasks at the time, and it wouldn't be good for user

1 Comment

i want when the page refresh the code in php chack the row in database, if database not empty the code will print just 1 page for example : invoice.
1

yes, you can. In Firefox about:config you can make property print.always_print_silent equal to true.Then Firefox will print without prompt. And using "JS Print setup" you can adjust some printer parameters directly from javascript

Comments

0

Short answer: you can't do that with JavaScript.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.