Skip to content

happypdf / PDFWidgetAnnotation

Class: PDFWidgetAnnotation

Defined in: src/core/annotation/PDFWidgetAnnotation.ts:11

Extends

Constructors

Constructor

ts
protected new PDFWidgetAnnotation(dict): PDFWidgetAnnotation;

Defined in: src/core/annotation/PDFAnnotation.ts:13

Parameters

ParameterType
dictPDFDict

Returns

PDFWidgetAnnotation

Inherited from

PDFAnnotation.constructor

Properties

dict

ts
readonly dict: PDFDict;

Defined in: src/core/annotation/PDFAnnotation.ts:9

Inherited from

PDFAnnotation.dict

Methods

AP()

ts
AP(): PDFDict | undefined;

Defined in: src/core/annotation/PDFAnnotation.ts:22

Returns

PDFDict | undefined

Inherited from

PDFAnnotation.AP


BS()

ts
BS(): PDFDict | undefined;

Defined in: src/core/annotation/PDFWidgetAnnotation.ts:31

Returns

PDFDict | undefined


clearFlag()

ts
clearFlag(flag): void;

Defined in: src/core/annotation/PDFAnnotation.ts:137

Parameters

ParameterType
flagnumber

Returns

void

Inherited from

PDFAnnotation.clearFlag


create()

ts
static create(context, parent): PDFWidgetAnnotation;

Defined in: src/core/annotation/PDFWidgetAnnotation.ts:15

Parameters

ParameterType
contextPDFContext
parentPDFRef

Returns

PDFWidgetAnnotation


DA()

ts
DA(): 
  | PDFHexString
  | PDFString
  | undefined;

Defined in: src/core/annotation/PDFWidgetAnnotation.ts:37

Returns

| PDFHexString | PDFString | undefined


ensureAP()

ts
ensureAP(): PDFDict;

Defined in: src/core/annotation/PDFAnnotation.ts:56

Returns

PDFDict

Inherited from

PDFAnnotation.ensureAP


F()

ts
F(): PDFNumber | undefined;

Defined in: src/core/annotation/PDFAnnotation.ts:26

Returns

PDFNumber | undefined

Inherited from

PDFAnnotation.F


fromDict()

ts
static fromDict(dict): PDFWidgetAnnotation;

Defined in: src/core/annotation/PDFWidgetAnnotation.ts:12

Parameters

ParameterType
dictPDFDict

Returns

PDFWidgetAnnotation

Overrides

PDFAnnotation.fromDict


getAppearanceCharacteristics()

ts
getAppearanceCharacteristics(): AppearanceCharacteristics | undefined;

Defined in: src/core/annotation/PDFWidgetAnnotation.ts:67

Returns

AppearanceCharacteristics | undefined


getAppearances()

ts
getAppearances(): 
  | {
  down?: PDFStream | PDFDict;
  normal: PDFStream | PDFDict;
  rollover?: PDFStream | PDFDict;
}
  | undefined;

Defined in: src/core/annotation/PDFAnnotation.ts:101

Returns

| { down?: PDFStream | PDFDict; normal: PDFStream | PDFDict; rollover?: PDFStream | PDFDict; } | undefined

Inherited from

PDFAnnotation.getAppearances


getAppearanceState()

ts
getAppearanceState(): PDFName | undefined;

Defined in: src/core/annotation/PDFAnnotation.ts:42

Returns

PDFName | undefined

Inherited from

PDFAnnotation.getAppearanceState


getBorderStyle()

ts
getBorderStyle(): BorderStyle | undefined;

Defined in: src/core/annotation/PDFWidgetAnnotation.ts:82

Returns

BorderStyle | undefined


getDefaultAppearance()

ts
getDefaultAppearance(): string | undefined;

Defined in: src/core/annotation/PDFWidgetAnnotation.ts:57

Returns

string | undefined


getFlags()

ts
getFlags(): number;

Defined in: src/core/annotation/PDFAnnotation.ts:119

Returns

number

Inherited from

PDFAnnotation.getFlags


getNormalAppearance()

ts
getNormalAppearance(): PDFRef | PDFDict;

Defined in: src/core/annotation/PDFAnnotation.ts:65

Returns

PDFRef | PDFDict

Inherited from

PDFAnnotation.getNormalAppearance


getOnValue()

ts
getOnValue(): PDFName | undefined;

Defined in: src/core/annotation/PDFWidgetAnnotation.ts:97

Returns

PDFName | undefined


getOrCreateAppearanceCharacteristics()

ts
getOrCreateAppearanceCharacteristics(): AppearanceCharacteristics;

Defined in: src/core/annotation/PDFWidgetAnnotation.ts:73

Returns

AppearanceCharacteristics


getOrCreateBorderStyle()

ts
getOrCreateBorderStyle(): BorderStyle;

Defined in: src/core/annotation/PDFWidgetAnnotation.ts:88

Returns

BorderStyle


getRectangle()

ts
getRectangle(): {
  height: number;
  width: number;
  x: number;
  y: number;
};

Defined in: src/core/annotation/PDFAnnotation.ts:31

Returns

ts
{
  height: number;
  width: number;
  x: number;
  y: number;
}
height
ts
height: number;
width
ts
width: number;
x
ts
x: number;
y
ts
y: number;

Inherited from

PDFAnnotation.getRectangle


hasFlag()

ts
hasFlag(flag): boolean;

Defined in: src/core/annotation/PDFAnnotation.ts:127

Parameters

ParameterType
flagnumber

Returns

boolean

Inherited from

PDFAnnotation.hasFlag


MK()

ts
MK(): PDFDict | undefined;

Defined in: src/core/annotation/PDFWidgetAnnotation.ts:25

Returns

PDFDict | undefined


P()

ts
P(): PDFRef | undefined;

Defined in: src/core/annotation/PDFWidgetAnnotation.ts:43

Returns

PDFRef | undefined


Rect()

ts
Rect(): PDFArray | undefined;

Defined in: src/core/annotation/PDFAnnotation.ts:18

Returns

PDFArray | undefined

Inherited from

PDFAnnotation.Rect


removeDownAppearance()

ts
removeDownAppearance(): void;

Defined in: src/core/annotation/PDFAnnotation.ts:96

Returns

void

Inherited from

PDFAnnotation.removeDownAppearance


removeRolloverAppearance()

ts
removeRolloverAppearance(): void;

Defined in: src/core/annotation/PDFAnnotation.ts:91

Returns

void

Inherited from

PDFAnnotation.removeRolloverAppearance


setAppearances()

ts
setAppearances(appearances): void;

Defined in: src/core/annotation/PDFAnnotation.ts:52

Parameters

ParameterType
appearancesPDFDict

Returns

void

Inherited from

PDFAnnotation.setAppearances


setAppearanceState()

ts
setAppearanceState(state): void;

Defined in: src/core/annotation/PDFAnnotation.ts:48

Parameters

ParameterType
statePDFName

Returns

void

Inherited from

PDFAnnotation.setAppearanceState


setDefaultAppearance()

ts
setDefaultAppearance(appearance): void;

Defined in: src/core/annotation/PDFWidgetAnnotation.ts:53

Parameters

ParameterType
appearancestring

Returns

void


setDownAppearance()

ts
setDownAppearance(appearance): void;

Defined in: src/core/annotation/PDFAnnotation.ts:86

Parameters

ParameterTypeDescription
appearancePDFRef | PDFDictA PDFDict or PDFStream (direct or ref)

Returns

void

Inherited from

PDFAnnotation.setDownAppearance


setFlag()

ts
setFlag(flag): void;

Defined in: src/core/annotation/PDFAnnotation.ts:132

Parameters

ParameterType
flagnumber

Returns

void

Inherited from

PDFAnnotation.setFlag


setFlags()

ts
setFlags(flags): void;

Defined in: src/core/annotation/PDFAnnotation.ts:123

Parameters

ParameterType
flagsnumber

Returns

void

Inherited from

PDFAnnotation.setFlags


setFlagTo()

ts
setFlagTo(flag, enable): void;

Defined in: src/core/annotation/PDFAnnotation.ts:142

Parameters

ParameterType
flagnumber
enableboolean

Returns

void

Inherited from

PDFAnnotation.setFlagTo


setNormalAppearance()

ts
setNormalAppearance(appearance): void;

Defined in: src/core/annotation/PDFAnnotation.ts:74

Parameters

ParameterTypeDescription
appearancePDFRef | PDFDictA PDFDict or PDFStream (direct or ref)

Returns

void

Inherited from

PDFAnnotation.setNormalAppearance


setP()

ts
setP(page): void;

Defined in: src/core/annotation/PDFWidgetAnnotation.ts:49

Parameters

ParameterType
pagePDFRef

Returns

void


setRectangle()

ts
setRectangle(rect): void;

Defined in: src/core/annotation/PDFAnnotation.ts:36

Parameters

ParameterType
rect{ height: number; width: number; x: number; y: number; }
rect.heightnumber
rect.widthnumber
rect.xnumber
rect.ynumber

Returns

void

Inherited from

PDFAnnotation.setRectangle


setRolloverAppearance()

ts
setRolloverAppearance(appearance): void;

Defined in: src/core/annotation/PDFAnnotation.ts:80

Parameters

ParameterTypeDescription
appearancePDFRef | PDFDictA PDFDict or PDFStream (direct or ref)

Returns

void

Inherited from

PDFAnnotation.setRolloverAppearance

MIT Licensed. A fork of pdf-lib.