I am trying to trigger the Print PDF, when I clicked a button on my page.
How can I achieve this? I can see the Download PDF and Print PDF actions on the upper right of the viewer thru the three dots button but I wan't to be able to print the pdf programatically thru my UI.
Is this possible?
The current version of Embed API does not allow for the programmatic print of the PDF file. If Adobe added that feature, a malicious developer would be able to trigger the printing of a hidden PDF just by landing on a page.
In my opinion, print should be a basic feature of the API. Even the browser itself exposes window.print(). Just my two cents though.
If the document is print protected, then it should restrict print.
Back when I was a product manager at Adobe we actually got a specific request from several Enterprise IT managers to prevent unprompted printing from Adobe Reader and Acrobat. Imagine landing on a page and suddenly having your printer start spitting out hundreds of pages in full color and chewing through all of your expensive ink cartridges. Programmatic printing is essentially a method to DDoS the print queues for shared printers.