Colibrio Reader Framework API - Cloud license
    Preparing search index...

    A page fully visible or partially visible in the ReaderView.

    interface IVisiblePage {
        fetchRectsForVisibleContent(
            contentLocation?: IContentLocation,
            options?: IVisibleContentRectsOptions,
        ): Promise<IVisibleContentRectsResult>;
        getBoundingClientRect(): DOMRect;
        getPageSpreadSlot(): PageSpreadSlot;
        getRangeContentLocation(): IContentLocation;
        getReaderDocument(): IReaderDocument;
        getStartContentLocation(): IContentLocation;
        isCustomPageContent(): boolean;
        print(): void;
        setContentSelection(
            location:
                | ILocator
                | ILocatorData
                | IContentLocation
                | IReaderPublicationNavigationItemData
                | IReaderPublicationNavigationItem
                | IUnresolvedContentLocation,
        ): Promise<void>;
        toJSON(): IVisiblePageData;
    }

    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>

    • 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

    • 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

    • 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