Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents the view of PDF document in the app. To get a DocView, please use:

await doc.getCurDocView();
// or
await doc.getDocViewByIndex(index);
see

Doc

Hierarchy

  • DocView

Index

Methods

close

  • close(): Promise<void>
  • Close the open document.

    see

    PageView

    Returns Promise<void>

    • When before returns false, the promise returns reject

convertClientCoordToPDFCoord

  • convertClientCoordToPDFCoord(clientX: number, clientY: number): Promise<any>
  • An API to get coordinate information for the PDF coordinate system from device coordinates.

    see

    PageView

    Parameters

    • clientX: number

      the X-axis offset in the upper-left corner of the browser view.
      default value is 0. The maximum value is device X-axis size.

    • clientY: number

      the Y-axis offset in the upper-left corner of the browser view.
      default value is 0. The maximum value is device Y-axis size.

    Returns Promise<any>

    Promise {index: number, left: number, top: number, scale: number, rotation: number}

    endsearch

    • endsearch(): Promise<void>
    • Exit current search object.

      see

      DocView

      Returns Promise<void>

      null

    getCurrentPageView

    • getCurrentPageView(): Promise<null | PageView>
    • Get current active PageView in this DocView.

      see

      PageView

      Returns Promise<null | PageView>

    getDoc

    • getDoc(): Promise<null | Doc>
    • Get the PDF document object of this DocView.

      see

      Doc

      Returns Promise<null | Doc>

    getPageMode

    • getPageMode(): Promise<string>
    • Gets the current view mode instance object.

      see

      PageView

      Returns Promise<string>

      view mode instance object

    getPageViewByIndex

    • getPageViewByIndex(index: number): Promise<null | PageView>
    • Get PageView by index in this DocView.

      see

      PageView

      Parameters

      • index: number

        page view index, the value must be >= 0

      Returns Promise<null | PageView>

    getPageViewCount

    • getPageViewCount(): Promise<number>
    • Get the count of PageView in this DocView.

      see

      PageView

      Returns Promise<number>

    getRotation

    • getRotation(): Promise<number>
    • Obtains the rotation degree of curremt document

      see

      PageView

      Returns Promise<number>

      is one of these values: 0, 90, 180, 270

    getVisiblePageView

    • getVisiblePageView(index: number): Promise<null | PageView>
    • Get visible PageView by index in this DocView.

      see

      PageView

      Parameters

      • index: number

      Returns Promise<null | PageView>

    getVisiblePageViewCount

    • getVisiblePageViewCount(): Promise<number>
    • Get the count of visible PageView in this DocView.

      see

      PageView

      Returns Promise<number>

    getZoom

    • getZoom(): Promise<number>
    • Get zoom ratio of this DocView.

      Returns Promise<number>

    print

    • Prints the current document with specified options

      see

      PageView

      see

      PrintOptions

      Parameters

      Returns Promise<void>

      Promise

    rotateTo

    • rotateTo(degree: number): Promise<void>
    • Rotate the current document to specified degree. This method only changes the rendering effect of the view and does not change the PDF document data.

      see

      PageView

      Parameters

      • degree: number

        number - Rotation degree value, It should be 0,90,180, 270 or any angle value in multiples of 90 degrees.

      Returns Promise<void>

      Promise - A rejected Promise indicates any failure and fullfilled Promise indicates succeed!

    search

    • Get text search object.

      see

      DocView

      Parameters

      • options: SearchOptions

        options.keywords {string} - Specifies text to search.

      Returns Promise<undefined | DocTextSearch>

      DocTextSearch

    setPageMode

    • setPageMode(name: string): Promise<void>
    • Switch to view mode by name.

      see

      PageView

      Parameters

      • name: string

        'single-page-view-mode' view one page at a time.
        'continuous-view-mode' View pages continuously with scrolling enabled.
        'multipage-view-mode' View pages side-by-side with continuous scrolling enabled.
        'facing-page-view-mode' View two pages side-by-side.

      Returns Promise<void>

      void

    zoomTo

    • zoomTo(scale: number): Promise<void>
    • Zoom to the given scale.

      see

      PageView

      Parameters

      • scale: number

        Greater than zero If it's a string, only 'fitWidth' and 'fitHeight' are valid.

      Returns Promise<void>

    Legend

    • Function
    • Type alias
    • Class
    • Method
    • Enumeration
    • Interface