node-viewerjs-ilkkah
Version:
Document viewer component for PDF and ODF documents. Done with just HTML5, CSS3, and JavaScript. Powered by pdf.js and WebODF.
61 lines (45 loc) • 1.26 kB
JavaScript
function TextViewerPlugin() {
"use strict";
var self = this,
pluginName = "HTMLViewerPlugin";
this.initialize = function ( viewerElement, documentUrl ) {
var iframe = document.createElement('iframe');
iframe.style.width = '100%';
iframe.style.height = '99.5%';
iframe.style.border = 'none';
iframe.style.backgroundColor = '#fff';
iframe.src = documentUrl;
viewerElement.appendChild(iframe);
this.onLoad();
};
this.isSlideshow = function () {
};
this.onLoad = function () {
};
this.fitToWidth = function ( width ) {
};
this.fitToHeight = function ( height ) {
};
this.fitToPage = function ( width, height ) {
};
this.fitSmart = function ( width ) {
};
this.getZoomLevel = function () {
};
this.setZoomLevel = function ( value ) {
};
// return a list of tuples (pagename, pagenode)
this.getPages = function () {
return [1];
};
this.showPage = function ( n ) {
};
this.getPluginName = function () {
return pluginName;
};
this.getPluginVersion = function () {
};
this.getPluginURL = function () {
return pluginURL;
};
}