Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents a source content document in a Publication.

Hierarchy

Index

Methods

getContentUrl

  • getContentUrl(): URL
  • Returns the URL from where the content document resource can be fetched. This URL may or may not be a browser supported URL depending on how the publication was loaded. For example, an EPUB loaded from a local file requires content URLs to be used together with the ResourceProvider that loaded the publication.

    example
    resourceProvider.getResource(contentDocument.getContentUrl()).asArrayBuffer();
    

    Returns URL

getIndexInSpine

  • getIndexInSpine(): number
  • The index of the content document within the parent publication spine.

    Returns number

getLayout

  • Get if this ContentDocument has been designed as a fixed-layout document, or if it can be reflowed/paginated.

    Returns ContentDocumentLayout

getMediaType

  • getMediaType(): string
  • Get the media-type for this ContentDocument.

    Returns string

getPageSpreadSlot

  • Indicates if the content document should be rendered in the left-hand slot, the right-hand slot, or if synthetic spread mode should be overridden and a single viewport rendered and positioned at the center of the screen.

    Returns PageSpreadSlot

getPublication

  • Get the publication this content document belongs to.

    Returns IPublication

getSyntheticSpreadBehavior

  • Get in which orientations the reading system should present this content document in spread mode. If not defined by the content document, it defaults to Publication.getPreferredSyntheticSpreadBehavior().

    Returns SyntheticSpreadBehavior

hasRemoteResources

  • hasRemoteResources(): boolean
  • If the publication metadata indicates that this resource internally contains references to resources outside of this publication. Note that the content document may still contain references to remote resources if the publication metadata is incorrect.

    Returns boolean

isInLinearContent

  • isInLinearContent(): boolean
  • Indicates whether the content contributes to the primary reading order and is meant to be read sequentially, or if it is content that should be presented in its own context such as a popup. Examples of such non-linear content include: notes, descriptions, answer keys or maps.

    Returns boolean

isScripted

  • isScripted(): boolean
  • If the publication metadata indicates that this resource contains scripted content or forms. Note that the content document may still contain scripted content or forms if the publication metadata is incorrect.

    Returns boolean

toJSON

Generated using TypeDoc