Using the universal file viewer widget to display the document from a microflow shows you a print button. See https://marketplace.mendix.com/link/component/116935.
If you really do not want to open the print dialog there might be some options but you need to google for this and combine this with the option that is implemented in the widget code for example.
Using window.print(); in a javascript action while displaying the document might do the trick, never tested this though.