Quantcast

Class Reference

vuzit. Document

Document data class.

Summary
Document data class.
The error message returned by the processing service.
The file size in bytes.
The file type as a string (‘doc’, ‘pdf’, ‘xls’).
The page height in pixels at the passed in zoom level.
The height of the thumbnail in pixels.
The document ID.
The image type extension returned as a string (‘jpg’, ‘png’, etc).
The last date the document was modified.
The length of the document in number of pages.
The document subject metadata.
The title of the document.
The URL of the document.
The URL of the image at the specified page and zoom level.
The URL of the thumbnail image at the specified zoom level.
The page width in pixels at the passed in zoom level.
The width of the thumbnail in pixels.
The number of zoom levels available.
True if the document is done processing
True if the document converted successfully.
Reprocesses the document.

Functions

getErrorMessage

getErrorMessage: function()

The error message returned by the processing service.

Parameters

none

Returns

string

Example

var error = document.getErrorMessage();

getFileSize

getFileSize: function()

The file size in bytes.

Parameters

none

Returns

integer

Example

var size = document.getFileSize();

getFileType

getFileType: function()

The file type as a string (‘doc’, ‘pdf’, ‘xls’).

Parameters

none

Returns

string

Example

var type = document.getFileType();

getHeight

getHeight: function(idZoom)

The page height in pixels at the passed in zoom level.

Parameters

zoomThe height at specified zoom level.

Returns

integer

Example

var height = document.getHeight(2);

getHeightThumb

getHeightThumb: function()

The height of the thumbnail in pixels.

Parameters

none

Returns

integer

Example

var height = document.getHeightThumb();

getId

getId: function()

The document ID.

Parameters

none

Returns

string

Example

var id = document.getId();

getImageType

getImageType: function()

The image type extension returned as a string (‘jpg’, ‘png’, etc).

Parameters

none

Returns

string

Example

var type = document.getImageType();

getModifiedAt

getModifiedAt: function()

The last date the document was modified.

Parameters

none

Returns

string

Example

var date = document.getModifiedAt();

getPageCount

getPageCount: function()

The length of the document in number of pages.

Parameters

none

Returns

integer

Example

var page_count = document.getPageCount();

getSubject

getSubject: function()

The document subject metadata.

Parameters

none

Returns

string

Example

var subject = document.getSubject();

getTitle

getTitle: function()

The title of the document.

Parameters

none

Returns

string

Example

var title = document.getTitle();

getUrl

getUrl: function()

The URL of the document.

Parameters

none

Returns

string

Example

var url = document.getUrl();

getUrlImage

getUrlImage: function(idPage,
idZoom)

The URL of the image at the specified page and zoom level.

Parameters

idPageThe page number.  The first page is 0, and the last page is getPageCount()-1.
idZoomThe zoom level.  The smallest zoom level is 0, and the largest is getZoomCount()-1.

Returns

string

Example

var url = viewer.getDocument().getUrlImage(0, 1);

getUrlImageThumb

getUrlImageThumb: function(idPage)

The URL of the thumbnail image at the specified zoom level.

Parameters

idPageThe page number.  The first page is 0, and the last page is getPageCount()-1.

Returns

string

Example

var url = viewer.getDocument().getUrlImageThumb(0);

getWidth

getWidth: function(idZoom)

The page width in pixels at the passed in zoom level.

Parameters

zoomThe width at specified zoom level.

Returns

integer

Example

var width = document.getWidth(2);

getWidthThumb

getWidthThumb: function()

The width of the thumbnail in pixels.

Parameters

none

Returns

integer

Example

var width = document.getWidthThumb();

getZoomCount

getZoomCount: function()

The number of zoom levels available.

Parameters

none

Returns

integer

Example

var num_zooms = document.getZoomCount();

isProcessingComplete

isProcessingComplete: function()

True if the document is done processing

Parameters

none

Returns

boolean

Example

var complete = document.isProcessingComplete();

isProcessingSuccess

isProcessingSuccess: function()

True if the document converted successfully.

Parameters

none

Returns

boolean

Example

var success = document.isProcessingSuccess();

reprocess

reprocess: function(options)

Reprocesses the document.  This is useful if there previously was an error.

Parameters

options<see options parameters for setUrl()>

Returns

none

Example

document.reprocess();
getErrorMessage: function()
The error message returned by the processing service.
getFileSize: function()
The file size in bytes.
getFileType: function()
The file type as a string (‘doc’, ‘pdf’, ‘xls’).
getHeight: function(idZoom)
The page height in pixels at the passed in zoom level.
getHeightThumb: function()
The height of the thumbnail in pixels.
getId: function()
The document ID.
getImageType: function()
The image type extension returned as a string (‘jpg’, ‘png’, etc).
getModifiedAt: function()
The last date the document was modified.
getPageCount: function()
The length of the document in number of pages.
getSubject: function()
The document subject metadata.
getTitle: function()
The title of the document.
getUrl: function()
The URL of the document.
getUrlImage: function(idPage,
idZoom)
The URL of the image at the specified page and zoom level.
getUrlImageThumb: function(idPage)
The URL of the thumbnail image at the specified zoom level.
getWidth: function(idZoom)
The page width in pixels at the passed in zoom level.
getWidthThumb: function()
The width of the thumbnail in pixels.
getZoomCount: function()
The number of zoom levels available.
isProcessingComplete: function()
True if the document is done processing
isProcessingSuccess: function()
True if the document converted successfully.
reprocess: function(options)
Reprocesses the document.

Documentation generated by Natural Docs.