What is it?:
Document Preview is embedding a document display mechanism into the item display page. It makes the distance between the item in your repository, and the end user smaller as PDF's no longer require the user to have a PDF Viewer installed on their computer. And its faster, as the document begins loading in the page.
Before installing, be sure to check out Google's Terms of Service, and check that your usage is consistent with your institution's licensing policies, and is consistent with Google's usage policies. https://docs.google.com/viewer/TOS?hl=en. Additionally, there are limitations to how far this method can be customized, in which case another solution, such as @mire's document streaming would make more sense.
Document Preview in JSPUI
Document Preview in XMLUI
Document Preview with Google Docs viewer can be installed on either XMLUI or JSPUI, as it is just embedding a web service on your site.
- dspace-jspui/dspace-jspui-api/src/main/java/org/dspace/app/webui/jsptag/ItemTag.java (Item Display Page)
- Patch ItemTag.java to add the preview button and the hidden row that contains the iframe.
- Copy utils.js from dspace-jspui/dspace-jspui-webapp/src/main/webapp/utils.js to dspace/modules/jspui/src/main/webapp/utils.js
- Patch utils.js to add some additional needed functions.
Best practices are to put customizations into a theme directory, and not to modify the dri2xhtml files.
NOTE: I originally posted this concept at Document Preview in DSpace, using Google Docs Viewer