interface AnnotType {
    destroy: () => Promise<void>;
    getAnnotDict: () => Promise<null | PDFDictionaryType>;
    getAnnotList: (page: PageType) => Promise<null | AnnotListType>;
    getBorderStyle: () => Promise<number>;
    getBorderWidth: () => Promise<number>;
    getFlags: () => Promise<number>;
    getRect: () => Promise<Rect>;
    getSubType: () => Promise<string>;
    getType: () => Promise<string>;
    getWidget: () => Promise<null | FormWidgetType>;
    isSelected: () => Promise<boolean>;
    options?: Options;
    setBorderStyle: (style: number) => Promise<void>;
    setBorderWidth: (width: number) => Promise<void>;
    setVisible: (show: boolean) => Promise<void>;
}

Implemented by

Properties

destroy: () => Promise<void>

Destroys an annotation.

Type declaration

    • (): Promise<void>
    • Returns Promise<void>

getAnnotDict: () => Promise<null | PDFDictionaryType>

Get an annotation dictionary from FDF document by specific filter and index.

Type declaration

getAnnotList: (page: PageType) => Promise<null | AnnotListType>

Get the "in reply to" annotation list.

Type declaration

getBorderStyle: () => Promise<number>

Gets the annotation border style.

Type declaration

    • (): Promise<number>
    • Returns Promise<number>

      • The border style of the annotation.
getBorderWidth: () => Promise<number>

Gets the annotation border width.

Type declaration

    • (): Promise<number>
    • Returns Promise<number>

      • The border width of the annotation.
getFlags: () => Promise<number>

Gets the annotation flags.

Type declaration

    • (): Promise<number>
    • Returns Promise<number>

      • The annotation flags.
getRect: () => Promise<Rect>

Gets annotation bounding box in user space.

Type declaration

    • (): Promise<Rect>
    • Returns Promise<Rect>

      • The bounding box of the annotation.
getSubType: () => Promise<string>

Gets the annotation sub-type name.

Type declaration

    • (): Promise<string>
    • Returns Promise<string>

      • The annotation sub-type name
getType: () => Promise<string>

Gets the type of the input UI layer annotation object.

Type declaration

    • (): Promise<string>
    • Returns Promise<string>

      • The type of the annotation.
getWidget: () => Promise<null | FormWidgetType>

Gets the Annot of the form widget.

Type declaration

isSelected: () => Promise<boolean>

Checks whether the input UI layer annotation object is selected.

Type declaration

    • (): Promise<boolean>
    • Returns Promise<boolean>

      • TRUE If the input UI layer annotation object is selected, otherwise not.
options?: Options
setBorderStyle: (style: number) => Promise<void>

Sets the annotation border style.

Type declaration

await annot.setBorderStyle(0);
setBorderWidth: (width: number) => Promise<void>

Sets the annotation border width.

Type declaration

    • (width: number): Promise<void>
    • Parameters

      • width: number

        The border width to set.

      Returns Promise<void>

await annot.setBorderWidth(1);
setVisible: (show: boolean) => Promise<void>

Sets the input UI layer annotation object to be visible or not.

Type declaration

    • (show: boolean): Promise<void>
    • Parameters

      • show: boolean

        It indicates whether the annotation is visible.

      Returns Promise<void>