Print document on the printer without user interaction

1

I need to print a document by sending directly to the printer without the user having to choose the printer. How do I do this with PHP5 or JavaScript ?

I checked that with JavaScript has the option to do with window.print , but then it opens the print screen to select the printer, which is not what I want.

    
asked by anonymous 05.09.2017 / 16:36

1 answer

0

You can not just use Javascript and PHP.

In Firefox, there is a setting to always print when the window.print () method is invoked. - Access about: config - Create a new boolean preference with the name of print.always_print_silent and mark it as true.

After restarting the browser, any Javascript call with window.print () code will start printing automatically.

Remembering that this preference will apply to any site that invokes that method.

    
07.09.2017 / 19:53