Compared to the original (http://viewerjs.org/) this fork:
- Will show a warning message if the document is not supported
- Can play video files (thanks to https://github.com/Ryusei217/ViewerJS)
- Can show image files (thanks to https://github.com/Ryusei217/ViewerJS)
- Can be build with node (instead of make/cmake)
- Is easier to use with node-js/express-js
- No inline style and inline script tags in index.html
- Can be found on NPM (node-viewerjs)
- HTML viewer (can be used for docx with mammoth)
- Text viewer
- Merge fixes and features from h44z, Ryusei217, Illkkah, vendernorth, boris-petrov, cozy, giftnuss, putuyuwono.
- Update pdf.js and video.js.
- Add OpenDocument test files (from https://webodf.org).
- Allow to use argument "?file=my-file.odt" instead of the hash "#my-file.odt" to specify the file to display.
npm install
npm run buildOnce installed and build, run npm run test, then go to http://localhost:5581/index.html#/files/text.odt.
var express = require('express'),
app = express();
app.use('/viewer', express.static('node_modules/node-viewerjs/release'));++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
The viewer uses HTML, CSS, and icons derived from the Mozilla PDF.js project. Some icons are derived from the http://www.iconsweets.com/ project under a Creative Commons Attribution 3.0 Unported license.
ViewerJS combines a number of excellent open source tools that are built on HTML and javascript. ViewerJS was funded by NLnet foundation and developed by KO GmbH.
The heavy lifting in ViewerJS is done by these awesome projects:
WebODF is a JavaScript library created by KO GmbH. It was started by Jos van den Oever at KO and is now developed by a growing team including external collaborators. It makes it easy to add Open Document Format (ODF) support to your website and to your mobile or desktop applications. It uses HTML and CSS to display ODF documents.
PDF.js is a library created by Andreas Gal and others at Mozilla Labs. It is an HTML5 technology experiment that explores building a faithful and efficient Portable Document Format (PDF) renderer without native code assistance.
You can find additional information, some usage guides, and live examples at the project homepage.
ViewerJS uses cmake. Just follow these steps:
git clone http://github.com/kogmbh/ViewerJS.git
mkdir build
cd build
cmake ../ViewerJS
makeYou will find the following two products in the build directory if everything goes well:
viewerjs-{x.y.z}.zipviewerjs-wordpress-{x.y.z}.zip
... where {x.y.z} denotes the version.
ViewerJS is a Free Software project. All code is available under the AGPL.
If you are interested in using ViewerJS in your commercial product (and do not want to disclose your sources / obey AGPL), contact license@viewerjs.org for a commercial license.