PDFiumAttachmentWriter
Defined in: src/document/attachment-writer.ts:32
Methods
Section titled “Methods”getStringValue()
Section titled “getStringValue()”getStringValue(
key):string|undefined
Defined in: src/document/attachment-writer.ts:101
Get a string value from this attachment.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
key | string | The key to get |
Returns
Section titled “Returns”string | undefined
The string value or undefined if not found
getValueType()
Section titled “getValueType()”getValueType(
key):AttachmentValueType
Defined in: src/document/attachment-writer.ts:85
Get the value type of a key on this attachment.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
key | string | The key to check |
Returns
Section titled “Returns”The value type
hasKey()
Section titled “hasKey()”hasKey(
key):boolean
Defined in: src/document/attachment-writer.ts:73
Check if this attachment has a specific key.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
key | string | The key to check |
Returns
Section titled “Returns”boolean
True if the key exists
setFile()
Section titled “setFile()”setFile(
contents):boolean
Defined in: src/document/attachment-writer.ts:54
Set the file contents of this attachment.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
contents | Uint8Array | The file contents |
Returns
Section titled “Returns”boolean
True if successful
setStringValue()
Section titled “setStringValue()”setStringValue(
key,value):boolean
Defined in: src/document/attachment-writer.ts:116
Set a string value on this attachment.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
key | string | The key to set |
value | string | The string value |
Returns
Section titled “Returns”boolean
True if successful