Most places on the web, you get a wrong guidance in how to enable PDFs in SharePoint. The easy and most used method is just to enable “Permissive” rights in the settings for the web application. Unfortunately that solution is a security risk. What it does is actually, enabling all filetypes in your SharePoint to open in the browser. The correct way is this:

Add the PDF extension to the allowed MIME type list

Using PowerShell you can add the PDF MIME type to the AllowedInlineDownloadMimeTypes property of the web application.

To do this, fire up the PowerShell and type in:

$UsePdf=Get-SPWebApplication(“http://WebAppUrl”)
$UsePdf .AllowedInlineDownloadedMimeTypes.Add(“application/pdf”)
$UsePdf .Update()

To check that your MIMEtype was added run this:

$UsePdf .AllowedInlineDownloadedMimeTypes

The “application/pdf” should appear at the bottom of the list. Don’t be confused, that it’s not in alphabetical order. It never will be. Navigate to document library and try to open your pdf again. It should just work.

[Office 365]