Options
All
  • Public
  • Public/Protected
  • All
Menu

A page fully visible or partially visible in the ReaderView.

Hierarchy

  • IVisiblePage

Index

Methods

  • Fetch rectangles and content locations for line boxes and replaced elements such as <img> elements from the specified visible page. If a contentLocation is specified, it will be used to filter the result.

    The rectangle coordinates are in application viewport coordinate space. This means that any subsequent transform applied to the ReaderView, such as the user pinch-zooming, will make those rectangles out of date.

    The rects are ordered in document order.

    If the passed contentLocation is not intersecting with the visiblePage, the returned Promise is rejected with an error object with the error type set to CONTENT_LOCATION_OUTSIDE_VISIBLE_PAGE.

    Parameters

    Returns Promise<IVisibleContentRectsResult>

  • getBoundingClientRect(): DOMRect
  • Get the bounding client rect of the visible page in application viewport coordinate system. Returns null if this page is not visible.

    Returns DOMRect

  • Get the PageSpread slot for this page when using a renderer capable of showing spreads.

    Returns PageSpreadSlot

  • Get the resolved ContentLocation representing the range of the entire page content.

    Returns IContentLocation

  • Get the ReaderDocument this page was generated from.

    Returns IReaderDocument

  • Get the resolved ContentLocation to the start of this page.

    Returns IContentLocation

  • isCustomPageContent(): boolean
  • Determines whether the page content is custom (not originating from the publication).

    For example, this method returns true for:

    • Error pages
    • Empty pages added due to page spread slot requirements.

    Returns boolean

  • print(): void
  • Opens the print dialog to print this page. This will not include annotation layers.

    Do not call print() if isCustomPageContent() returns true, as it is not supported If the page cannot be printed, then a ColibrioError will be thrown with errorType set to PRINT_NOT_SUPPORTED.

    Returns void

  • Sets the current content selection in this VisiblePage to the range most closely matching the specified location.

    If the specified location is a range that is partially before and/or after the VisiblePage, then location is first clamped to be within this VisiblePage content before the selection is made.

    If the specified location is completely outside this VisiblePage, this method does nothing and returns a rejected Promise.

    The returned Promise is also rejected if the VisiblePage is no longer visible, or if the selection cannot be changed for some other reason.

    Parameters

    Returns Promise<void>

Generated using TypeDoc