20

I have a document library with a PDF file. Whenever I click on the PDF file, I am prompted to save the file. I do not get the option of opening the file, I am forced to save it. What I want is for the PDF file to open, either in the browser or in a separate Adobe Reader window, depending on the Adobe Reader settings. I'm pretty sure SharePoint is responsible for this behavior, because if I put the PDF on my hard drive, then create a HTML file with a link to the file, it opens in the browser when I click on it.

Please note: I looked at this question and did not help. I don't care if the PDF opens in the browser or in a separate Adobe Reader window, I just want it to open.

Community
  • 1
  • 1
Tobias Funke
  • 499
  • 3
  • 6
  • 12

4 Answers4

16

There is a better way to handle "Browser File Handle" issue. Take a look at my blog here: http://www.pdfsharepoint.com/sharepoint-2010-and-pdf-integration-series-part-1/

Solution #2 addresses Pdf extension without exposing entire Web Application to "Permissive" browsing. Setting "Browsing File Handle" to "permissive" opens too many vulnerabilities with other file extensions.

Thanks,

Dmitry

Dmitry
  • 589
  • 4
  • 5
  • 1
    Thanks. That is definitely the better way of doing it -- with this solution, the PDFs don't open up inside the browser chrome like setting the Application to "Permissive" does -- PDFs show up inside the Acrobat Application instead. – Dave Markle May 11 '12 at 17:06
12

According to this, it's not a bug, it's a feature:

"Unable to Open PDF Directly from SharePoint 2010

After installing SharePoint 2010 your users may find that they can no longer open PDF files and are instead forced to save them to their local machine.

In Internet Explorer 8 Microsoft added a security feature to prevent script injection vulnerabilities caused by buggy client software. This feature is activated by a new HTTP header called X-Download-Options which can be set to noopen. When that header is passed with a file attachment Internet Explorer 8 will not provide the option to directly open the file, instead you must first save the file locally and then open it.

SharePoint 2010 utilizes this enhanced security feature in IE 8 to block the opening of file types it considers vulnerable to scripting or other attacks, such as PDFs. You can modify SharePoint's behavior by changing the Browser File Handling option in the Web Application General Settings of SharePoint 2010. Your options are permissive and strict, with strict being the default.

If your users demand that they open files directly from the web and you are willing to permit the additional security risk you can easily make this modification to your SharePoint web applications."

They go on to show how to change this configuration.

DOK
  • 32,337
  • 7
  • 60
  • 92
  • 1
    @Tom Willwerth: Thanks, fixed it. This is exactly I don't like only supplying links in answers, but rather include some of the linked article. Links can break, but SO will always be here! – DOK Dec 03 '11 at 19:37
  • 1
    Unless your SharePoint implementation is fully insulated, I WOULD NOT RECOMMEND THIS APPROACH. It opens up a significant security hole that can be easily exploited. A better approach is to add the PDF to the allowed MIME types so SharePoint doesn't pass the "don't open this directly" parameter in the header - See Dmitry's answer for how to do this. – Ray Apr 11 '13 at 19:56
1

for me it is easily fixed right after following powershell script

$webapp = Get-SPWebApplication https://portal 
$webapp.AllowedInlineDownloadedMimeTypes.Add("application/pdf")
$webapp.Update()

source: https://sharepoint.stackexchange.com/questions/10900/how-can-i-force-sharepoint-2010-to-open-pdfs-in-the-browser

Community
  • 1
  • 1
Iman
  • 17,932
  • 6
  • 80
  • 90
0

Our company has the same issue. We solved by implementing PdfSharepoint forms. It may sounds like advertising but the product solved our needs saving Pdf forms in SharePoint 2010. You can check them here. It may be not for everyone but definitely worth trying if you have Adobe forms and SharePoint 2010. The fact that you can submit forms using Adobe Reader was a game changer for us.

mnel
  • 113,303
  • 27
  • 265
  • 254
Robert Sully
  • 11
  • 1
  • 2
  • I'd recommend providing the best practice solution first, and then suggest the other "product" as an alternative if you wan't people to accept your answer. – Ray Apr 11 '13 at 19:58