Thursday, April 21, 2016

How to View PDF & HTML Files in Browsers in SharePoint 2013

The more secure way is to display PDF and HTML file in the browse are ShaerPoint portal. Add the MIME type of PDF and HTML file into your WebApplication's AllowedInlineDownloadedMimeTypes. Instead of enable the Permissive Option at Browser Handling section in WebApplication's General Settings.

Execute the below script in SharePoint PowerShell cmdlets:

$webApp = Get-SPWebApplication("http://www.samples.com")
$webApp.AllowedInlineDownloadedMimeTypes.Add("application/pdf")
$webApp.AllowedInlineDownloadedMimeTypes.Add("text/html")
$webApp.Update()

No comments:

Post a Comment