Hi Dilan, if the PDF is opened in the browser (ie Chrome) there is already a print button available. Otherwise I guess this goes outside of the scope of Mendix functionality.
Hope this helps,
Are you sure the document viewer you're referring to doesn't already have the print option available when the PDF is shown in the document viewer? As I recall, whenever you hover the PDF the print option (among others) should appear and be available.
Another option would be to enable the PDFjs library (separate option on the Document Viewer widget). I'm fairly certain this setting did show the options for printing the PDF. Do keep in mind that if you enable this option you can only show PDF files in the Document Viewer Widget.