0

Good day. So, here is my issue.

I'm currently using sharepoint 2010 for web applications, I am supposed to display pdf as part of a web page. Currently, the browser tends to download the pdf file instead of displaying it.

Content-disposition is already set to inline. I've also used iframe, and src is pointing to custom httpHandler. I've already added "application/pdf" MIME type in the list of AllowedInlineDownloadedMimeTypes as per the advice in this link http://www.pdfshareforms.com/sharepoint-2010-and-pdf-integration-series-part-1/.

However, the application still failed to display it, and it prompts the user to download the file instead.

I'm using mozilla firefox v12 and ie8 to test the application, they both exhibit the same behavior.

What else is missing? Thank you.

newbie
  • 3
  • 1
  • 8

1 Answers1

0

It's important to remember that not all browsers, especially older ones like Internet Explorer 8, have the ability to render PDF content inline. In these older browsers, this was generally accomplished through plug-ins like Adobe Reader or Foxit being installed on the client machine.

Basically, if you are using an older browser, your users will likely need one of these (or a similar) plug-in installed. Otherwise when the browser encounters a PDF file, it will serve it to the user, as it doesn't really know how to deal with it.

There is also a chance that this could be a permissions / settings issue similar to the one addressed in this related question. You may want to review over some of the discussions within that thread as well as this Sharepoint 2010 one, which details a a setting called "Browser File Handling" and how it's default value of "strict" can affect how PDFs and other files are accessed.

He came across the solution while looking at the "Web Application General Settings". There is a setting called Browser File Handling and by default it is set to strict.

Community
  • 1
  • 1
Rion Williams
  • 74,820
  • 37
  • 200
  • 327
  • Hi, thank you for your response. I've read the scenarios on the similar issue related to this one. However, according to Dmitry in one his blogs in Sharepoint2010, PDF integrtion part 1, he said that the recommend method is to add the mime type of pdf, instead of changing the whole setting into Permissive. Is there a way to know if the user has a plug-in installed and notify him if there is none? – newbie Apr 10 '16 at 15:51
  • I don't know if you have come across but [this related blog post](http://www.pdfshareforms.com/sharepoint-2010-and-pdf-integration-series-part-1/) but it seems be a pretty exhaustive look at handling PDFs in Sharepoint 2010 and might be worth looking into. As far as detection of a PDF viewer being installed, I'm not honestly sure of the best way to handling that. There may likely be JavaScript approaches or server side ones like [this](http://stackoverflow.com/q/15965274/557445) that involve checking the registry, which might not be applicable in web-based environments. – Rion Williams Apr 10 '16 at 16:13
  • Hi, thanks again. Yes, that blog post is the one that I'm talking to on my first comment. I did solution #3 to add application/pdf mime type. Alright, I'll dig more into possible solutions that can check if user has installed plug-ins or not. Thank you so much. – newbie Apr 10 '16 at 16:28