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

  • very nice indeed .. anyway you could have a workaround for viewing html files in your browser as well?

    urgently need to be able to show html files!

    thanks in advance

  • very nice post .. I actually need this urgently for viewing html files, could this be done for html also?

  • Chris,

    The exact method of embedding didn't work for HTML in my first try, but I am confident a variation of this would work for HTML files.  Sorry I can't work that out with any urgency, but if you're crafty you could take what I've done and work with it to find the solution.  I will post back here when I do get to working through the html solution.

    Josh

  • Did you have anything else that you wanted to add to this thread jbooker?

  • Mike,

    Thanks for asking.  Yes I do as will others who may have questions about this solution.  This is an open discussion about the PDF work around presented in the beginningn of this thread which I hope will remain open.

    Thanks again,

    Josh

  • Joshua - how nice of you to offer this!  I was able to check it out using your sample link above.  However, when I replaced the file name with one of ours, I got this message:

      File does not begin with '%PDF-'.

      company.sharepoint.com/.../Monthly%20Sales%20Detail.pdf

    Is there a special file naming syntax you are expecting?

    Betty

  • oh - update - I had tried it in IE 9.  I just now tried in Safari 5.0 and it worked just fine!  Maybe back to the 64-bit thing?

  • Betty,

    You will get that message if you are opening a pdf file from a private site while not logged into that site.

    It may be the same message for x64 IE I'm not sure.  Try again in IE9 while logged into your private site and see if it works.

    Stay tuned as I have an installable solution to get this working on your own site forthcoming.

    Josh

  • Chris,

    I've tried and don't have a way that works for HTML files.  So far the only option is to save your html with .aspx extensions then they will work.

    Don't know if that will help, but it's all I know of.

    Josh

  • Josh - Just to let you know, I verified that I was logged into my site before linking, and still got the same error.  I had someone try it on their IE8 browser and they said it worked just fine though.  And cool news that you're working on an installable solution!   Happily staying tuned .......     8-)

  • Betty,

    Thanks for the info.

    You could try this:

    joshuabooker.com/.../BrowserFileHandling.aspx

    I havn't tried with IE9 so I'm not sure it will help, but may be worth a try.

    You could also try a smaller PDF file or refresh the page after the error message as it may be that the adobe plug-in isn't waiting for the file to cache fully.

    HTH,

    Josh

  • late getting back to you, but yea, the same thing happened when I tried your test file from IE9.  I get the "File does not begin with '%PDF-'. message....

  • Ian Morrish also has a suggestion ...

    www.wssdemo.com/.../displaying-pdf-files-in-office-365-sharepoint-online-sites.aspx

    Displaying PDF files in Office 365 SharePoint Online sites

    Ian's SharePoint Blog

  • Betty,

     

    I saw Ian Morrish's blog last week.  He's doing the same thing by using javascript to embed the PDF object.  I like his method of getting the PDF file URL directly from the form.  As he says, there are many way s to do this.  His example works great if you want to display the PDF on the same page as one of the sharepoint forms.  If you want to show the PDF in full screen like most people may expect, then you have to rework his code a bit.

     

    Here is my solution that you can dowload and install on your private site:

     

    http://joshuabooker.com/Pages/PDF-Solution.aspx

     

    Let me know if you have questions.

    Josh

  • I'll spread the word about your solution - so good and generous of you to go through the trouble to provide this!  I'm sure you are making a lot of people happy!

1|2|3|4|5|»