In SharePoint 2007, clicking on a PDF in a document library would open it within the browser. In SharePoint 2010, doing the same asks me to save the PDF. How can I force SharePoint 2010 to just open PDF files without making me save them?
-
I have the same problem, I have tried all the options mentioned here, but on the search results page by clicking on the icon or the pdf file, it opens in the abrobat reader client. I mean this happens only on the search results page, the rest of the files on the site are opened in the browser without problems.– Lucas SilveroCommented Apr 21, 2015 at 15:01
6 Answers
Bad advice! You should not just blindly enable permissive mode.
First of all, there are good reasons why SP2010 does not render files in browser, PDF included, per default. The reason is client object model.
PDF allows for Javascript execution, and though to some degree the threat model is the same as with SP2007, CLient object model makes it a lot easier to create potential malicious code in PDFs.
After considering the possible dangers, you could enable permissive mode, but that would mean that all file types would b enabled. Instead, it is much less of a security hole to just enable pdf as an allowed inline mime type for the web application:
$webapp = Get-SPWebApplication <your webapp url>
$webapp.AllowedInlineDownloadedMimeTypes.Add(“application/pdf”)
$webapp.Update()
Read a thorough post of the potential dangers here.
This change was made due to security reasons in SharePoint 2010. You know that PDF actually stands for "Potentially Dangerous Files".
You can change it to a less secure mode, per Web Application, in Central Admin. Just change the Browser File Handling property to Permissive and your good to go.
-
5Ha! "Potentially Dangerous Files". I believe that... PDF is a pretty reliable delivery mechanism for exploit code these days. Commented Apr 8, 2011 at 23:26
-
Could you be more specific about how to get to those permissions, please? Commented Jul 9, 2011 at 0:28
-
4Have to vote this one down... There are more suttle ways to enable for specific mime types only, instead of disabling security entirely. Se my answer below Commented Jul 10, 2011 at 22:18
This is controlled by the installation of Acrobat itself, not SharePoint. By default, PDFs open in the browser but many corporate installs force it to open in a separate window for support reasons.
Many users do not realize they are viewing a PDF instead of a web page and get confused when the normal web tools do not work properly. The bigger the corporation, the more likely this is to be the default.
-
This is correct for my situation. Our Infrastructure/Network guys control how pdfs open on all of our machines. In order to get our pdfs to open in Adobe they have to change the registry in our machines. Also we changed the SharePoint site to permissive as well. Anyway we tested all of this and it works for us.– govgirlCommented Feb 16, 2012 at 18:22
You could set the web application browser file handling setting to strict. This means that SharePoint will tell the browser to open the file in the client application, instead of opening it in the browser itself.
I agree with Anders Rask that the solution provided by Wictor is not the best solution. Making it permissive at the Web Application level is the last thing to do.
If you want to set permissive, it can be done at the Site Collection, Site and List level too. This will reduce the risk to a targeted area. But note here that setting to permissive will allow other files to run in browser like flash etc.
if you just want to allow pdf, then Anders's solution is good.
For all the ways you can allow pdf to open in browser.. refer http://howtosharepoint.blogspot.com/2011/04/open-pdf-files-in-browser.html
For us this was fixed by editing the DOCICON.xml file located here on your WFE server:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\XML
You need to Change the value for PDFs. Our value was originally set to this:
Mapping Key="pdf" Value="pdficon_small.png" OpenControl="AdobeAcrobat.OpenDocuments"/
We modified the OpenControl to "" so it reads like this:
Mapping Key="pdf" Value="pdficon_small.png" OpenControl=""/
Then do an IIS reset. Now the PDFs open directly into your browser without prompting you!
-
Updating out of the box SP Files in the hive is not a recommended approach : /. Commented Aug 4, 2015 at 10:33