I have had a document library where every time i tried to open a pdf file i was only able to save the file locally instead of opening it in the browser.

The cause of this behaviour is SharePoint 2010 browser file handling.

I had been through and checked my settings at the web application level and ensured this was set to “permissive” which allows html and other content types which might contain script to be displayed directly in the browser. To enable to get pdf files to show I had to run power shell to enable MIME types for PDFs.

Open SharePoint management shell and run:

$webApp = Get-SPWebApplication http://Enter your site

If ($webApp.AllowedInlineDownloadedMimeTypes -notcontains “application/pdf”)

{

Write-Host -ForegroundColor White “Adding Pdf MIME Type…”

$webApp.AllowedInlineDownloadedMimeTypes.Add(“application/pdf”)

$webApp.Update()

Write-Host -ForegroundColor White “Added and saved.”

} Else {

Write-Host -ForegroundColor White “Pdf MIME type is already added.”

About the author