Attachment
Overview
Attachment is a class in Aspose.PDF FOSS for TypeScript.
A live handle over one embedded file’s /Filespec.
This class declares 5 methods for Attachment objects in TypeScript programs.
Available methods include: GetBytes, GetField, RemoveField, SetField, constructor.
All public members are accessible to any TypeScript application after installing the Aspose.PDF FOSS for TypeScript package.
Properties: CreationDate, Description, MimeType, ModDate, Name, Size.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
Name | string | Read | Gets the name. |
Description | string | undefined | Read | Gets the description. |
MimeType | string | undefined | Read | Gets the mime type. |
Size | number | undefined | Read | Gets the size. |
CreationDate | Date | undefined | Read | Gets the creation date. |
ModDate | Date | undefined | Read | Gets the mod date. |
Methods
| Signature | Description |
|---|---|
constructor(doc: Document, Dict: PdfDict, fallbackName: string) | Calls constructor(doc, Dict, fallbackName) on this Attachment instance. |
GetBytes() → Uint8Array | Decode the embedded bytes, inflating FlateDecode if present. |
GetField(field: string) → string | number | Date | undefined | Read a custom /CI field. |
SetField(field: string, value: string | number | Date) | Upsert a custom /CI field value. |
RemoveField(field: string) | Remove a custom /CI field value, dropping /CI when only /Type remains. |