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 |
  • Hi All,


    This is a more complete PDF solution for Office365 which works on all subscriptions (P1-E3).



    PDF Utilities Library Template


    • Install by simply creating a new Document Library from a Template.
    • Enables Viewing PDF Files in Browser anonymously and Authenticated.
    • Document Hyperlinks Automatically work for PDF files
    • PDF Icon Automatically Appears
    • New Menu Item 'Open PDF in Browser' Appears
    • No Site Template, Workflow, Content Type or Doc Library Template required


    Please use this solution and not the original one at the beginning of this thread.




    0 out of 1 people found this post helpful.

  • Ok, so i tried to install the complete solution. - Ran into a couple of snags that probably should be clarified for non-programmers.

    Firstly, the Link provided for info if you dont have US-english isnt really self-explanatory, however after pondering what was the problem (changing LCID in manifest file) and reading through the page sometimes i got it - you need to rename the .stp file to .cab and extract the manifest file, change the LCID in the file and then get it back into the .cab, then rename it back to .stp and upload it.

    Ok, so now to my problems. - After doing this i cannot get the solution to work. - .pdf icons wont show, and when i press the pdf-file it still wants to download (the filename does not get passed to your .js)

    So, to clarify if i did everything right;

    1. I opened the manifest file, and did a search for 1033 (US-english LCID) replacing 3 occurences with my LCID (1044) - Am i supposed to replace all 3?

    2. Further things got complicated when i started to investigate why it didnt work, because my site looks like this;<site> so my utilities directory is

    After finding several absolute paths in manifest.xml pointing to /Utilities/ i changed these paths to /companyname/Utilities and reinstalled,, but it didnt seem to do the trick.

    I also tried copying the /companyname/Utilities directory to /Utilities to see if that would work, however, no go.

    Any ideas about it?

  • Hi KKL,

    I've not done the language change thing, but I believe you have the steps correct:

    "you need to rename the .stp file to .cab and extract the manifest file, change the LCID in the file and then get it back into the .cab, then rename it back to .stp and upload it."


    You don't need to change anything else like the /utiltites paths or anything in the manefest.  You will know when the language change was successfull by the fact the utilties template displays in the create library gallery.


    So you need to reverse all your changes to the manefest except the 1044 changes.


    Then it's best to create the utilities lib at you top level site here:


    to do so go here and then click the create link:


    Then you're ready to move tot he next step.


    Let me know,


  • This is by far the best PDF solution to date for O365.  Everything works fine for me, although there are select folders within the libraries that do not seem to automatically work with the solution.  The "Open in PDF" option works 100% of the time, but I'm referring to the icon appearing and the file link actually opening in PDF by default.  Any file with a "." anywhere in the filename will cause the automatic handler to fail, but again the manual opener still functions.  Rename the file and everything works great.

    BUT - I have noticed that immediately after adding the Content Editor web part, the "Library Tools" header disappears from the top of the screen.  This removes the user's ability to "open in explorer" which is what 99% them click that library button for.  Not sure if the scripts are conflicting or what.  You've been a real hero so far jbooker - do you have any idea why this is happening?


  • Hey Art,


    Thanks for trying the solution and for your kind words.
    I learned of these issues yesterday.  I don't have a fix yet as I'll have to recreate them in my environ and examine the html source to work around it.  The script fails when there is a folder in the doc lib view.
    The multi-dot thing is a toss-up.   The script parses the file name to see if it's .pdf
    Unfortunately with client side script, all I have to work with is the HTML that sharepoint outputs which is less than stellar.  I could code it for the last dot, but then if the doc is checked out and the checked-out-to person has a dot in their full name, then it would fail.  I just didn't have the time to debug this anymore.  So I gambled and figured there were fewer folks using dots in file names than those with middle initials.
    If you have many the former and not so much the latter than I could help you make a simple change to the code.
    If you're crafty, you could modify \utilities\pdf.js to solve these issues. 
    It may be a while, but I will let you know when I get to fixing these.


    The disapearing ribbon is a mirage.  Try selecting anything within the Doc List and you should see the ribbon tabs apear.  I believe this is expected behaviour as the ribbons are context sensative to what is selected on the page.  After adding the CEWP, you now have two webparts so the doc list view must be selected to get the ribbon.


    Let me know if I'm wrong on this.


  • I put my web designers on your script and the folder-fail issue has been resolved.  They tell me that it was a relatively simple matter, but I can send you the file if you would like to see the fix.  I saw what you meant with the Library Tools bar and have informed our users.  The period issue is so minor that I'm not sure it's worth bothering with.  I'll just tell users not to use extra periods in the filenames, along with "&", "@", etc.

    Thanks for a great job with this issue.  It looks like it's been a one-man campaign to address the problem, and it's safe to say that you're the only one with a solution canned enough for widespread use.  Shame though...I was so proud of the workflow we had built....  Ah well - your latest solution is lightyears better.  Hopefully it stays functional after the upcoming "upgrades" to O365.

    Let me know if you want that file.  And thanks again.  -A

    Art Smith, Director of Operations for CVR

  • Hey Art,


    Another user has fixed the folder issue today as well so it's turning into a shared effort which is nice.  The extra dot is fixed as well.  I will post the fix on my site ASAP. The last issue I know of is a failure when the doc lib is in grouped view.  Check it out if you have idle designers.


    Please do send me the file if you would.  It's nice to see how you resolved it.


    Send me your email here and I'll reply plus I'll keep you posted about updates:




  • The new pdf.js is working great.  This is now the ultimate PDF solution for the 365 cloud - it's 100% transparent to the clients.  Opening PDF files feels quicker, too.  Must be my imagination...

  • Folks,

    If you have implemented the complete solution, then you may wish to get the most recent update.

    I added another step to the instructions.  This is to update your version of the javascript.

    Special thanks to Randall for working to fix:

      • Issue with Links and Icons when Folders exist in Doc Lib View

      • Issue with multi-dot file names

      • Issue with browser viewing when doc is checked out.

    Upload the latest version of pdf.js to your utilities library.

    •download it here:  (Last Update 2011.10.14)


    UPDATE :

    To get most recent version of utilities files goto this site and proceed with step 2:


    Last remaining issue I'm aware of is faillure when doc lib view is grouped.  Anyone? anyone?

    Seriously, thanks to everyone for your help and suggestions.



  • Update:

    The failure when Document Library view is Grouped has been fixed (mostly)  Also, the Icons and links work in Firefox now.

    Upload the latest version of pdf.js to your utilities library.

    •download it here:

    (Last Update 2011.10.17)


    UPDATE :

    To get most recent version of utilities files goto this site and proceed with step 2:


    Have a nice day!


  • One more error has been discovered today.  A file or folder with an apostrophe in the name will cause the script to crash.  I'm guessing the apostrophe causes the script to think everthing behind it is a comment and stop running, but I'm no programmer.  The simple solution is to remove the offending mark, but I thought you should know.

  • Hi Art,


    Thanks for bringing this to my attention.


    This is fixed.  Please upload the latest pdf.aspx to your Utilities Library.


    Right Click the following link and 'Save Target As'


    Then go to your Utilities Library and Upload that file and try a PDF with apostrophe again.

  (Last Update 2011.10.19)


    UPDATE :

    To get most recent version of utilities files goto this site and proceed with step 2:


    Let me know how it goes.




  • As usual, it works like a charm.   Great work!

  • Just found this "complete solution", about to try it out. Can't believe MS have not included this capability.

  • OK, i have run into a problem. Please be aware i'm new to Sharepoint and Office 365 so it may be someting really basic.

    I have an o365 trial, plan P1. I'm on about Day 40 so the trial has expired but i'm within the period where it still appears to work OK.

    Step 1, Downloaded UtilitiesLibrary_20110930.stp to my local PC OK.

    Step 2, Within o365 went to <YourSite>/_catalogs/LT and uploaded above library OK. I used the "Upload Document" button off "Library Tools > Documents" toolbar, is this correct?

    Step 3, Went to <YourSite>/_layouts/viewlsts.aspx and created the "Utilities" library as shown in instructions. I got the "An unexpected error has occured" but ignored this as per the guide. The "Utilities" library is now listed below "Libraries" on the left hand navigation bar (don't know correct term!) but if i click on this library there are no files listed within the library. In other words, within jbookers instructions the screen grab of "Website > Utilities > All Documents" shows 5 files, ICPDF, jquery_1.4.4, etc , but on my o365 there are no files listed.

    I have read all this thread and don't see anyone else having this trouble, any pointers to what could i have done wrong?

    Many thanks, Guy

Page 5 of 12 (177 items) «||3|4|5|6|7||»