Implements

Constructors

  • No longer use 'new' to create, but use create instead.

    Parameters

    Returns AnnotList

    const annotList = await AnnotList.create();
    

Properties

options: Options

Methods

  • Destroys an annotation list.

    Returns Promise<void>

  • Gets an annotation at specified position.

    Parameters

    • index: number

      The zero-based index in the annotation list.

    Returns Promise<null | AnnotType>

  • Gets the count of annotations in the annotation list.

    Returns Promise<number>

    • The count of annotations in the annotation list.
  • Gets the annotation's index.

    Parameters

    Returns Promise<number>

    • The zero-based index in the annotation list.
  • Inserts BEFORE the index, if index equals to current count, then append.

    Parameters

    • annot: AnnotType
    • Optionalindex: number

      The zero-based index to insert before.

    Returns Promise<void>

  • Moves an annotation to specified position.

    Parameters

    • index: number

      The annotation of position wanna to move

    • newIndex: number

      The new position to move to

    Returns Promise<void>

  • Moves an annotation to the first of the annotation list.

    Parameters

    • index: number

      The zero-based index of the annotation to be moved.

    Returns Promise<void>

  • Moves an annotation to the last of the annotation list.

    Parameters

    • index: number

      The zero-based index of the annotation to be moved.

    Returns Promise<void>

  • Removes an annotation.

    Parameters

    • index: number

      The zero-based index of the annotation to be removed.

    Returns Promise<void>

  • Removes all the annotation.

    Returns Promise<void>

  • Replaces the specified position with a new annotation.

    Parameters

    • index: number

      The zero-based index in the annotation list.

    • annot: AnnotType

      The new annotation.

    Returns Promise<void>

  • Creates an annotation list from a PDF page.

    Parameters

    • Optionaloptions: Options

      The input PDF page

    Returns Promise<AnnotListType>

    {"page": pdfPage}