Vuzit document viewer control class.
fromId: function(id,inputOptions)
Creates a new Viewer object for a document with the requested web ID and returns it.
vuzit.Viewer
var viewer = vuzit.Viewer.fromId("1a", {onComplete: doSomething, ssl: false} );
fromUrl: function(url,inputOptions)
Creates a new Viewer object for a document with the requested url and returns it.
var viewer = vuzit.Viewer.fromUrl("http://someurl.com", {onComplete: doSomething, ssl: false} );
var viewer = new vuzit.Viewer("http://someurl.com", {onComplete: doSomething, ssl: false} );
destroy: function()
Cleans up all objects and memory.
none
viewer.destroy();
destroyDisplay: function()
Cleans up all objects and memory related only to displaying a Viewer on a screen
viewer.destroyDisplay();
display: function(div,options)
Creates the viewer display for the document defined in the “url” property.
viewer.display(document.getElementById('vuzit_view'), {zoom: 1 });
getDocument: function()
The Document instance member.
vuzit.Document
var document = viewer.getDocument();
getPageNumber: function()
The current page number.
integer
var page_num = viewer.getPageNumber();
getUrl: function()
The current URL of the document.
string
var url = viewer.getUrl();
getZoom: function()
The current zoom level.
var zoom_level = viewer.getZoom();
hide: function()
Hides the viewer on the page.
viewer.hide();
isDestroyed: function()
Returns whether the window is in destroyed state.
boolean
if (! viewer.isDestroyed) { viewer.setPageNumber(2); }
pageNext: function()
Jumps to the next page.
viewer.pageNext();
pagePrevious: function()
Jumps to the previous page.
viewer.pagePrevious();
setFullScreenUrl: function(url)
Sets the URL of the full screen link. The URL must have a “$[URL]” sub-sting in it to set the proper link.
viewer.setFullScreenUrl('http://example.com/viewer.htm?url=$[URL]');
setPageNumber: function(page)
Sets the current page.
viewer.setPageNumber(2);
setSize: function(width,height)
Sets the size of the control after initialization has occurred. Useful for handling onresize events.
viewer.setSize(640, 480)
setId: function(id)
Sets the id of the document. Called by the constructor, but can also be called afterwards to bring in a new document to the Viewer.
nothing
viewer.setId('5');
setUrl: function(url)
Sets the URL of the document. Called by the constructor, but can also be called afterwards to bring in a new document to the Viewer.
viewer.setUrl('http://example.com/some.pdf');
setZoom: function(zoom)
Sets the current zoom level.
viewer.setZoom(0);
show: function()
Unhides the viewer on the screen.
viewer.show();