react-pdf-highlighter-plus

Type alias PdfHighlighterUtils

PdfHighlighterUtils: {
    getCurrentSelection(): null | PdfSelection;
    getEventBus(): unknown;
    getGhostHighlight(): null | GhostHighlight;
    getLinkService(): unknown;
    getTip(): null | Tip;
    getViewer(): null | PDFViewer;
    goToPage(pageNumber): void;
    isEditInProgress(): boolean;
    isEditingOrHighlighting(): boolean;
    isSelectionInProgress(): boolean;
    removeGhostHighlight(): void;
    scrollToHighlight(highlight): void;
    setTip(tip): void;
    toggleEditInProgress(flag?): void;
    updateTipPosition(): void;
}

A set of utilities for to control the behaviour of PdfHighlighter.

Type declaration

  • getCurrentSelection:function
  • getEventBus:function
  • getGhostHighlight:function
  • getLinkService:function
  • getTip:function
  • getViewer:function
    • Get a reference to the currently used instance of a PDF Viewer.

      Returns null | PDFViewer

      • The currently active PDF Viewer.
  • goToPage:function
  • isEditInProgress:function
    • Whether an AreaHighlight is being moved/resized, or a manual highlight edit has been toggled.

      Returns boolean

      • true if AreaHighlight is being edited or edit mode was set.
  • isEditingOrHighlighting:function
    • Checks whether a selection is progress, a ghost highlight, or an edit.

      Returns boolean

      • true if editing, ghost highlighting, or selecting.
  • isSelectionInProgress:function
    • Whether a mouse selection or text selection is currently being performed.

      Returns boolean

      • true if mouse selection or text selection is being performed.
  • removeGhostHighlight:function
  • scrollToHighlight:function
  • setTip:function
  • toggleEditInProgress:function
    • If enabled, automatic tips/popups inside of a PdfHighlighter will be disabled. Additional niceties will also be provided to prevent new highlights being made.

      Parameters

      • Optional flag: boolean

      Returns void

  • updateTipPosition:function
    • Callback to update any currently active tip's position. This will make sure the tip is visible above/below its highlight.

      Returns void