UNPKG

@syncfusion/ej2-pdf

Version:

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

38 lines (37 loc) 1.44 kB
/** * Represents an internal PDF character string structure used for parsing and serializing PDF syntax elements. * * @private */ var _PdfCharacterString = /** @class */ (function () { function _PdfCharacterString(identification, stringValue) { this._identification = identification; this._stringValue = stringValue; } /** * Converts the internal character string into a readable textual representation. * * @private * @returns {string} A formatted string describing the identification and data value. */ _PdfCharacterString.prototype._toString = function () { return ('CHARACTER STRING { ' + ("identification " + this._identification._toString() + " ") + ("dataValue " + Array.from(this._stringValue).map(function (byte) { return byte.toString(16); }).join('') + " ") + '}'); }; /** * Converts the internal character string into a JSON-compatible representation. * * @private * @returns {any} A JSON object containing identification and data value information. */ _PdfCharacterString.prototype._toJson = function () { return { identification: this._identification._toJson(), dataValue: Array.from(this._stringValue).map(function (byte) { return byte.toString(16); }).join('') }; }; return _PdfCharacterString; }()); export { _PdfCharacterString };