Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IProductionViewer

Production Viewer IViewerInstance

Hierarchy

Index

Properties

currentPageIndex

currentPageIndex: number

Gets the current page index.

returns

id

id: string

ID of the instance

isBootstrapped

isBootstrapped: boolean

Whether or not the viewer instance has been bootstrapped

loadError

loadError: Error

Populated with error when loadSuccessful is false. Otherwise, undefined.

readonly
returns

loadSuccessful

loadSuccessful: boolean

Returns true, if document was loaded into view without error.

readonly
returns

name

name: string

Name of the viewer instance

oiPagesLoadedCount

oiPagesLoadedCount: number

Gets the current number of loaded pages for the current document.

returns

thumbnailsVisible

thumbnailsVisible: boolean

Returns true if thumbnails are visible

returns

type

Viewer type

Methods

activate

  • activate(): Promise<void>
  • Activate lifecycle method that is invoked when the instance is becoming the IViewerCollection's active viewer

    Returns Promise<void>

    Promise that is resolved once activation is complete.

bootstrap

  • Bootstrap lifecycle method for one-time setup of the viewer instance.

    This method is called after the instance's DOM element has been setup, but before any documents are loaded.

    Parameters

    • elementId: string

      ID of the viewer instance's DOM element

    • collection: IViewerCollection

      The viewer collection the instance belongs to

    Returns Promise<void>

    Promise that is resolved once bootstrapping is complete.

canDeactivate

  • canDeactivate(): boolean
  • CanDeactivate lifecycle method that is invoked when the IViewerCollection needs to determine if it is safe to unload a document

    Returns boolean

    Whether or not it is safe to load a new item, deactivate the viewer, or teardown the viewer.

deactivate

  • deactivate(): Promise<void>
  • Deactivate lifecycle method that is invoked when the instance is no longer the IViewerCollection's active viewer

    Returns Promise<void>

    Promise that is resolved once deactivation is complete.

getPageRotation

  • getPageRotation(index: number): number
  • Gets the page rotations in degrees for a particular page

    Parameters

    • index: number

    Returns number

    Page rotation value

load

  • load(item: IQueueItem): Promise<void>
  • Load lifecycle method that is invoked when the viewer instance should load a document from the queue

    Parameters

    • item: IQueueItem

      Item to be loaded and displayed to the user

    Returns Promise<void>

    Promise that is resolved once the item has been loaded.

moveToNextPage

  • moveToNextPage(): void
  • Moves to the next page on the OI Doc

    description

    Rendering is asynchronous while the call to move to page is synchronous

    Returns void

moveToPage

  • moveToPage(pageIndex: number): void
  • Moves to pageIndex if exists in the OI document.

    description

    Rendering is asynchronous while the call to move to page is synchronous

    Parameters

    • pageIndex: number

      Index of target page. This index is 0-based.

    Returns void

moveToPreviousPage

  • moveToPreviousPage(): void
  • Moves to the previous page on the OI Doc

    description

    Rendering is asynchronous while the call to move to page is synchronous

    Returns void

openSaveAsPdfModal

  • openSaveAsPdfModal(): Promise<DialogCancellableOpenResult>
  • Opens the Save as PDF Modal

    Returns Promise<DialogCancellableOpenResult>

reload

  • reload(): Promise<void>
  • Reload lifecycle method that is invoked when the viewer instance should refresh all of it's data before reloading the current queue item

    Returns Promise<void>

    Promise that is resolved once the reload is complete.

rotateAllPagesClockwise

  • rotateAllPagesClockwise(): Promise<boolean>
  • Rotates the all pages clockwise 90 degrees based on the current page (The topmost image) orientation and updates the database

    Returns Promise<boolean>

    Promise that resolves to a boolean indicating whether it succeeded or not

rotateCurrentPageClockwise

  • rotateCurrentPageClockwise(): Promise<boolean>
  • Rotates the current page (The topmost image) clockwise 90 degrees and updates the database

    Returns Promise<boolean>

    Promise that resolves to a boolean indicating whether it succeeded or not

setPageLayoutMode

  • setPageLayoutMode(scrollMode: ViewerScrollMode): void
  • Sets the page layout mode for the current OI View using the passed in value

    Parameters

    • scrollMode: ViewerScrollMode

      scroll mode setting

    Returns void

setPageRotation

  • setPageRotation(rotation: number, index: number): Promise<boolean>
  • Sets the page rotation for a particular page and updates the database

    Only accepts intervals of 90 degrees

    Parameters

    • rotation: number
    • index: number

    Returns Promise<boolean>

    Promise that resolves to a boolean indicating whether it succeeded or not

setPageRotationAllImages

  • setPageRotationAllImages(rotation: number): Promise<boolean>
  • Sets all page rotations for a document and updates the database

    Only accepts intervals of 90 degrees

    Parameters

    • rotation: number

    Returns Promise<boolean>

    Promise that resolves to a boolean indicating whether it succeeded or not

teardown

  • teardown(): Promise<void>
  • Teardown lifecycle method for one-time teardown of the viewer instance.

    This method is called when the IViewerCollection is being torn down.

    Returns Promise<void>

    Promise that is resolved once teardown is complete.

toggleThumbnails

  • toggleThumbnails(showThumbnails: boolean): void
  • Toggles Outside In Thumbnails functionality based on thumbnailsVisible property

    Parameters

    • showThumbnails: boolean

    Returns void

totalPageCount

  • totalPageCount(): number
  • returns the total number of pages on the current document

    description

    this will return the total page count for the active viewer's document

    Returns number