The Enhanced Files add-on is actually managing that.
It adds a field where you can add some file extensions to open inline. If the browser is capable of that, the file (PDF, MP3, MP4, etc..) will be opened in your browser, else, it will be downloaded.
If you add another button, in most cases, you’ll just get two buttons that will just download the file, because your user can browse your site using safari, opera or some other ligthweight or mobile or even outdated browsers that do not include PDF viewers and others.
Do not hesitate if you need more explanations.
Want to help WP Customer Area? It only takes few seconds!
Rate & review the plugin on WordPress.org 🙂