Skip to content

happypdf / PDFPageLeaf

Class: PDFPageLeaf ​

Defined in: src/core/structures/PDFPageLeaf.ts:11

Extends ​

Properties ​

context ​

ts
readonly context: PDFContext;

Defined in: src/core/objects/PDFDict.ts:22

Inherited from ​

PDFDict.context


InheritableEntries ​

ts
readonly static InheritableEntries: string[];

Defined in: src/core/structures/PDFPageLeaf.ts:12


suppressEncryption ​

ts
suppressEncryption: boolean = false;

Defined in: src/core/objects/PDFDict.ts:26

Inherited from ​

PDFDict.suppressEncryption

Methods ​

addAnnot() ​

ts
addAnnot(annotRef): void;

Defined in: src/core/structures/PDFPageLeaf.ts:135

Parameters ​

ParameterType
annotRefPDFRef

Returns ​

void


addContentStream() ​

ts
addContentStream(contentStreamRef): void;

Defined in: src/core/structures/PDFPageLeaf.ts:119

Parameters ​

ParameterType
contentStreamRefPDFRef

Returns ​

void


Annots() ​

ts
Annots(): PDFArray | undefined;

Defined in: src/core/structures/PDFPageLeaf.ts:71

Returns ​

PDFArray | undefined


ArtBox() ​

ts
ArtBox(): PDFArray | undefined;

Defined in: src/core/structures/PDFPageLeaf.ts:83

Returns ​

PDFArray | undefined


ascend() ​

ts
ascend(visitor): void;

Defined in: src/core/structures/PDFPageLeaf.ts:198

Parameters ​

ParameterType
visitor(node) => any

Returns ​

void


asMap() ​

ts
asMap(): Map<PDFName, PDFObject>;

Defined in: src/core/objects/PDFDict.ts:162

Returns ​

Map&lt;PDFName, PDFObject&gt;

Inherited from ​

PDFDict.asMap


BleedBox() ​

ts
BleedBox(): PDFArray | undefined;

Defined in: src/core/structures/PDFPageLeaf.ts:75

Returns ​

PDFArray | undefined


clone() ​

ts
clone(context?): PDFPageLeaf;

Defined in: src/core/structures/PDFPageLeaf.ts:46

Parameters ​

ParameterType
context?PDFContext

Returns ​

PDFPageLeaf

Overrides ​

PDFDict.clone


Contents() ​

ts
Contents(): PDFStream | PDFArray | undefined;

Defined in: src/core/structures/PDFPageLeaf.ts:64

Returns ​

PDFStream | PDFArray | undefined


copyBytesInto() ​

ts
copyBytesInto(buffer, offset): number;

Defined in: src/core/objects/PDFDict.ts:207

Parameters ​

ParameterType
bufferUint8Array
offsetnumber

Returns ​

number

Inherited from ​

PDFDict.copyBytesInto


CropBox() ​

ts
CropBox(): PDFArray | undefined;

Defined in: src/core/structures/PDFPageLeaf.ts:97

Returns ​

PDFArray | undefined


delete() ​

ts
delete(key): boolean;

Defined in: src/core/objects/PDFDict.ts:157

Parameters ​

ParameterType
keyPDFName

Returns ​

boolean

Inherited from ​

PDFDict.delete


entries() ​

ts
entries(): [PDFName, PDFObject][];

Defined in: src/core/objects/PDFDict.ts:42

Returns ​

[PDFName, PDFObject][]

Inherited from ​

PDFDict.entries


fromMapWithContext() ​

ts
static fromMapWithContext(
   map, 
   context, 
   autoNormalizeCTM?): PDFPageLeaf;

Defined in: src/core/structures/PDFPageLeaf.ts:28

Parameters ​

ParameterTypeDefault value
mapDictMapundefined
contextPDFContextundefined
autoNormalizeCTMbooleantrue

Returns ​

PDFPageLeaf

Overrides ​

PDFDict.fromMapWithContext


get() ​

ts
get(key, preservePDFNull?): PDFObject | undefined;

Defined in: src/core/objects/PDFDict.ts:51

Parameters ​

ParameterTypeDefault value
keyPDFNameundefined
preservePDFNullbooleanfalse

Returns ​

PDFObject | undefined

Inherited from ​

PDFDict.get


getInheritableAttribute() ​

ts
getInheritableAttribute(name): PDFObject | undefined;

Defined in: src/core/structures/PDFPageLeaf.ts:107

Parameters ​

ParameterType
namePDFName

Returns ​

PDFObject | undefined


has() ​

ts
has(key): boolean;

Defined in: src/core/objects/PDFDict.ts:62

Parameters ​

ParameterType
keyPDFName

Returns ​

boolean

Inherited from ​

PDFDict.has


keys() ​

ts
keys(): PDFName[];

Defined in: src/core/objects/PDFDict.ts:34

Returns ​

PDFName[]

Inherited from ​

PDFDict.keys


lookup() ​

Call Signature ​

ts
lookup(key): PDFObject | undefined;

Defined in: src/core/objects/PDFDict.ts:113

Parameters ​
ParameterType
keyPDFName
Returns ​

PDFObject | undefined

Inherited from ​

PDFDict.lookup

Call Signature ​

ts
lookup(key, type): PDFArray;

Defined in: src/core/objects/PDFDict.ts:114

Parameters ​
ParameterType
keyPDFName
typetypeof PDFArray
Returns ​

PDFArray

Inherited from ​

PDFDict.lookup

Call Signature ​

ts
lookup(key, type): PDFBool;

Defined in: src/core/objects/PDFDict.ts:115

Parameters ​
ParameterType
keyPDFName
typetypeof PDFBool
Returns ​

PDFBool

Inherited from ​

PDFDict.lookup

Call Signature ​

ts
lookup(key, type): PDFDict;

Defined in: src/core/objects/PDFDict.ts:116

Parameters ​
ParameterType
keyPDFName
typetypeof PDFDict
Returns ​

PDFDict

Inherited from ​

PDFDict.lookup

Call Signature ​

ts
lookup(key, type): PDFHexString;

Defined in: src/core/objects/PDFDict.ts:117

Parameters ​
ParameterType
keyPDFName
typetypeof PDFHexString
Returns ​

PDFHexString

Inherited from ​

PDFDict.lookup

Call Signature ​

ts
lookup(key, type): PDFName;

Defined in: src/core/objects/PDFDict.ts:118

Parameters ​
ParameterType
keyPDFName
typetypeof PDFName
Returns ​

PDFName

Inherited from ​

PDFDict.lookup

Call Signature ​

ts
lookup(key, type): PDFNull;

Defined in: src/core/objects/PDFDict.ts:119

Parameters ​
ParameterType
keyPDFName
typePDFNull
Returns ​

PDFNull

Inherited from ​

PDFDict.lookup

Call Signature ​

ts
lookup(key, type): PDFNumber;

Defined in: src/core/objects/PDFDict.ts:120

Parameters ​
ParameterType
keyPDFName
typetypeof PDFNumber
Returns ​

PDFNumber

Inherited from ​

PDFDict.lookup

Call Signature ​

ts
lookup(key, type): PDFStream;

Defined in: src/core/objects/PDFDict.ts:121

Parameters ​
ParameterType
keyPDFName
typetypeof PDFStream
Returns ​

PDFStream

Inherited from ​

PDFDict.lookup

Call Signature ​

ts
lookup(key, type): PDFRef;

Defined in: src/core/objects/PDFDict.ts:122

Parameters ​
ParameterType
keyPDFName
typetypeof PDFRef
Returns ​

PDFRef

Inherited from ​

PDFDict.lookup

Call Signature ​

ts
lookup(key, type): PDFString;

Defined in: src/core/objects/PDFDict.ts:123

Parameters ​
ParameterType
keyPDFName
typetypeof PDFString
Returns ​

PDFString

Inherited from ​

PDFDict.lookup

Call Signature ​

ts
lookup(
   ref, 
   type1, 
   type2): PDFHexString | PDFString;

Defined in: src/core/objects/PDFDict.ts:124

Parameters ​
ParameterType
refPDFName
type1typeof PDFString
type2typeof PDFHexString
Returns ​

PDFHexString | PDFString

Inherited from ​

PDFDict.lookup

Call Signature ​

ts
lookup(
   ref, 
   type1, 
   type2): PDFStream | PDFDict;

Defined in: src/core/objects/PDFDict.ts:129

Parameters ​
ParameterType
refPDFName
type1typeof PDFDict
type2typeof PDFStream
Returns ​

PDFStream | PDFDict

Inherited from ​

PDFDict.lookup

Call Signature ​

ts
lookup(
   ref, 
   type1, 
   type2, 
   type3): 
  | PDFHexString
  | PDFString
  | PDFArray;

Defined in: src/core/objects/PDFDict.ts:134

Parameters ​
ParameterType
refPDFName
type1typeof PDFString
type2typeof PDFHexString
type3typeof PDFArray
Returns ​

| PDFHexString | PDFString | PDFArray

Inherited from ​

PDFDict.lookup


lookupMaybe() ​

Call Signature ​

ts
lookupMaybe(key, type): PDFArray | undefined;

Defined in: src/core/objects/PDFDict.ts:67

Parameters ​
ParameterType
keyPDFName
typetypeof PDFArray
Returns ​

PDFArray | undefined

Inherited from ​

PDFDict.lookupMaybe

Call Signature ​

ts
lookupMaybe(key, type): PDFBool | undefined;

Defined in: src/core/objects/PDFDict.ts:68

Parameters ​
ParameterType
keyPDFName
typetypeof PDFBool
Returns ​

PDFBool | undefined

Inherited from ​

PDFDict.lookupMaybe

Call Signature ​

ts
lookupMaybe(key, type): PDFDict | undefined;

Defined in: src/core/objects/PDFDict.ts:69

Parameters ​
ParameterType
keyPDFName
typetypeof PDFDict
Returns ​

PDFDict | undefined

Inherited from ​

PDFDict.lookupMaybe

Call Signature ​

ts
lookupMaybe(key, type): PDFHexString | undefined;

Defined in: src/core/objects/PDFDict.ts:70

Parameters ​
ParameterType
keyPDFName
typetypeof PDFHexString
Returns ​

PDFHexString | undefined

Inherited from ​

PDFDict.lookupMaybe

Call Signature ​

ts
lookupMaybe(key, type): PDFName | undefined;

Defined in: src/core/objects/PDFDict.ts:74

Parameters ​
ParameterType
keyPDFName
typetypeof PDFName
Returns ​

PDFName | undefined

Inherited from ​

PDFDict.lookupMaybe

Call Signature ​

ts
lookupMaybe(key, type): PDFNull | undefined;

Defined in: src/core/objects/PDFDict.ts:75

Parameters ​
ParameterType
keyPDFName
typePDFNull
Returns ​

PDFNull | undefined

Inherited from ​

PDFDict.lookupMaybe

Call Signature ​

ts
lookupMaybe(key, type): PDFNumber | undefined;

Defined in: src/core/objects/PDFDict.ts:76

Parameters ​
ParameterType
keyPDFName
typetypeof PDFNumber
Returns ​

PDFNumber | undefined

Inherited from ​

PDFDict.lookupMaybe

Call Signature ​

ts
lookupMaybe(key, type): PDFStream | undefined;

Defined in: src/core/objects/PDFDict.ts:77

Parameters ​
ParameterType
keyPDFName
typetypeof PDFStream
Returns ​

PDFStream | undefined

Inherited from ​

PDFDict.lookupMaybe

Call Signature ​

ts
lookupMaybe(key, type): PDFRef | undefined;

Defined in: src/core/objects/PDFDict.ts:78

Parameters ​
ParameterType
keyPDFName
typetypeof PDFRef
Returns ​

PDFRef | undefined

Inherited from ​

PDFDict.lookupMaybe

Call Signature ​

ts
lookupMaybe(key, type): PDFString | undefined;

Defined in: src/core/objects/PDFDict.ts:79

Parameters ​
ParameterType
keyPDFName
typetypeof PDFString
Returns ​

PDFString | undefined

Inherited from ​

PDFDict.lookupMaybe

Call Signature ​

ts
lookupMaybe(
   ref, 
   type1, 
   type2): 
  | PDFHexString
  | PDFString
  | undefined;

Defined in: src/core/objects/PDFDict.ts:80

Parameters ​
ParameterType
refPDFName
type1typeof PDFString
type2typeof PDFHexString
Returns ​

| PDFHexString | PDFString | undefined

Inherited from ​

PDFDict.lookupMaybe

Call Signature ​

ts
lookupMaybe(
   ref, 
   type1, 
   type2): PDFStream | PDFDict | undefined;

Defined in: src/core/objects/PDFDict.ts:85

Parameters ​
ParameterType
refPDFName
type1typeof PDFDict
type2typeof PDFStream
Returns ​

PDFStream | PDFDict | undefined

Inherited from ​

PDFDict.lookupMaybe

Call Signature ​

ts
lookupMaybe(
   ref, 
   type1, 
   type2, 
   type3): 
  | PDFHexString
  | PDFString
  | PDFArray
  | undefined;

Defined in: src/core/objects/PDFDict.ts:90

Parameters ​
ParameterType
refPDFName
type1typeof PDFString
type2typeof PDFHexString
type3typeof PDFArray
Returns ​

| PDFHexString | PDFString | PDFArray | undefined

Inherited from ​

PDFDict.lookupMaybe


MediaBox() ​

ts
MediaBox(): PDFArray;

Defined in: src/core/structures/PDFPageLeaf.ts:92

Returns ​

PDFArray


newExtGState() ​

ts
newExtGState(tag, extGStateRef): PDFName;

Defined in: src/core/structures/PDFPageLeaf.ts:192

Parameters ​

ParameterType
tagstring
extGStateRefPDFRef | PDFDict

Returns ​

PDFName


newExtGStateKey() ​

ts
newExtGStateKey(tag): PDFName;

Defined in: src/core/structures/PDFPageLeaf.ts:187

Parameters ​

ParameterType
tagstring

Returns ​

PDFName


newFontDictionary() ​

ts
newFontDictionary(tag, fontDictRef): PDFName;

Defined in: src/core/structures/PDFPageLeaf.ts:160

Parameters ​

ParameterType
tagstring
fontDictRefPDFRef

Returns ​

PDFName


newFontDictionaryKey() ​

ts
newFontDictionaryKey(tag): PDFName;

Defined in: src/core/structures/PDFPageLeaf.ts:155

Parameters ​

ParameterType
tagstring

Returns ​

PDFName


newXObject() ​

ts
newXObject(tag, xObjectRef): PDFName;

Defined in: src/core/structures/PDFPageLeaf.ts:176

Parameters ​

ParameterType
tagstring
xObjectRefPDFRef

Returns ​

PDFName


newXObjectKey() ​

ts
newXObjectKey(tag): PDFName;

Defined in: src/core/structures/PDFPageLeaf.ts:171

Parameters ​

ParameterType
tagstring

Returns ​

PDFName


normalize() ​

ts
normalize(): void;

Defined in: src/core/structures/PDFPageLeaf.ts:204

Returns ​

void


normalizedEntries() ​

ts
normalizedEntries(): {
  Annots: PDFArray;
  Contents: PDFArray | undefined;
  ExtGState: PDFDict;
  Font: PDFDict;
  Resources: PDFDict;
  XObject: PDFDict;
};

Defined in: src/core/structures/PDFPageLeaf.ts:249

Returns ​

ts
{
  Annots: PDFArray;
  Contents: PDFArray | undefined;
  ExtGState: PDFDict;
  Font: PDFDict;
  Resources: PDFDict;
  XObject: PDFDict;
}
Annots ​
ts
Annots: PDFArray;
Contents ​
ts
Contents: PDFArray | undefined;
ExtGState ​
ts
ExtGState: PDFDict;
Font ​
ts
Font: PDFDict;
Resources ​
ts
Resources: PDFDict;
XObject ​
ts
XObject: PDFDict;

Parent() ​

ts
Parent(): PDFPageTree | undefined;

Defined in: src/core/structures/PDFPageLeaf.ts:60

Returns ​

PDFPageTree | undefined


registerChange() ​

ts
registerChange(): void;

Defined in: src/core/objects/PDFDict.ts:229

Returns ​

void

Inherited from ​

PDFDict.registerChange


removeAnnot() ​

ts
removeAnnot(annotRef): void;

Defined in: src/core/structures/PDFPageLeaf.ts:141

Parameters ​

ParameterType
annotRefPDFRef

Returns ​

void


Resources() ​

ts
Resources(): PDFDict | undefined;

Defined in: src/core/structures/PDFPageLeaf.ts:87

Returns ​

PDFDict | undefined


Rotate() ​

ts
Rotate(): PDFNumber | undefined;

Defined in: src/core/structures/PDFPageLeaf.ts:102

Returns ​

PDFNumber | undefined


set() ​

ts
set(key, value): void;

Defined in: src/core/objects/PDFDict.ts:46

Parameters ​

ParameterType
keyPDFName
valuePDFObject

Returns ​

void

Inherited from ​

PDFDict.set


setExtGState() ​

ts
setExtGState(name, extGStateRef): void;

Defined in: src/core/structures/PDFPageLeaf.ts:182

Parameters ​

ParameterType
namePDFName
extGStateRefPDFRef | PDFDict

Returns ​

void


setFontDictionary() ​

ts
setFontDictionary(name, fontDictRef): void;

Defined in: src/core/structures/PDFPageLeaf.ts:150

Parameters ​

ParameterType
namePDFName
fontDictRefPDFRef

Returns ​

void


setParent() ​

ts
setParent(parentRef): void;

Defined in: src/core/structures/PDFPageLeaf.ts:115

Parameters ​

ParameterType
parentRefPDFRef

Returns ​

void


setXObject() ​

ts
setXObject(name, xObjectRef): void;

Defined in: src/core/structures/PDFPageLeaf.ts:166

Parameters ​

ParameterType
namePDFName
xObjectRefPDFRef

Returns ​

void


sizeInBytes() ​

ts
sizeInBytes(): number;

Defined in: src/core/objects/PDFDict.ts:197

Returns ​

number

Inherited from ​

PDFDict.sizeInBytes


toString() ​

ts
toString(): string;

Defined in: src/core/objects/PDFDict.ts:186

Returns ​

string

Inherited from ​

PDFDict.toString


TrimBox() ​

ts
TrimBox(): PDFArray | undefined;

Defined in: src/core/structures/PDFPageLeaf.ts:79

Returns ​

PDFArray | undefined


uniqueKey() ​

ts
uniqueKey(tag?): PDFName;

Defined in: src/core/objects/PDFDict.ts:167

Generate a random key that doesn't exist in current key set

Parameters ​

ParameterTypeDefault value
tagstring''

Returns ​

PDFName

Inherited from ​

PDFDict.uniqueKey


values() ​

ts
values(): PDFObject[];

Defined in: src/core/objects/PDFDict.ts:38

Returns ​

PDFObject[]

Inherited from ​

PDFDict.values


withContext() ​

ts
static withContext(context): PDFDict;

Defined in: src/core/objects/PDFDict.ts:17

Parameters ​

ParameterType
contextPDFContext

Returns ​

PDFDict

Inherited from ​

PDFDict.withContext


withContextAndParent() ​

ts
static withContextAndParent(context, parent): PDFPageLeaf;

Defined in: src/core/structures/PDFPageLeaf.ts:19

Parameters ​

ParameterType
contextPDFContext
parentPDFRef

Returns ​

PDFPageLeaf


wrapContentStreams() ​

ts
wrapContentStreams(startStream, endStream): boolean;

Defined in: src/core/structures/PDFPageLeaf.ts:125

Parameters ​

ParameterType
startStreamPDFRef
endStreamPDFRef

Returns ​

boolean

MIT Licensed. A fork of pdf-lib.