What are some options to have a website print a pdf file directly to the default printer? Secondly what are some options to print a pdf file directly to a specific pre-determined printer (i.e. receipt printer)? In my research it seems like you can't just print directly from a browser (you can't control the user's PC from a browser directly), but what about any type of plug-ins or such that would allow such a thing? I'd like to offer a "print" button, and as soon as the user clicks it a PDF file is generated behind the scenes and printed directly to the printer (the user doesn't need to see the PDF on the screen). I'm thinking this isn't possible with the browser alone, but possibly with a browser plug-in or something like that? Thank you.
asked Mar 12, 2016 at 0:12 user3513237 user3513237 1,075 3 3 gold badges 10 10 silver badges 26 26 bronze badgesIt was possible with some old version of Adobe Reader to automate printing of local PDF documents but it is not considered as good practice to print without user's consent. You should better consider displaying the instruction to print the PDF document as either separated page or as an iframe on the same page.
added from comments on March 25, 2016: Google Cloud Print may help to automate the printing by sending documents remotely to the previously configured printer(s). See the official API reference and open-source applications on Github
answered Mar 15, 2016 at 14:49 2,858 20 20 silver badges 24 24 bronze badges So how do web based POS applications for example allow printing to receipt printers automatically? Commented Mar 17, 2016 at 21:29no way without user confirmation. Or you should implement your own browser or browser plugin that is installed locally first. Or use the cloud printing service like developers.google.com/cloud-print