.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Melody Anderson

Home >> Code Snippets >> PowerShell >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Open PDF in SharePoint Browser

Posted By:abhays       Posted Date: March 31, 2014    Points: 40    Category: PowerShell    URL: http://www.dotnetspark.com  

Open PDF in SharePoint Browser by setting MIME

In case you save a pdf files in document Library and other user want to open to open,then SharePoint has not facility to open it in browser.When you click the link it asks to save in hard drive.  

By using PowerShell command we can easily add the PDF MIME type to the web application's AllowedInlineDownloadMimeTypes property

$webApp = Get-SPWebApplication("http://abhay-pc:4444")




As soon you run the above code and open the pdf,its open in the existing browser



Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend