Quantcast

Sales:
(215) 821-7004

Class Reference

vuzit.Document

Document data class.

Summary
vuzit.DocumentDocument data class.
Functions
getErrorMessageThe error message returned by the processing service.
getFileNameThe file name.
getFileSizeThe file size in bytes.
getFileTypeThe file type as a string (‘doc’, ‘pdf’, ‘xls’).
getHeightThe page height in pixels at the passed in zoom level.
getHeightThumbThe height of the thumbnail in pixels.
getIdThe document ID.
getImageTypeThe image type extension returned as a string (‘jpg’, ‘png’, etc).
getModifiedAtThe last date the document was modified.
getPageCountThe length of the document in number of pages.
getSubjectThe document subject metadata.
getSubmittedAtThe last date the document was modified.
getTitleThe title of the document.
getUrlThe URL of the document.
getUrlImageThe URL of the image at the specified page and zoom level.
getUrlImageThumbThe URL of the thumbnail image at the specified zoom level.
getWidthThe page width in pixels at the passed in zoom level.
getWidthThumbThe width of the thumbnail in pixels.
getZoomCountThe number of zoom levels available.
isDownloadableTrue if the document is downloadable.
isProcessingCompleteTrue if the document is done processing.
isPrintPdfTrue if the printpdf is enabled.
isProcessingSuccessTrue if the document was processed successfully, and ready to be displayed.

Functions

getErrorMessage

getErrorMessage: function()

The error message returned by the processing service.

Parameters

none

Returns

string

Example

var error = document.getErrorMessage();

getFileName

getFileName: function()

The file name.

Parameters

none

Returns

integer

Example

var size = document.getFileName();

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();

getSubmittedAt

getSubmittedAt: function()

The last date the document was modified.

Parameters

none

Returns

string

Example

var date = document.getSubmittedAt();

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();

isDownloadable

isDownloadable: function()

True if the document is downloadable.

Parameters

none

Returns

boolean

Example

var downloadable = document.isDownloadable();

isProcessingComplete

isProcessingComplete: function()

True if the document is done processing.  A document is processed once and only once, the first time it is viewed.  After calling this function, you might want to check Document::isProcessingSuccess() to make sure the conversion was successful.

Parameters

none

Returns

boolean

Example

var complete = document.isProcessingComplete();

isPrintPdf

isPrintPdf: function()

True if the printpdf is enabled.

Parameters

none

Returns

boolean

Example

var printpdf = document.isPrintPdf();

isProcessingSuccess

isProcessingSuccess: function()

True if the document was processed successfully, and ready to be displayed.  A document is processed once and only once, the first time it is viewed.

Parameters

none

Returns

boolean

Example

var success = document.isProcessingSuccess();
getErrorMessage: function()
The error message returned by the processing service.
getFileName: function()
The file name.
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.
getSubmittedAt: function()
The last date the document was modified.
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.
isDownloadable: function()
True if the document is downloadable.
isProcessingComplete: function()
True if the document is done processing.
isPrintPdf: function()
True if the printpdf is enabled.
isProcessingSuccess: function()
True if the document was processed successfully, and ready to be displayed.

Documentation generated by Natural Docs.