...
FlexPaper is a web-based PDF Viewer that can be compiled into html4, html5, and flash based assets. Among the Document Viewer Integration options documented on the DSpace site, this solution is unique in providing an html5 solution with page-turning animation. This feature is particularly useful for rendering digitized rare books.
This solution requires a licensed copy of FlexPaper Zine. This page will outline the steps required to integrate FlexPaper Zine into the XMLUI user interface.
This is a template page for a new DSpace contribution. If you are unsure about the appropriate format or content, just look at this example. This page can be copied and used to fill out your new documentation.
Make sure you do NOT use Heading level 1, and stick to level 2 as the highest level in your document. Level one is reserved for the top level headings in the PDF version of the documentation.
...
title | How to use info boxes |
---|
...
title | Checklist: this is when you're done |
---|---|
enableLocking | true |
...
Info | ||
---|---|---|
| ||
FlexPaper offers a dynamic viewer and a viewer that utilizes pre-compiled assets (several assets per page). This solution describes how to integrate the dynamic viewer into DSpace.
The dynamic viewer requires no pre-processing of assets which simplifies deployment. End users will need to wait for a PDF file to download fully before the viewer will render.
Use case and high level benefits
The FlexPaper Document Viewer will allow an end user to view a digitized book as a book. This feature is particularly useful for rendering digitized books and digitized rare books.
Installation
Purchase a FlexPaper Zine Commercial License.
Download your licensed copy of the software. http://flexpaper.devaldi.com/download/
Create a folder named flexpaper in /dspace/modules/xmlui/src/main/webapp/static
From your FlexPaper download, copy the css, js, and locale data folders into /dspace/modules/xmlui/src/main/webapp/static/flexpaper
Create the following in /dspace/modules/xmlui/src/main/webapps/static/:
template.html
bookview-banner.html,
bookview-banner.js
- Source for these files
- https://gist.github.com/terrywbrady/487acdb7d5bf779036bb
- Replace $$$YOUR_KEY_HERE$$ with your license key
- Customize bookview-banner.html to match your theme
Add the following to /dspace/modules/xmlui/src/main/webapp/sitemap.xmap
Code Block lang xml <map:match pattern="static/**.js">
...
...
...
...
<map:read type="ConcatenationReader" src="static/{1}.js"> <map:parameter name="requestQueryString" value="{request:queryString}"/> </map:read>
...
...
...
...
...
...
...
...
...
...
...
...
...
...
</map:match>
...
<map:match pattern="static/**.css"> <map:read type="ConcatenationReader" src="static/{1}.css">
...
...
...
...
...
...
...
...
...
...
...
...
...
...
<map:parameter name="requestQueryString" value="{request:queryString}"/> </map:read>
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
</map:match>
...
<map:match pattern="*.txt"> <map:read src="static/{1}.txt"/> </map:match>
Update the template for mets:file in your custom theme. Add a hypertext link to your FlexPaper template
See dspace/dspace-xmlui/src/main/webapp/themes/dri2xhtml/General-Handler.xsl
Code Block lang xml <xsl:if test="@MIMETYPE='application/pdf'"> <xsl:variable name="bitstreamurl" select="mets:FLocat[@LOCTYPE='URL']/@xlink:href"/> <xsl:variable name="bitstreamid" select="@ID"/> <td> <xsl:choose> <xsl:when test="contains($bitstreamurl, 'isAllowed=n')"> <xsl:text>Restricted Access</xsl:text> </xsl:when> <xsl:otherwise> <a target="bookView"> <xsl:attribute name="href"> <xsl:text>/static/flexpaper/template.html?path=</xsl:text> <xsl:value-of select="$bitstreamurl"/> </xsl:attribute> <!-- TODO: internationalize the image label --> <xsl:text>Book View</xsl:text> </a> </xsl:otherwise> </xsl:choose> <xsl:text> </xsl:text> </td>
Technical Implementation Details
This solution has been designed with a loose integration with XMLUI rendered only at item display.
Warning | ||
---|---|---|
| ||
Large PDF's will take some time to render in the viewer. You might wish to develop a solution to pre-compile high-demand assets using FlexPaper Desktop or the FlexPaper server compilation components. The sample file template.html contains commented out code that suggests a mechanism to detect the presence of pre-compiled components. |
Info | ||
---|---|---|
| ||
Warning | ||
---|---|---|
| ||
The dynamic FlexPaper viewer does not gracefully handle documents with inconsistent page sizes. The FlexPaper desktop flash component handles inconsistent page sizes more gracefully than the dynamic viewer. |
Info | ||
---|---|---|
| ||
DigitalGeorgetown Example: Pre-compiled Book Viewer with Inconsistent Page Sizes |
Use case and high level benefits
Describe which need the contribution is fulfilling and why it was originally created. Screenshots are always nice and will make people enthusiastic about your contribution.
Installation
If it takes any work to enable the contribution, please elaborate in detail. It is recommended that you provide a good default configuration so that your configuration can run straight out of the box.
Technical Implementation Details
If there are any possibilities to customize the contribution, it is good to provide some details on your implementation, or which design decisions have been taken.
Warning | ||
---|---|---|
| ||
If your contribution is known to be untested or incompatible with certain parts of DSpace, for example JSPUI/XMLUI, Oracle, ... highlight it in a warning like this. Warnings can be found under Insert > Other Macros |
Sub headings are generally fine
Recommended so that people can easily navigate using the Table of Contents at the top.
but don't
drive it too far
Heading 5 is generally not used and has no visual difference with heading 4. When in doubt, don't use Heading lvl 5.
Configuration
Explain which configuration parameters are available, in which files they can be found and which procedure is required for updating. Does it require a rebuild or is a tomcat restart enough, etc?
Where should I put my page? (DELETE this section from template when finished)
Here is a very short introduction to the hierarchy of the documentation. when in doubt, put your page straight under Using DSpace.
...
- Ingesting Content and Metadata: relevant section if your feature is related to the creation of content in DSpace
- Exporting Content and Metadata: relevant section for getting content out of DSpace
...
- Command Line Operations: important page that you can edit if your new contribution introduces any new command line operations.
...