Options
All
  • Public
  • Public/Protected
  • All
Menu

A publication that has been processed to be used by the Reading System. A ReaderPublication wraps a source publication and provides functionality for creating renderable content, full text search and more.

Hierarchy

Index

Methods

destroy

  • destroy(): void
  • Destroy this instance, allowing used resources to be garbage collected. This method has the same effect as calling readingSystemEngine.unloadPublication(),

    Returns void

fetchContentLocation

  • Fetch the resolved IContentLocation from a locator, ILocatorData, URL, URI, URN, IRI.

    In contrast to UnresolvedContentLocation, a ContentLocation knows its position within the publication content and can thereby be used to compare and sort ContentLocation instances synchronously.

    See IContentLocation for more information

    Parameters

    Returns Promise<IContentLocation>

fetchPreferredPageAspectRatio

  • fetchPreferredPageAspectRatio(): Promise<number>
  • Fetch the preferred aspect ratio of pages in this publication defined as (width / height)

    Returns Promise<number>

fetchPublicationNavigation

fetchUnresolvedContentLocation

  • Fetches an UnresolvedContentLocation from a Locator, ILocatorData, URL, URI, URN, IRI. Can be used for extracting various publication data related with the Locator.

    Parameters

    Returns Promise<IUnresolvedContentLocation>

getAvailableContentPositionTimelineUnits

  • The units of measure that can be used when creating ContentPositionTimeline objects using this publication.

    See IEpubReaderPublication.createContentPositionTimeline() and IPdfReaderPublication.createContentPositionTimeline() for how to create ContentPositionTimeline objects.

    Returns ContentPositionTimelineUnit[]

getAvailableSyncMediaFormats

  • The sync media formats available in this publication.

    Returns SyncMediaFormat[]

getDefaultLocatorUrl

  • getDefaultLocatorUrl(): string
  • The base URL used when creating Locators pointing to content in this publication.

    Returns string

getLocatorFactory

  • Get the LocatorFactory used when creating new Locators.

    Returns ILocatorFactory

getOptions

getReaderPublicationStorage

  • Get the IReaderPublicationStorage instance for this publication. Use the returned instance to manage the publication's storage, such as 'localStorage' for EPUB. This allows applications to save and restore the state of the IReaderPublicationStorage across reading-sessions and devices.

    Returns IReaderPublicationStorage

getReadingSystemEngine

getSourcePublication

  • Get the source publication this instance is using.

    Returns IPublication

getSpine

  • Get an ordered list of IReaderDocument instances that are part of this publication.

    Returns IReaderDocument[]

isDestroyed

  • isDestroyed(): boolean
  • If destroy() has been called on this instance.

    Returns boolean

isLocatorSourceUrlInPublication

  • If the source URL of the locator, (that is URL without the hash) matches the any source URL in the Publication.

    If this method returns true, the locator MAY target content in the publication, depending on selectors inside the Locator. If this method return false, the locator DOES NOT target any content in the publication.

    Parameters

    Returns boolean

setOptions

  • Sets new IReaderPublicationOptions for this instance. Existing properties are preserved if they aren't defined in the passed options object. Properties explicitly set to undefined will be restored to their default values.

    Changes affecting the appearance or behavior of the ReaderPublication when used with a ReaderView will not take effect until ReaderView.refresh() is called.

    Parameters

    Returns void

toJSON

Generated using TypeDoc