Button for document download

Certified Senior Developer

Hi,

I want to download a QR Code (PDF document) by a button click instead of a download link.  Also, I want to print the QR code by selecting the printer. How can I achieve these two functionalities? 

Thanks

  Discussion posts and replies are publicly visible