Instead of downloading PDF, how to force PDF to open/view in browser only?

Whenever I upload a PDF, it shows in the topic as follows:


I’m using Inline PDF to display it in Desktop version. But, in mobile Inline PDF won’t work. Further, Google or other search engines autodetect the PDF files, but whenever the user clicks on those results, the PDF download dialogue will appear instead of opening in a tab. This is a bit unfriendly and most of the users prefer to view the PDF online instead of downloading it at a place and opening.

Is there any solution to this?

NOTE: I’ve seen this topic PDF preview instead of download, on uploaded files, but the topic ended without any relation to the original question. Hence, this new topic.


Thanks for raising this question. I’m also curious to know the answer!