texxasrulez / pdfviewer
PDF Viewer plugin
Installs: 14
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Language:Java
Type:roundcube-plugin
Requires
- php: >=5.3.0
- roundcube/plugin-installer: >=0.1.3
This package is auto-updated.
Last update: 2025-09-07 22:52:20 UTC
README
The rendering of PDF documents is based on the pdf.js library by andreasgal. See http://mozilla.github.com/pdf.js/ for more information.
INSTALLATION
Add 'pdfviewer' to the list of plugins in the config/main.inc.php file of your Roundcube installation.
BUILD (for developers only)
Clone the git repository into a local directory:
$ git clone https://github.com/mozilla/pdf.js.git pdfjs $ cd pdfjs
To actually build the viewer, node.js is required!
$ node make generic
The viewer is generated in build/generic/web/ and the pdf.js script in build/generic/build/pdf.js. Copy build/generic/web/ to the plugin directory /plugins/pdfviewer/viewer/ and also copy pdf.js into the viewer directory:
$ cd /plugins/pdfviewer $ cp -r /build/generic/web viewer $ cp /build/generic/build/pdf.js viewer/pdf.js $ cp /build/generic/build/pdf.worker.js viewer/pdf.worker.js $ rm viewer/*.pdf
Then apply the pdfjs-viewer.diff patch to adjust the viewer for the use within Roundcube:
$ patch -p0 < pdfjs-viewer.diff
Optionally, compress the scripts using Google's Closure Compiler [1] or the YUI Compressor [2].
$ /bin/jsshrink.sh viewer/pdf.js ECMASCRIPT5 $ /bin/jsshrink.sh viewer/viewer.js ECMASCRIPT5
This will create minimized versions in viewer/*.min.js which are linked by the viewer.html template.
[1] http://closure-compiler.googlecode.com/ [2] http://developer.yahoo.com/yui/compressor/