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 |
  • MCS,


    Sorry about your search engine problems.  I'm guessing you're a 'OLSB refugee'.  If so, I'd suggest you search the forums for posts by user mch who, I know is the OLSB transistion guru and, I think, may have a solution to your SEO woes.


    Now I understand you want PDFs to work in the browser from your public site...well that's different.

    Sorry for more bad news, but...Forms pages on the public web site are not anonymously accessible.  In other words, your anon visiters will not be able to view the document library page that you linked to above.  They will get a login prompt or access denied message.  Hint, always make sure you logout and test your changes to see what anaon folks will see.


    Anon users can open files in your public site documents, but they need a link directly to the document placed on a publicly accessible page.  You can manually add a link to a page in the following format to enable a PDF to open in the browser.


    You can use the public site editor to add a link to the pdf.aspx page in utilities then paste the ?file=<path to pdf>.pdf


    Let us know if that helps.



  • To be honest, I don't suggest 365 as a viable public site option and move anyone I can to WordPress or another platform where it's not such an uphill struggle to provide functionality and usability. Even MSFT's long awaited solution to the pdf issue requires the user have the latest version of Adobe Reader which is ridiculous. Josh's solution is still the better option.

    And it does work for P1 public site pdf's as long as you manually add the link as he prescribed above. I tried to get round the anon access to a forms page, but now it seems MSFT is blocking the Fiechter workaround for that too at least in P1 accounts so I can't even see if it works. And adding the pdf solution files to the public library doesn't seem to work either.

    All in all, "anonymous" and Office 365 just don't mix. 



    webbrewers | Easy to use sites | Low/no cost hosting

    1 out of 1 people found this post helpful.

  • Josh: Thanks so much. Yes, that works and will be a good fix while I'm getting a new site setup with a reliable hosting company. MCH does not recommend to use office 365 as public website. And I got a recommendation for a hosting company I'll check out.

    OLSB website at the end was actually quite good for us, especially after learning to work with it and adusting to it. And since most customers find products on the web and then buy via phone or after recieving quote, it worked great for us. So let's see how we can overcome this quickly. I'm sure it's not troublefree with any provider.

    You were a great help so far, Thanks again.

    Kind Regards,


  • Hi;

    I would like to use the solution described in this post but in using a event javascript to open a PDF file for example in double cliking on the file (without the menu "open PDF file").

    You have already implemented this solution ?


  • yanis97,  

    This solution alters the links on PDF files so they should open in browser with a single click:



  • Hi Josh;

    I have installed and actived the template "PDFDocumentSite.wsp" in my private site but when I try to create a new site with 'PDF Document Site' as a template it does not exists in the list of templates ?

    Same problem when I try to add a new web part : the template  'PDF Document Site'  does not exists ?

    Any idea ?

    its possible to use in adding a Content Editor Web Part or add the script  to the site master page using SPD ? If the case, please show me how realize this solution.


  • yanis97,

    The site template is an old solution.  Do not use that one.


    What you want is the solution described on this page.  The instructions on this page tell you how to add a library called Utilities, upload the script files to your site then add a CEWP to your pages.  



    For master page option read this thread:


    Have great day!


  • Hi Josh;

    I would like only to open directly the PDF file in a browser with a simple click (without the menu "Open PDF File")  : the user selects a PDF File and clicks to it open into web page via the browser.

    I have the icon (PCPDF.gif) and i would like to get the JS file whih allows to open directly the PDF file without the menu ? Where I can find this JS File.


  • Hello,

    Thanks for a great solution. I do have a question concerning meeting work spaces, however.

    I've implemented the complete solution in our master page and it works on all our pages aside from meeting work spaces. The funny thing is that on those work spaces we get the PDF icon, but not the ability to open the PDF in browser.

    Has anyone run into this or have an idea on how to fix it?


  • Hello,

    This is Jason Burnside from Microsoft Office365 SharePoint Support.

    Please refer to the following link regarding opening PDFs in SharePoint Online directly in Adobe Reader via the Service Update:

    Please let me know if you have any further questions.

    I will continue to monitor this thread if you have any additional questions.



    Jason Burnside

    Office 365 SharePoint Support

    1 out of 3 people found this post helpful.

  • Hi Jason,

    I saw this information a while ago. It doesn't work for us and that is why I'm using Joshua Booker's solution.


  • Ditto.  The MS upgrade only works for PDFs opened within the Sharepoint team site, not on the public website.  It would make such a difference if that could be fixed as well, pronto ...

  • I can't seem to get it to work for an end user with no administrative privileges. I can open pdf files in the Team Site when I log into my Office 365.  However, when my assistant logs into her own Office 365, she sees a band across the PDF logo.  Can anyone help?

  • Josh, this solution was a great help.  We used it for about six months without a problem, but I think something recently changed in the SharePoint Online page-editor such that it always encodes URI path (colon, spaces, et al replaced by %3a, %20, etc).

    After poking around a bit I changed two of the ASPX functions to include a call:

        f = decodeURIComponent(f.replace(/\+/g,  " "));

    I'm thinking the replace() call really isn't needed, but covers more variations.

    This corrected a mysterious blank Reader page for PDF links in recently-edited pages.  We didn't experience this isssue initially.

  • Has anyone received/tested what Microsoft have changed for embedded viewing of pdf files in the October Service Release ?

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