happypdf / PDFCatalog
Class: PDFCatalog
Defined in: src/core/structures/PDFCatalog.ts:11
Extends
Constructors
Constructor
protected new PDFCatalog(map, context): PDFCatalog;Defined in: src/core/objects/PDFDict.ts:28
Parameters
| Parameter | Type |
|---|---|
map | DictMap |
context | PDFContext |
Returns
PDFCatalog
Inherited from
Properties
context
readonly context: PDFContext;Defined in: src/core/objects/PDFDict.ts:22
Inherited from
suppressEncryption
suppressEncryption: boolean = false;Defined in: src/core/objects/PDFDict.ts:26
Inherited from
Methods
AcroForm()
AcroForm(): PDFDict | undefined;Defined in: src/core/structures/PDFCatalog.ts:29
Returns
PDFDict | undefined
asMap()
asMap(): Map<PDFName, PDFObject>;Defined in: src/core/objects/PDFDict.ts:162
Returns
Inherited from
AttachedFiles()
AttachedFiles(): PDFArray | undefined;Defined in: src/core/structures/PDFCatalog.ts:37
Returns
PDFArray | undefined
clone()
clone(context?): PDFDict;Defined in: src/core/objects/PDFDict.ts:176
Parameters
| Parameter | Type |
|---|---|
context? | PDFContext |
Returns
Inherited from
copyBytesInto()
copyBytesInto(buffer, offset): number;Defined in: src/core/objects/PDFDict.ts:207
Parameters
| Parameter | Type |
|---|---|
buffer | Uint8Array |
offset | number |
Returns
number
Inherited from
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): PDFCatalog;Defined in: src/core/structures/PDFCatalog.ts:22
Parameters
| Parameter | Type |
|---|---|
map | DictMap |
context | PDFContext |
Returns
PDFCatalog
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
getAcroForm()
getAcroForm(): PDFAcroForm | undefined;Defined in: src/core/structures/PDFCatalog.ts:41
Returns
PDFAcroForm | undefined
getOCProperties()
getOCProperties(): OptionalContentProperties | undefined;Defined in: src/core/structures/PDFCatalog.ts:77
Returns
OptionalContentProperties | undefined
getOrCreateAcroForm()
getOrCreateAcroForm(): PDFAcroForm;Defined in: src/core/structures/PDFCatalog.ts:47
Returns
getOrCreateViewerPreferences()
getOrCreateViewerPreferences(): ViewerPreferences;Defined in: src/core/structures/PDFCatalog.ts:67
Returns
getViewerPreferences()
getViewerPreferences(): ViewerPreferences | undefined;Defined in: src/core/structures/PDFCatalog.ts:61
Returns
ViewerPreferences | undefined
has()
has(key): boolean;Defined in: src/core/objects/PDFDict.ts:62
Parameters
| Parameter | Type |
|---|---|
key | PDFName |
Returns
boolean
Inherited from
insertLeafNode()
insertLeafNode(leafRef, index): PDFRef;Defined in: src/core/structures/PDFCatalog.ts:89
Inserts the given ref as a leaf node of this catalog's page tree at the specified index (zero-based). Also increments the Count of each node in the page tree hierarchy to accomodate the new page.
Returns the ref of the PDFPageTree node into which leafRef was inserted.
Parameters
| Parameter | Type |
|---|---|
leafRef | PDFRef |
index | number |
Returns
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
Names()
Names(): PDFDict | undefined;Defined in: src/core/structures/PDFCatalog.ts:33
Returns
PDFDict | undefined
Pages()
Pages(): PDFPageTree;Defined in: src/core/structures/PDFCatalog.ts:25
Returns
registerChange()
registerChange(): void;Defined in: src/core/objects/PDFDict.ts:229
Returns
void
Inherited from
removeLeafNode()
removeLeafNode(index): void;Defined in: src/core/structures/PDFCatalog.ts:95
Parameters
| Parameter | Type |
|---|---|
index | number |
Returns
void
set()
set(key, value): void;Defined in: src/core/objects/PDFDict.ts:46
Parameters
| Parameter | Type |
|---|---|
key | PDFName |
value | PDFObject |
Returns
void
Inherited from
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
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
ViewerPreferences()
ViewerPreferences(): PDFDict | undefined;Defined in: src/core/structures/PDFCatalog.ts:57
Returns
PDFDict | undefined
withContext()
static withContext(context): PDFDict;Defined in: src/core/objects/PDFDict.ts:17
Parameters
| Parameter | Type |
|---|---|
context | PDFContext |
Returns
Inherited from
withContextAndPages()
static withContextAndPages(context, pages): PDFCatalog;Defined in: src/core/structures/PDFCatalog.ts:12
Parameters
| Parameter | Type |
|---|---|
context | PDFContext |
pages | PDFRef | PDFPageTree |
Returns
PDFCatalog