I want to send a html text request to printer using PHP. What I did was
window.print()
in JS, which is showing me a print dialog box, which is something I don't need. I have used browser config:
firefox always_print_silent
I want to send the print command without changing the config on the client. I need a solution for any popup or dialog box and one that will work on any browser.
If anyone has a solution for this please reply.
If a web page could just send something to the printer without the user confirming it in some way, we'd have a wave of nasty spam and jokers that would print NSFW pictures until you run out of paper. I think we all agree that would be bad. So no, you cannot have a web page print without the browser showing a dialog box… unless the user knows what (s)he is doing and is explicitly disabling that like with the always_print_silent
option.