Implements

Constructors

  • Create a PageView instance. Instead of creating an instance in new mode, use create to create an instance.

    Parameters

    • Optionaloptions: Options

      Create a PageView instance with the specified options.

    Returns PageView

    const pageView = await PageView.create();
    

Properties

doc: null | DocType

Associated document object.

docView: null | DocViewType

Associated document view object.

options?: Options
page: null | PageType

Associated page object.

Methods

  • Delete the annotation object.

    Parameters

    Returns Promise<boolean>

    Return true if the annotation is deleted successfully, otherwise return false.

  • Destroy the current object.

    Returns Promise<void>

  • Transforms a rectangle from device space to user space.

    Parameters

    • deviceRect: Rect

      A device space rectangle whose coordinates are transformed to user space.

    Returns Promise<Rect>

    Return a user space rectangle.

  • Get the annotation object at the specified point.

    Parameters

    • point: Point

      The point to get the annotation.

    • subType: string

      The subtype of the annotation.

    Returns Promise<null | AnnotType>

    Return the annotation object.

    const doc = await app.getActiveDoc();
    const docView = await doc.getDocView(0);
    const pageView = await docView.getCurrentPageView();
    const pt = {
    x: 10,
    y: 10
    }
    await pageview.GetAnnotAtPoint(pt, 'Highlight);
  • Get the annotation object by index.

    Parameters

    • index: number

      The index of the annotation.

    Returns Promise<null | AnnotType>

    Return the annotation object.

  • Get the number of annotations on the current pageview.

    Returns Promise<number>

    Return the number of annotations on the current pageview.

  • Get the page index of the current pageview.

    Returns Promise<number>

    Return the page index of the current pageview.

  • Get the rectangle of the current pageview.

    Returns Promise<Rect>

    Return the rectangle of the current pageview.

  • Get the scale of the current pageview.

    Returns Promise<number>

    Return the scale of the current pageview.

  • Get the visible rectangle of the current pageview.

    Returns Promise<Rect>

    Return the visible rectangle of the current pageview.

  • Transforms a rectangle from user space to device space.

    Parameters

    • pageRect: Rect

      A user space rectangle whose coordinates are transformed to device space.

    Returns Promise<Rect>

    Return a device space rectangle.

  • Render the current page view to a bitmap.

    Parameters

    • bitmap: DIBitmapType

      The target bitmap object.

    • rect: Rect

      The rectangle area object.

    Returns Promise<boolean>

    Return the rendering result, true indicates success, false indicates failure.

  • Create a PageView instance.

    Parameters

    • Optionaloptions: Options

      The options to create a PageView instance.

    Returns Promise<PageViewType>

    Return a PageView instance.