Skip to content

happypdf / PDFAnnotation

Class: PDFAnnotation ​

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

Extended by ​

Constructors ​

Constructor ​

ts
protected new PDFAnnotation(dict): PDFAnnotation;

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

Parameters ​

ParameterType
dictPDFDict

Returns ​

PDFAnnotation

Properties ​

dict ​

ts
readonly dict: PDFDict;

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

Methods ​

AP() ​

ts
AP(): PDFDict | undefined;

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

Returns ​

PDFDict | undefined


clearFlag() ​

ts
clearFlag(flag): void;

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

Parameters ​

ParameterType
flagnumber

Returns ​

void


ensureAP() ​

ts
ensureAP(): PDFDict;

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

Returns ​

PDFDict


F() ​

ts
F(): PDFNumber | undefined;

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

Returns ​

PDFNumber | undefined


fromDict() ​

ts
static fromDict(dict): PDFAnnotation;

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

Parameters ​

ParameterType
dictPDFDict

Returns ​

PDFAnnotation


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


getAppearanceState() ​

ts
getAppearanceState(): PDFName | undefined;

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

Returns ​

PDFName | undefined


getFlags() ​

ts
getFlags(): number;

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

Returns ​

number


getNormalAppearance() ​

ts
getNormalAppearance(): PDFRef | PDFDict;

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

Returns ​

PDFRef | PDFDict


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;

hasFlag() ​

ts
hasFlag(flag): boolean;

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

Parameters ​

ParameterType
flagnumber

Returns ​

boolean


Rect() ​

ts
Rect(): PDFArray | undefined;

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

Returns ​

PDFArray | undefined


removeDownAppearance() ​

ts
removeDownAppearance(): void;

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

Returns ​

void


removeRolloverAppearance() ​

ts
removeRolloverAppearance(): void;

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

Returns ​

void


setAppearances() ​

ts
setAppearances(appearances): void;

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

Parameters ​

ParameterType
appearancesPDFDict

Returns ​

void


setAppearanceState() ​

ts
setAppearanceState(state): void;

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

Parameters ​

ParameterType
statePDFName

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


setFlag() ​

ts
setFlag(flag): void;

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

Parameters ​

ParameterType
flagnumber

Returns ​

void


setFlags() ​

ts
setFlags(flags): void;

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

Parameters ​

ParameterType
flagsnumber

Returns ​

void


setFlagTo() ​

ts
setFlagTo(flag, enable): void;

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

Parameters ​

ParameterType
flagnumber
enableboolean

Returns ​

void


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


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


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

MIT Licensed. A fork of pdf-lib.