Skip to content

happypdf / PDFDict

Class: PDFDict ​

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

Extends ​

Extended by ​

Constructors ​

Constructor ​

ts
protected new PDFDict(map, context): PDFDict;

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

Parameters ​

ParameterType
mapDictMap
contextPDFContext

Returns ​

PDFDict

Overrides ​

PDFObject.constructor

Properties ​

context ​

ts
readonly context: PDFContext;

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


suppressEncryption ​

ts
suppressEncryption: boolean = false;

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

Methods ​

asMap() ​

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

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

Returns ​

Map&lt;PDFName, PDFObject&gt;


clone() ​

ts
clone(context?): PDFDict;

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

Parameters ​

ParameterType
context?PDFContext

Returns ​

PDFDict

Overrides ​

PDFObject.clone


copyBytesInto() ​

ts
copyBytesInto(buffer, offset): number;

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

Parameters ​

ParameterType
bufferUint8Array
offsetnumber

Returns ​

number

Overrides ​

PDFObject.copyBytesInto


delete() ​

ts
delete(key): boolean;

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

Parameters ​

ParameterType
keyPDFName

Returns ​

boolean


entries() ​

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

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

Returns ​

[PDFName, PDFObject][]


fromMapWithContext() ​

ts
static fromMapWithContext(map, context): PDFDict;

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

Parameters ​

ParameterType
mapDictMap
contextPDFContext

Returns ​

PDFDict


get() ​

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

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

Parameters ​

ParameterTypeDefault value
keyPDFNameundefined
preservePDFNullbooleanfalse

Returns ​

PDFObject | undefined


has() ​

ts
has(key): boolean;

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

Parameters ​

ParameterType
keyPDFName

Returns ​

boolean


keys() ​

ts
keys(): PDFName[];

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

Returns ​

PDFName[]


lookup() ​

Call Signature ​

ts
lookup(key): PDFObject | undefined;

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

Parameters ​
ParameterType
keyPDFName
Returns ​

PDFObject | undefined

Call Signature ​

ts
lookup(key, type): PDFArray;

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

Parameters ​
ParameterType
keyPDFName
typetypeof PDFArray
Returns ​

PDFArray

Call Signature ​

ts
lookup(key, type): PDFBool;

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

Parameters ​
ParameterType
keyPDFName
typetypeof PDFBool
Returns ​

PDFBool

Call Signature ​

ts
lookup(key, type): PDFDict;

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

Parameters ​
ParameterType
keyPDFName
typetypeof PDFDict
Returns ​

PDFDict

Call Signature ​

ts
lookup(key, type): PDFHexString;

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

Parameters ​
ParameterType
keyPDFName
typetypeof PDFHexString
Returns ​

PDFHexString

Call Signature ​

ts
lookup(key, type): PDFName;

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

Parameters ​
ParameterType
keyPDFName
typetypeof PDFName
Returns ​

PDFName

Call Signature ​

ts
lookup(key, type): PDFNull;

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

Parameters ​
ParameterType
keyPDFName
typePDFNull
Returns ​

PDFNull

Call Signature ​

ts
lookup(key, type): PDFNumber;

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

Parameters ​
ParameterType
keyPDFName
typetypeof PDFNumber
Returns ​

PDFNumber

Call Signature ​

ts
lookup(key, type): PDFStream;

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

Parameters ​
ParameterType
keyPDFName
typetypeof PDFStream
Returns ​

PDFStream

Call Signature ​

ts
lookup(key, type): PDFRef;

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

Parameters ​
ParameterType
keyPDFName
typetypeof PDFRef
Returns ​

PDFRef

Call Signature ​

ts
lookup(key, type): PDFString;

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

Parameters ​
ParameterType
keyPDFName
typetypeof PDFString
Returns ​

PDFString

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

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

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


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

Call Signature ​

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

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

Parameters ​
ParameterType
keyPDFName
typetypeof PDFBool
Returns ​

PDFBool | undefined

Call Signature ​

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

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

Parameters ​
ParameterType
keyPDFName
typetypeof PDFDict
Returns ​

PDFDict | undefined

Call Signature ​

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

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

Parameters ​
ParameterType
keyPDFName
typetypeof PDFHexString
Returns ​

PDFHexString | undefined

Call Signature ​

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

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

Parameters ​
ParameterType
keyPDFName
typetypeof PDFName
Returns ​

PDFName | undefined

Call Signature ​

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

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

Parameters ​
ParameterType
keyPDFName
typePDFNull
Returns ​

PDFNull | undefined

Call Signature ​

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

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

Parameters ​
ParameterType
keyPDFName
typetypeof PDFNumber
Returns ​

PDFNumber | undefined

Call Signature ​

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

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

Parameters ​
ParameterType
keyPDFName
typetypeof PDFStream
Returns ​

PDFStream | undefined

Call Signature ​

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

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

Parameters ​
ParameterType
keyPDFName
typetypeof PDFRef
Returns ​

PDFRef | undefined

Call Signature ​

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

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

Parameters ​
ParameterType
keyPDFName
typetypeof PDFString
Returns ​

PDFString | undefined

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

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

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


registerChange() ​

ts
registerChange(): void;

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

Returns ​

void

Overrides ​

PDFObject.registerChange


set() ​

ts
set(key, value): void;

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

Parameters ​

ParameterType
keyPDFName
valuePDFObject

Returns ​

void


sizeInBytes() ​

ts
sizeInBytes(): number;

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

Returns ​

number

Overrides ​

PDFObject.sizeInBytes


toString() ​

ts
toString(): string;

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

Returns ​

string

Overrides ​

PDFObject.toString


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


values() ​

ts
values(): PDFObject[];

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

Returns ​

PDFObject[]


withContext() ​

ts
static withContext(context): PDFDict;

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

Parameters ​

ParameterType
contextPDFContext

Returns ​

PDFDict

MIT Licensed. A fork of pdf-lib.