import { ObjectManager } from "../ObjectManager"; import { ObjectBase } from "../ObjectBase"; import type { PdfDateTime } from "../Types"; /** * Represents embedded file stream in PDF. * See {@link EmbeddedFileStream}. */ export type EmbeddedFileStreamProperties = { /** * The stream data. */ data: Uint8Array; /** * The date and time when the embedded file was created. */ creationDate?: PdfDateTime | null; /** * The date and time when the embedded file was last modified. */ modificationDate?: PdfDateTime | null; /** * The file's MIME type. */ mimeType?: string | null; }; /** * Represents embedded file stream in PDF. */ export declare class EmbeddedFileStream extends ObjectBase { /** * Initialize a new instance of the {@link EmbeddedFileStream} class. * * @param om - {@link ObjectManager} that controls the lifetime of the {@link EmbeddedFileStream}. * @param bytes - The file data. */ constructor(om: ObjectManager, bytes: Uint8Array); /** * Initialize a new instance of the {@link EmbeddedFileStream} class. * * @param bytes - The file data. */ constructor(bytes: Uint8Array); /** * Gets the Uint8Array containing content of this {@link EmbeddedFileStream}, * stream should be disposed after usage. * NOTE! Method can return null if this {@link EmbeddedFileStream} is empty. */ getStream(): Uint8Array | null; /** * Gets or sets the date and time when the embedded file was created. */ get creationDate(): PdfDateTime | null; /** * Gets or sets the date and time when the embedded file was created. */ set creationDate(value: PdfDateTime | null); /** * Gets or sets the date and time when the embedded file was last modified. */ get modificationDate(): PdfDateTime | null; /** * Gets or sets the date and time when the embedded file was last modified. */ set modificationDate(value: PdfDateTime | null); /** * Gets or sets a 16-byte string that is the checksum of the bytes of the uncompressed embedded file. * The checksum is calculated by applying the standard MD5 message-digest algorithm * to the bytes of the embedded file stream. * Checksum calculated automatically when {@link EmbeddedFileStream} is created. */ get checkSum(): Uint8Array | null; /** * Gets or sets a 16-byte string that is the checksum of the bytes of the uncompressed embedded file. * The checksum is calculated by applying the standard MD5 message-digest algorithm * to the bytes of the embedded file stream. * Checksum calculated automatically when {@link EmbeddedFileStream} is created. */ set checkSum(value: Uint8Array | null); /** * Gets or sets the size of the embedded file, in bytes. */ get size(): number | null; /** * Gets or sets the size of the embedded file, in bytes. */ set size(value: number | null); /** * Gets or sets the file's MIME type. */ get mimeType(): string | null; /** * Gets or sets the file's MIME type. */ set mimeType(value: string | null); }