UNPKG

@syncfusion/ej2-pdf

Version:

Feature-rich JavaScript PDF library with built-in support for loading and manipulating PDF document.

121 lines (120 loc) 4.53 kB
/** * Represents an internal object identifier (OID) helper that encodes, decodes, * and formats object identifiers used within PDF structures. * * @private */ export declare class _PdfObjectIdentifier { /** * Holds the internal byte-encoded representation of the object identifier. * * @private */ _encoding: Uint8Array; /** * Stores the character code for the dot ('.') used in dotted OID notation. * * @private */ _period: number; /** * Creates an internal object identifier from individual numeric nodes, with an optional prefix * either a leading node or an existing identifier to extend. * * @private * @param {number[]} nodes The sequence of OID nodes. * @param {_PdfObjectIdentifier | number} [prefix] An optional prefix OID or the first node to prepend. * @returns {_PdfObjectIdentifier} A new object identifier built from the specified parts. */ _fromParts(nodes: number[], prefix?: _PdfObjectIdentifier | number): _PdfObjectIdentifier; /** * Decodes the internal byte representation into an array of OID nodes. * * @private * @returns {number[]} The decoded list of object identifier nodes. */ _getNodes(): number[]; /** * Formats the internal object identifier as a dot-delimited string (e.g., "1.2.840.113549"). * * @private * @returns {string} The dot-delimited representation of the OID. */ _getDotDelimitedNotation(): string; /** * Formats the internal object identifier in abstract syntax notation (ASN) form. * * @private * @returns {string} The ASN-style representation of the OID. */ _getAbstractSyntaxNotation(): string; /** * Merges two byte arrays into a single contiguous byte sequence. * * @private * @param {Uint8Array} a The first byte array. * @param {Uint8Array} b The second byte array. * @returns {Uint8Array} A new byte array containing the concatenation of both inputs. */ _mergeUint8Arrays(a: Uint8Array, b: Uint8Array): Uint8Array; /** * Parses a dot-delimited object identifier string into an internal object identifier. * * @private * @param {string} str The dot-delimited OID string to parse (e.g., "1.2.840.113549"). * @returns {_PdfObjectIdentifier} A new object identifier built from the parsed string. */ _fromString(str: string): _PdfObjectIdentifier; /** * Parses an encoded object identifier from a validated byte sequence. * * @private * @param {Uint8Array} bytes The encoded OID bytes to parse. * @returns {_PdfObjectIdentifier} A new object identifier created from the provided bytes. */ _fromBytes(bytes: Uint8Array): _PdfObjectIdentifier; /** * Creates an object identifier from a byte sequence without validating its structure. * * @private * @param {Uint8Array} bytes The encoded OID bytes to attach directly. * @returns {_PdfObjectIdentifier} A new object identifier referencing the provided bytes. */ _fromBytesUnsafe(bytes: Uint8Array): _PdfObjectIdentifier; /** * Returns the object identifier in its dot delimited string representation. * * @returns {string} The dot delimited notation generated from the internal nodes. */ toString(): string; /** * Converts the internal object identifier to its dot-delimited string form for JSON usage. * * @private * @returns {string} The dot-delimited representation of the OID. */ _toJson(): string; /** * Gets a copy of the internal byte-encoded representation of this object identifier. * * @private * @returns {Uint8Array} A new byte array containing the encoded OID. */ _toBytes(): Uint8Array; /** * Encodes a set of relative object identifier arcs (nodes) into a byte sequence. * * @private * @param {number[]} value The list of relative OID nodes to encode. * @returns {Uint8Array} The encoded byte sequence representing the relative OID. */ _encodeRelativeObjectIdentifier(value: number[]): Uint8Array; /** * Decodes a byte sequence into a list of relative object identifier arcs (nodes). * * @private * @param {Uint8Array} value The encoded byte sequence to decode. * @returns {number[]} The decoded list of relative OID nodes. */ _decodeRelativeObjectIdentifier(value: Uint8Array): number[]; }