Options
All
  • Public
  • Public/Protected
  • All
Menu

A content document that has been processed by a format adapter to be used by the Reading System.

Hierarchy

Index

Methods

createRenderableDocument

createRenderableDocumentPageIterator

fetchContentBlockTree

  • Fetch the content block tree for this reader document.

    Returns Promise<IContentBlockTree>

fetchContentBlocks

fetchContentLocationForEntireDocument

  • Get the ContentLocation representing the range of the entire ReaderDocument.

    Returns Promise<IContentLocation>

fetchEstimatedHeight

fetchEstimatedNumberOfPages

  • Get the estimated number of pages this document will generate when reflowing into multiple pages. For fixed-layout documents, this method will always return 1.

    Parameters

    Returns Promise<number>

fetchLocatorForContentBlockData

  • fetchLocatorForContentBlockData(contentBlockData: IContentBlockData, charOffset?: number, charLength?: number): Promise<ILocator>
  • Fetch the locator for the complete or partial content block. NOTE: This method still exists for the legacy search API.

    deprecated

    since 0.28.0 - Please use fetchContentBlockTree(), and use IContentBlock.getLocator() instead.

    Parameters

    • contentBlockData: IContentBlockData

      The content block data to retrieve locator for.

    • Optional charOffset: number

      The character offset within textBlock.textContent. Defaults to 0.

    • Optional charLength: number

      The number of characters after charOffset to include in the locator. Defaults to end of textContent if omitted.

    Returns Promise<ILocator>

fetchViewportDimensions

  • Get the document viewport dimensions if this document defines any.

    Returns Promise<IDimensions>

getAvailableSyncMediaFormats

  • The sync media formats available in this reader document.

    Returns SyncMediaFormat[]

getContentLocation

  • Get the ContentLocation to the start of this ReaderDocument.

    Returns IContentLocation

getIndexInSpine

  • getIndexInSpine(): number
  • The index of this reader document within the parent IReaderPublication spine.

    Returns number

getLocator

  • Get a locator that points to this document.

    Returns Locator

getReaderPublication

getSourceContentDocument

  • Get the underlying content document this instance is wrapping.

    Returns IContentDocument

isReflowable

  • isReflowable(): boolean
  • If this document can be reflowed into multiple pages.

    Returns boolean

isRenderable

  • isRenderable(): boolean
  • If the document can be rendered using a ReaderView.

    Returns boolean

toJSON

Generated using TypeDoc