happypdf / PDFPageLeaf
Class: PDFPageLeaf
Defined in: src/core/structures/PDFPageLeaf.ts:11
Extends
Properties
context
readonly context: PDFContext;Defined in: src/core/objects/PDFDict.ts:22
Inherited from
InheritableEntries
readonly static InheritableEntries: string[];Defined in: src/core/structures/PDFPageLeaf.ts:12
suppressEncryption
suppressEncryption: boolean = false;Defined in: src/core/objects/PDFDict.ts:26
Inherited from
Methods
addAnnot()
addAnnot(annotRef): void;Defined in: src/core/structures/PDFPageLeaf.ts:135
Parameters
| Parameter | Type |
|---|---|
annotRef | PDFRef |
Returns
void
addContentStream()
addContentStream(contentStreamRef): void;Defined in: src/core/structures/PDFPageLeaf.ts:119
Parameters
| Parameter | Type |
|---|---|
contentStreamRef | PDFRef |
Returns
void
Annots()
Annots(): PDFArray | undefined;Defined in: src/core/structures/PDFPageLeaf.ts:71
Returns
PDFArray | undefined
ArtBox()
ArtBox(): PDFArray | undefined;Defined in: src/core/structures/PDFPageLeaf.ts:83
Returns
PDFArray | undefined
ascend()
ascend(visitor): void;Defined in: src/core/structures/PDFPageLeaf.ts:198
Parameters
| Parameter | Type |
|---|---|
visitor | (node) => any |
Returns
void
asMap()
asMap(): Map<PDFName, PDFObject>;Defined in: src/core/objects/PDFDict.ts:162
Returns
Inherited from
BleedBox()
BleedBox(): PDFArray | undefined;Defined in: src/core/structures/PDFPageLeaf.ts:75
Returns
PDFArray | undefined
clone()
clone(context?): PDFPageLeaf;Defined in: src/core/structures/PDFPageLeaf.ts:46
Parameters
| Parameter | Type |
|---|---|
context? | PDFContext |
Returns
PDFPageLeaf
Overrides
Contents()
Contents(): PDFStream | PDFArray | undefined;Defined in: src/core/structures/PDFPageLeaf.ts:64
Returns
PDFStream | PDFArray | undefined
copyBytesInto()
copyBytesInto(buffer, offset): number;Defined in: src/core/objects/PDFDict.ts:207
Parameters
| Parameter | Type |
|---|---|
buffer | Uint8Array |
offset | number |
Returns
number
Inherited from
CropBox()
CropBox(): PDFArray | undefined;Defined in: src/core/structures/PDFPageLeaf.ts:97
Returns
PDFArray | undefined
delete()
delete(key): boolean;Defined in: src/core/objects/PDFDict.ts:157
Parameters
| Parameter | Type |
|---|---|
key | PDFName |
Returns
boolean
Inherited from
entries()
entries(): [PDFName, PDFObject][];Defined in: src/core/objects/PDFDict.ts:42
Returns
Inherited from
fromMapWithContext()
static fromMapWithContext(
map,
context,
autoNormalizeCTM?): PDFPageLeaf;Defined in: src/core/structures/PDFPageLeaf.ts:28
Parameters
| Parameter | Type | Default value |
|---|---|---|
map | DictMap | undefined |
context | PDFContext | undefined |
autoNormalizeCTM | boolean | true |
Returns
PDFPageLeaf
Overrides
get()
get(key, preservePDFNull?): PDFObject | undefined;Defined in: src/core/objects/PDFDict.ts:51
Parameters
| Parameter | Type | Default value |
|---|---|---|
key | PDFName | undefined |
preservePDFNull | boolean | false |
Returns
PDFObject | undefined
Inherited from
getInheritableAttribute()
getInheritableAttribute(name): PDFObject | undefined;Defined in: src/core/structures/PDFPageLeaf.ts:107
Parameters
| Parameter | Type |
|---|---|
name | PDFName |
Returns
PDFObject | undefined
has()
has(key): boolean;Defined in: src/core/objects/PDFDict.ts:62
Parameters
| Parameter | Type |
|---|---|
key | PDFName |
Returns
boolean
Inherited from
keys()
keys(): PDFName[];Defined in: src/core/objects/PDFDict.ts:34
Returns
PDFName[]
Inherited from
lookup()
Call Signature
lookup(key): PDFObject | undefined;Defined in: src/core/objects/PDFDict.ts:113
Parameters
| Parameter | Type |
|---|---|
key | PDFName |
Returns
PDFObject | undefined
Inherited from
Call Signature
lookup(key, type): PDFArray;Defined in: src/core/objects/PDFDict.ts:114
Parameters
| Parameter | Type |
|---|---|
key | PDFName |
type | typeof PDFArray |
Returns
Inherited from
Call Signature
lookup(key, type): PDFBool;Defined in: src/core/objects/PDFDict.ts:115
Parameters
| Parameter | Type |
|---|---|
key | PDFName |
type | typeof PDFBool |
Returns
Inherited from
Call Signature
lookup(key, type): PDFDict;Defined in: src/core/objects/PDFDict.ts:116
Parameters
| Parameter | Type |
|---|---|
key | PDFName |
type | typeof PDFDict |
Returns
Inherited from
Call Signature
lookup(key, type): PDFHexString;Defined in: src/core/objects/PDFDict.ts:117
Parameters
| Parameter | Type |
|---|---|
key | PDFName |
type | typeof PDFHexString |
Returns
Inherited from
Call Signature
lookup(key, type): PDFName;Defined in: src/core/objects/PDFDict.ts:118
Parameters
| Parameter | Type |
|---|---|
key | PDFName |
type | typeof PDFName |
Returns
Inherited from
Call Signature
lookup(key, type): PDFNull;Defined in: src/core/objects/PDFDict.ts:119
Parameters
| Parameter | Type |
|---|---|
key | PDFName |
type | PDFNull |
Returns
PDFNull
Inherited from
Call Signature
lookup(key, type): PDFNumber;Defined in: src/core/objects/PDFDict.ts:120
Parameters
| Parameter | Type |
|---|---|
key | PDFName |
type | typeof PDFNumber |
Returns
Inherited from
Call Signature
lookup(key, type): PDFStream;Defined in: src/core/objects/PDFDict.ts:121
Parameters
| Parameter | Type |
|---|---|
key | PDFName |
type | typeof PDFStream |
Returns
Inherited from
Call Signature
lookup(key, type): PDFRef;Defined in: src/core/objects/PDFDict.ts:122
Parameters
| Parameter | Type |
|---|---|
key | PDFName |
type | typeof PDFRef |
Returns
Inherited from
Call Signature
lookup(key, type): PDFString;Defined in: src/core/objects/PDFDict.ts:123
Parameters
| Parameter | Type |
|---|---|
key | PDFName |
type | typeof PDFString |
Returns
Inherited from
Call Signature
lookup(
ref,
type1,
type2): PDFHexString | PDFString;Defined in: src/core/objects/PDFDict.ts:124
Parameters
| Parameter | Type |
|---|---|
ref | PDFName |
type1 | typeof PDFString |
type2 | typeof PDFHexString |
Returns
Inherited from
Call Signature
lookup(
ref,
type1,
type2): PDFStream | PDFDict;Defined in: src/core/objects/PDFDict.ts:129
Parameters
| Parameter | Type |
|---|---|
ref | PDFName |
type1 | typeof PDFDict |
type2 | typeof PDFStream |
Returns
Inherited from
Call Signature
lookup(
ref,
type1,
type2,
type3):
| PDFHexString
| PDFString
| PDFArray;Defined in: src/core/objects/PDFDict.ts:134
Parameters
| Parameter | Type |
|---|---|
ref | PDFName |
type1 | typeof PDFString |
type2 | typeof PDFHexString |
type3 | typeof PDFArray |
Returns
| PDFHexString | PDFString | PDFArray
Inherited from
lookupMaybe()
Call Signature
lookupMaybe(key, type): PDFArray | undefined;Defined in: src/core/objects/PDFDict.ts:67
Parameters
| Parameter | Type |
|---|---|
key | PDFName |
type | typeof PDFArray |
Returns
PDFArray | undefined
Inherited from
Call Signature
lookupMaybe(key, type): PDFBool | undefined;Defined in: src/core/objects/PDFDict.ts:68
Parameters
| Parameter | Type |
|---|---|
key | PDFName |
type | typeof PDFBool |
Returns
PDFBool | undefined
Inherited from
Call Signature
lookupMaybe(key, type): PDFDict | undefined;Defined in: src/core/objects/PDFDict.ts:69
Parameters
| Parameter | Type |
|---|---|
key | PDFName |
type | typeof PDFDict |
Returns
PDFDict | undefined
Inherited from
Call Signature
lookupMaybe(key, type): PDFHexString | undefined;Defined in: src/core/objects/PDFDict.ts:70
Parameters
| Parameter | Type |
|---|---|
key | PDFName |
type | typeof PDFHexString |
Returns
PDFHexString | undefined
Inherited from
Call Signature
lookupMaybe(key, type): PDFName | undefined;Defined in: src/core/objects/PDFDict.ts:74
Parameters
| Parameter | Type |
|---|---|
key | PDFName |
type | typeof PDFName |
Returns
PDFName | undefined
Inherited from
Call Signature
lookupMaybe(key, type): PDFNull | undefined;Defined in: src/core/objects/PDFDict.ts:75
Parameters
| Parameter | Type |
|---|---|
key | PDFName |
type | PDFNull |
Returns
PDFNull | undefined
Inherited from
Call Signature
lookupMaybe(key, type): PDFNumber | undefined;Defined in: src/core/objects/PDFDict.ts:76
Parameters
| Parameter | Type |
|---|---|
key | PDFName |
type | typeof PDFNumber |
Returns
PDFNumber | undefined
Inherited from
Call Signature
lookupMaybe(key, type): PDFStream | undefined;Defined in: src/core/objects/PDFDict.ts:77
Parameters
| Parameter | Type |
|---|---|
key | PDFName |
type | typeof PDFStream |
Returns
PDFStream | undefined
Inherited from
Call Signature
lookupMaybe(key, type): PDFRef | undefined;Defined in: src/core/objects/PDFDict.ts:78
Parameters
| Parameter | Type |
|---|---|
key | PDFName |
type | typeof PDFRef |
Returns
PDFRef | undefined
Inherited from
Call Signature
lookupMaybe(key, type): PDFString | undefined;Defined in: src/core/objects/PDFDict.ts:79
Parameters
| Parameter | Type |
|---|---|
key | PDFName |
type | typeof PDFString |
Returns
PDFString | undefined
Inherited from
Call Signature
lookupMaybe(
ref,
type1,
type2):
| PDFHexString
| PDFString
| undefined;Defined in: src/core/objects/PDFDict.ts:80
Parameters
| Parameter | Type |
|---|---|
ref | PDFName |
type1 | typeof PDFString |
type2 | typeof PDFHexString |
Returns
| PDFHexString | PDFString | undefined
Inherited from
Call Signature
lookupMaybe(
ref,
type1,
type2): PDFStream | PDFDict | undefined;Defined in: src/core/objects/PDFDict.ts:85
Parameters
| Parameter | Type |
|---|---|
ref | PDFName |
type1 | typeof PDFDict |
type2 | typeof PDFStream |
Returns
PDFStream | PDFDict | undefined
Inherited from
Call Signature
lookupMaybe(
ref,
type1,
type2,
type3):
| PDFHexString
| PDFString
| PDFArray
| undefined;Defined in: src/core/objects/PDFDict.ts:90
Parameters
| Parameter | Type |
|---|---|
ref | PDFName |
type1 | typeof PDFString |
type2 | typeof PDFHexString |
type3 | typeof PDFArray |
Returns
| PDFHexString | PDFString | PDFArray | undefined
Inherited from
MediaBox()
MediaBox(): PDFArray;Defined in: src/core/structures/PDFPageLeaf.ts:92
Returns
newExtGState()
newExtGState(tag, extGStateRef): PDFName;Defined in: src/core/structures/PDFPageLeaf.ts:192
Parameters
| Parameter | Type |
|---|---|
tag | string |
extGStateRef | PDFRef | PDFDict |
Returns
newExtGStateKey()
newExtGStateKey(tag): PDFName;Defined in: src/core/structures/PDFPageLeaf.ts:187
Parameters
| Parameter | Type |
|---|---|
tag | string |
Returns
newFontDictionary()
newFontDictionary(tag, fontDictRef): PDFName;Defined in: src/core/structures/PDFPageLeaf.ts:160
Parameters
| Parameter | Type |
|---|---|
tag | string |
fontDictRef | PDFRef |
Returns
newFontDictionaryKey()
newFontDictionaryKey(tag): PDFName;Defined in: src/core/structures/PDFPageLeaf.ts:155
Parameters
| Parameter | Type |
|---|---|
tag | string |
Returns
newXObject()
newXObject(tag, xObjectRef): PDFName;Defined in: src/core/structures/PDFPageLeaf.ts:176
Parameters
| Parameter | Type |
|---|---|
tag | string |
xObjectRef | PDFRef |
Returns
newXObjectKey()
newXObjectKey(tag): PDFName;Defined in: src/core/structures/PDFPageLeaf.ts:171
Parameters
| Parameter | Type |
|---|---|
tag | string |
Returns
normalize()
normalize(): void;Defined in: src/core/structures/PDFPageLeaf.ts:204
Returns
void
normalizedEntries()
normalizedEntries(): {
Annots: PDFArray;
Contents: PDFArray | undefined;
ExtGState: PDFDict;
Font: PDFDict;
Resources: PDFDict;
XObject: PDFDict;
};Defined in: src/core/structures/PDFPageLeaf.ts:249
Returns
{
Annots: PDFArray;
Contents: PDFArray | undefined;
ExtGState: PDFDict;
Font: PDFDict;
Resources: PDFDict;
XObject: PDFDict;
}Annots
Annots: PDFArray;Contents
Contents: PDFArray | undefined;ExtGState
ExtGState: PDFDict;Font
Font: PDFDict;Resources
Resources: PDFDict;XObject
XObject: PDFDict;Parent()
Parent(): PDFPageTree | undefined;Defined in: src/core/structures/PDFPageLeaf.ts:60
Returns
PDFPageTree | undefined
registerChange()
registerChange(): void;Defined in: src/core/objects/PDFDict.ts:229
Returns
void
Inherited from
removeAnnot()
removeAnnot(annotRef): void;Defined in: src/core/structures/PDFPageLeaf.ts:141
Parameters
| Parameter | Type |
|---|---|
annotRef | PDFRef |
Returns
void
Resources()
Resources(): PDFDict | undefined;Defined in: src/core/structures/PDFPageLeaf.ts:87
Returns
PDFDict | undefined
Rotate()
Rotate(): PDFNumber | undefined;Defined in: src/core/structures/PDFPageLeaf.ts:102
Returns
PDFNumber | undefined
set()
set(key, value): void;Defined in: src/core/objects/PDFDict.ts:46
Parameters
| Parameter | Type |
|---|---|
key | PDFName |
value | PDFObject |
Returns
void
Inherited from
setExtGState()
setExtGState(name, extGStateRef): void;Defined in: src/core/structures/PDFPageLeaf.ts:182
Parameters
| Parameter | Type |
|---|---|
name | PDFName |
extGStateRef | PDFRef | PDFDict |
Returns
void
setFontDictionary()
setFontDictionary(name, fontDictRef): void;Defined in: src/core/structures/PDFPageLeaf.ts:150
Parameters
| Parameter | Type |
|---|---|
name | PDFName |
fontDictRef | PDFRef |
Returns
void
setParent()
setParent(parentRef): void;Defined in: src/core/structures/PDFPageLeaf.ts:115
Parameters
| Parameter | Type |
|---|---|
parentRef | PDFRef |
Returns
void
setXObject()
setXObject(name, xObjectRef): void;Defined in: src/core/structures/PDFPageLeaf.ts:166
Parameters
| Parameter | Type |
|---|---|
name | PDFName |
xObjectRef | PDFRef |
Returns
void
sizeInBytes()
sizeInBytes(): number;Defined in: src/core/objects/PDFDict.ts:197
Returns
number
Inherited from
toString()
toString(): string;Defined in: src/core/objects/PDFDict.ts:186
Returns
string
Inherited from
TrimBox()
TrimBox(): PDFArray | undefined;Defined in: src/core/structures/PDFPageLeaf.ts:79
Returns
PDFArray | undefined
uniqueKey()
uniqueKey(tag?): PDFName;Defined in: src/core/objects/PDFDict.ts:167
Generate a random key that doesn't exist in current key set
Parameters
| Parameter | Type | Default value |
|---|---|---|
tag | string | '' |
Returns
Inherited from
values()
values(): PDFObject[];Defined in: src/core/objects/PDFDict.ts:38
Returns
Inherited from
withContext()
static withContext(context): PDFDict;Defined in: src/core/objects/PDFDict.ts:17
Parameters
| Parameter | Type |
|---|---|
context | PDFContext |
Returns
Inherited from
withContextAndParent()
static withContextAndParent(context, parent): PDFPageLeaf;Defined in: src/core/structures/PDFPageLeaf.ts:19
Parameters
| Parameter | Type |
|---|---|
context | PDFContext |
parent | PDFRef |
Returns
PDFPageLeaf
wrapContentStreams()
wrapContentStreams(startStream, endStream): boolean;Defined in: src/core/structures/PDFPageLeaf.ts:125
Parameters
| Parameter | Type |
|---|---|
startStream | PDFRef |
endStream | PDFRef |
Returns
boolean