Is there a way i can print silently without the print dialog?
Hello, please if you found it. I need it too urgently. Thanks in advance!
Even if the devs created an executable for Windows to communicate via sockets or something. I'd be happy to pay to use it.
I was searching for something like this too :)
I ended up writing a windows service which connects to a rabbitmq where the web-app would put the print jobs... should be manageable using a local endpoint too i guess.
I found at least two commercial products too, which work in a similar manner.
I'm not sure if its ok to post them here... let me know...
I understand that it cannot be done for security reasons, JavaScript does not allow you to have direct access to the print so it is the responsibility of the browser. The only solution I have achieved for silent printing is to configure the browser to skip the print dialog and execute the requested command without asking the user for authorization. Obviously this has to be done on the client computer.
This worked for me, in google chrome
1) Open the browser and print a test page to configure the printer parameters and close all chrome
2) Create a new google Chrome shortcut
3) Click with the right mouse button to see the contextual menu of the shortcut created for “google Chrome” and select properties.
4) in the target path field: put the final parameter: --kiosk-printing
5) apply changes and OK
6) Run the new Chrome shortcut
7) Try the print code again.
The print dialog cannot be bypassed with JavaScript alone, for security reasons, as @JosueMerlos mentioned.
Please refer to #79 , #129, #130, #139 or #359
Most helpful comment
I understand that it cannot be done for security reasons, JavaScript does not allow you to have direct access to the print so it is the responsibility of the browser. The only solution I have achieved for silent printing is to configure the browser to skip the print dialog and execute the requested command without asking the user for authorization. Obviously this has to be done on the client computer.
This worked for me, in google chrome
1) Open the browser and print a test page to configure the printer parameters and close all chrome
2) Create a new google Chrome shortcut
3) Click with the right mouse button to see the contextual menu of the shortcut created for “google Chrome” and select properties.
4) in the target path field: put the final parameter: --kiosk-printing
5) apply changes and OK
6) Run the new Chrome shortcut
7) Try the print code again.