Open SharePoint 2010 documents library to open pdf documents in local drive, then how to open those pdf
in browser itself. Lets join a journey with me.................
SharePoint UI
Using powershell comment to set BrowserFileHandling property.
MIME Type:
One more option is available to set MIME type, if the above techniques is went wrong, go ahead this way.............
Getting web application.
Add pdf in MIME type.
in browser itself. Lets join a journey with me.................
SharePoint UI
- Central Admin.
- Select WebApplication under Application Management.
- General Settings.
- Default Browser File Handling is Strict. Look like this
- Change the option Browser File Handling to Permissive.
PowerShell
- Perform iisreset and open pdf files in document library.
Using powershell comment to set BrowserFileHandling property.
Getting library from site.
$web= Get-SPWeb -Identity “SiteUrl”
$web= Get-SPWeb -Identity “SiteUrl”
$library= $web.Lists["LibraryName"]
Check the
BrowserFileHandling.
$library.BrowserFileHandling
Set the value
to Permissive
$library.BrowserFileHandling = "Permissive"
$library.Update()
Perform iisreset and open pdf files in document library.
MIME Type:
Getting web application.
$curWebApp = Get-SPWebApplication "webappurl"
Add pdf in MIME type.
$curWebApp.AllowedInlineDownloadedMimeTypes -contains "application/pdf"
$curWebApp.Update()
$curWebApp.Update()
Check the PDF type.
$curWebApp.AllowedInlineDownloadedMimeTypes -contains "application/pdf"
Result : true
Perform iisreset and open pdf files in document library.