No one has responded to this discussion for at least a year, so this information may be out of date. If you're looking for information about this topic, please search for a more recent discussion or post a new question.

PDF Solution: Here's How to Display in the Browser

  • This post has 176 Replies |
  • Thank you!

    But I cannot use your solution with IE9 Russian. New IE9 window is opening and appears “Initialization”.

    That’s all. Is there some special settingа for non-English users?



  • Mikhail,

    There should not be any problem for non-english.  Do you have adobe acrobat plugin installed?  Are you able to open PDFs in the browser from other sites?  If you're on IE9 64-bit it won;t work because there is no 64bit adobe plugin.  Try on 32-bit IE9.


  • Thanks for answer!

    1. Adobe plug-in installed, ver.

    2. Windows 7 32 bit

    3. I’ll test pdf opening in IE9 from home pc

    4. Chrome doesn’t working too. Is there special settings for chrome?



  • Mikhail,

    Thanks for trying the solution.  It works for me in IE9 32-bit.


    Try this link:

    Does that work in IE9?


    Chrome needs adobe plug-in installed and enabled.  The built-in PDF viewer for chorme doesn't work.



  • Yes, I can open your file!

    And now I can open it with Chrome.

    And cannot open in IE. Check from home.


  • Mikhail,

    If you can open my file in IE but not your file then ther may be something wrong with how you setup the solution in your sharepoint.

    Did you implement this solution?



  • I have MANY sub sites (project sites) underneath my Top Team Site. Is there a way where I can add this code once and have it propogate throughout the site collection or am i doomed to add it to each site in turn and to all future site I create. Mind you I plan on creating 40 - 50 sites per year.  The maintanece on this scenario sounds like an nightmare!!

    Pls HELP!!

  • @Oldtown,

    Here's How to Add the PDF script to your Master Page:

    To do this requires a change to the pdf.js file.

    1)  Use notepad to remove the <script></script> tags from the pdf.js file (2 of each I think ?)

    2) You add this code using SharePoint Designer to reference the the script in bottom of  v4.master (just after the </body> ) like this:

    <script type="text/javascript" src="/utilities/pdf.js"></script>

    After that you won't need to use Content Editor Web Parts, they can be removed from the pages.

    Hope that Helps,


  • Josh - Thanks for the qucik answer. It looks like this soultion would be a valid work around but with many sites and workspaces I would have to spend much time adding scripts and changing master pages. And then of course if MS ever decides to support the PDF what happens to the code I added, is it compatible?, will the upgrade screw my sites up? Too much to worry about.

    Instead I have found out the GOOGLE CHROME and Sharepoint work a little better.  When I click on a link in GOOGLE CHROME it will open the PDF in its native Adobe Reader product on my desktop. Much better than the 'where do you want save it too' option that IE offers. I've saved the document to the Sharepoint Library why should I resave it to my hard drive????  I just want to open and view and what ever else one does with a PDF.

    So everyone with this problem should swtich to GOOGLE CHROME right away and never use IE for Sharepoint.

    Let's see if that lights a fire under the MS 'development' team. GOOGLE CHROME!!!!

    BTW I do really prefer IE but this is what we call a show stopper over here. Most (99%) of my docs are PDFs.

  • @OldTown,

    Yeah firefox has the same behavior.  If you don't mind downloading the PDFs and opening locally and the missing icon doesn't bother you then that's fine.  I think you'll find Chrome misses the mark in a few other areas for sharepoint.

    You may be able to get IE to do the same thing by changing some trust and file type settings like this:

    This solution is to enable PDFs in the browser and fix the missing icon.  Most of us find the effort well worth the benefit.  

    Of course it would be better if we didn't have to do this at all.

    As for upgrade compatibility, this is one line of script on one master page file.  Pretty simple to reverse should you experience issues.  There are orgs with over 40 site collections - hundreds-maybe thousands of sites using the solution and they're delighted.  If MS ever provides a secure PDF viewer it will most likely be handled by an application page redirect like Office Web Apps so it may just take over handling of PDF files and you won't even know it happened.



  • @Joshua Booker

    I can't thank you enough for this - it's going to make a huge difference to the website I'm building for my fly tying club.  

    The only key step that was missing for me from "The Complete PDF solution instructions" was the bit about sticking a preface to the URL link to the PDF you place on the public website (http://< your domain> /utilities/pdf.aspx?file=), which took me a bit to track down via these forums.  

    Otherwise, everything was pretty easy and intuitive to do and worked like a dream in the end (IE9 with an E plan).  Several cups of coffee have been donated to you via PayPal.  

    Thanks again!

  • Is anyone else experiencing this behavior?


    When clicking on Doc Lib links with pdf script in masterpage (no CEWPs though the result should be the same) I've found I get this message:


    Whether this message appears seems dependent on edit permissions.

    Public Site anonymous: No message, PDF opens in browser w single click.

    Public site logged in:  I get the Read-only\Edit message.

    TeamSite w read permissions: No message, PDF opens in browser w single click.

    TeamSite w edit permissions: I get the Read-only\Edit message.


    When I try logged in as a user who doesn't have edit permissions on the PDF file - no message.  I also find the behavior may depend on whether you have an edit program locally installed which is similar to how office docs are handled.


    I think this is new behavior which may be a sign that MS is preparing a path to handle PDF files in the browser similar to how office docs are handled.


    Let's hope so.  Let me know your experience.




  • I got that too. But curiuosly when I chose EDIT mode for the PDF it opens sharepoint designer and the js page.

    Looks like things are changing - a little bit anyway.

  • How hard would it be to alter the JS to open the PDF in a separate browser. I finfd that when I open in the current browser I lose the sharepoint site reference. I currently hit the back button and that works fine but I wonder what happens when I roll it out to other not so savy users.

    Thoughts? Is MS going to make all these issues mute in the near future?

  • We can only hope they will make changes soon.  I've seen some changes in the HTML that lead me to believe they are preparing a path to handle PDF files differently, that's all I know.

    There is a version of the script that opens in a new window here:


Page 9 of 12 (177 items) «||7|8|9|10|11||»