happypdf / PDFAnnotation
Class: PDFAnnotation
Defined in: src/core/annotation/PDFAnnotation.ts:8
Extended by
Constructors
Constructor
protected new PDFAnnotation(dict): PDFAnnotation;Defined in: src/core/annotation/PDFAnnotation.ts:13
Parameters
| Parameter | Type |
|---|---|
dict | PDFDict |
Returns
PDFAnnotation
Properties
dict
readonly dict: PDFDict;Defined in: src/core/annotation/PDFAnnotation.ts:9
Methods
AP()
AP(): PDFDict | undefined;Defined in: src/core/annotation/PDFAnnotation.ts:22
Returns
PDFDict | undefined
clearFlag()
clearFlag(flag): void;Defined in: src/core/annotation/PDFAnnotation.ts:137
Parameters
| Parameter | Type |
|---|---|
flag | number |
Returns
void
ensureAP()
ensureAP(): PDFDict;Defined in: src/core/annotation/PDFAnnotation.ts:56
Returns
F()
F(): PDFNumber | undefined;Defined in: src/core/annotation/PDFAnnotation.ts:26
Returns
PDFNumber | undefined
fromDict()
static fromDict(dict): PDFAnnotation;Defined in: src/core/annotation/PDFAnnotation.ts:11
Parameters
| Parameter | Type |
|---|---|
dict | PDFDict |
Returns
PDFAnnotation
getAppearances()
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()
getAppearanceState(): PDFName | undefined;Defined in: src/core/annotation/PDFAnnotation.ts:42
Returns
PDFName | undefined
getFlags()
getFlags(): number;Defined in: src/core/annotation/PDFAnnotation.ts:119
Returns
number
getNormalAppearance()
getNormalAppearance(): PDFRef | PDFDict;Defined in: src/core/annotation/PDFAnnotation.ts:65
Returns
getRectangle()
getRectangle(): {
height: number;
width: number;
x: number;
y: number;
};Defined in: src/core/annotation/PDFAnnotation.ts:31
Returns
{
height: number;
width: number;
x: number;
y: number;
}height
height: number;width
width: number;x
x: number;y
y: number;hasFlag()
hasFlag(flag): boolean;Defined in: src/core/annotation/PDFAnnotation.ts:127
Parameters
| Parameter | Type |
|---|---|
flag | number |
Returns
boolean
Rect()
Rect(): PDFArray | undefined;Defined in: src/core/annotation/PDFAnnotation.ts:18
Returns
PDFArray | undefined
removeDownAppearance()
removeDownAppearance(): void;Defined in: src/core/annotation/PDFAnnotation.ts:96
Returns
void
removeRolloverAppearance()
removeRolloverAppearance(): void;Defined in: src/core/annotation/PDFAnnotation.ts:91
Returns
void
setAppearances()
setAppearances(appearances): void;Defined in: src/core/annotation/PDFAnnotation.ts:52
Parameters
| Parameter | Type |
|---|---|
appearances | PDFDict |
Returns
void
setAppearanceState()
setAppearanceState(state): void;Defined in: src/core/annotation/PDFAnnotation.ts:48
Parameters
| Parameter | Type |
|---|---|
state | PDFName |
Returns
void
setDownAppearance()
setDownAppearance(appearance): void;Defined in: src/core/annotation/PDFAnnotation.ts:86
Parameters
| Parameter | Type | Description |
|---|---|---|
appearance | PDFRef | PDFDict | A PDFDict or PDFStream (direct or ref) |
Returns
void
setFlag()
setFlag(flag): void;Defined in: src/core/annotation/PDFAnnotation.ts:132
Parameters
| Parameter | Type |
|---|---|
flag | number |
Returns
void
setFlags()
setFlags(flags): void;Defined in: src/core/annotation/PDFAnnotation.ts:123
Parameters
| Parameter | Type |
|---|---|
flags | number |
Returns
void
setFlagTo()
setFlagTo(flag, enable): void;Defined in: src/core/annotation/PDFAnnotation.ts:142
Parameters
| Parameter | Type |
|---|---|
flag | number |
enable | boolean |
Returns
void
setNormalAppearance()
setNormalAppearance(appearance): void;Defined in: src/core/annotation/PDFAnnotation.ts:74
Parameters
| Parameter | Type | Description |
|---|---|---|
appearance | PDFRef | PDFDict | A PDFDict or PDFStream (direct or ref) |
Returns
void
setRectangle()
setRectangle(rect): void;Defined in: src/core/annotation/PDFAnnotation.ts:36
Parameters
| Parameter | Type |
|---|---|
rect | { height: number; width: number; x: number; y: number; } |
rect.height | number |
rect.width | number |
rect.x | number |
rect.y | number |
Returns
void
setRolloverAppearance()
setRolloverAppearance(appearance): void;Defined in: src/core/annotation/PDFAnnotation.ts:80
Parameters
| Parameter | Type | Description |
|---|---|---|
appearance | PDFRef | PDFDict | A PDFDict or PDFStream (direct or ref) |
Returns
void