@syncfusion/ej2-pdf 23.2.6 → 24.1.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +0 -43
- package/dist/ej2-pdf.umd.min.js +2 -2
- package/dist/ej2-pdf.umd.min.js.map +1 -1
- package/dist/es6/ej2-pdf.es2015.js +27 -29
- package/dist/es6/ej2-pdf.es2015.js.map +1 -1
- package/dist/es6/ej2-pdf.es5.js +25 -27
- package/dist/es6/ej2-pdf.es5.js.map +1 -1
- package/dist/global/ej2-pdf.min.js +2 -2
- package/dist/global/ej2-pdf.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +8 -8
- package/src/pdf/core/import-export/json-document.js +16 -16
- package/src/pdf/core/import-export/xfdf-document.js +9 -11
package/dist/es6/ej2-pdf.es5.js
CHANGED
|
@@ -44117,26 +44117,24 @@ var _XfdfDocument = /** @__PURE__ @class */ (function (_super) {
|
|
|
44117
44117
|
var streamDictionary = primitive.dictionary;
|
|
44118
44118
|
this._writePrefix(writer, 'STREAM', key);
|
|
44119
44119
|
writer._writeAttributeString('DEFINE', '');
|
|
44120
|
+
var data = primitive.getString();
|
|
44121
|
+
if (!streamDictionary.has('Length') && data && data !== '') {
|
|
44122
|
+
streamDictionary.update('Length', primitive.length);
|
|
44123
|
+
}
|
|
44120
44124
|
this._writeAppearanceDictionary(writer, streamDictionary);
|
|
44121
44125
|
writer._writeStartElement('DATA');
|
|
44122
|
-
|
|
44123
|
-
if (length_1 > 0 && (streamDictionary.has('Subtype') &&
|
|
44126
|
+
if ((streamDictionary.has('Subtype') &&
|
|
44124
44127
|
this._getValue(streamDictionary.get('Subtype')) === 'Image') ||
|
|
44125
44128
|
(!streamDictionary.has('Type') && !streamDictionary.has('Subtype'))) {
|
|
44126
44129
|
writer._writeAttributeString('MODE', 'RAW');
|
|
44127
44130
|
writer._writeAttributeString('ENCODING', 'HEX');
|
|
44128
|
-
var data = primitive.getString();
|
|
44129
|
-
if (data && data !== '') {
|
|
44130
|
-
writer._writeRaw(data);
|
|
44131
|
-
}
|
|
44132
44131
|
}
|
|
44133
|
-
else
|
|
44132
|
+
else {
|
|
44134
44133
|
writer._writeAttributeString('MODE', 'FILTERED');
|
|
44135
44134
|
writer._writeAttributeString('ENCODING', 'ASCII');
|
|
44136
|
-
|
|
44137
|
-
|
|
44138
|
-
|
|
44139
|
-
}
|
|
44135
|
+
}
|
|
44136
|
+
if (data && data !== '') {
|
|
44137
|
+
writer._writeRaw(data);
|
|
44140
44138
|
}
|
|
44141
44139
|
writer._writeEndElement();
|
|
44142
44140
|
writer._writeEndElement();
|
|
@@ -46306,27 +46304,27 @@ var _JsonDocument = /** @__PURE__ @class */ (function (_super) {
|
|
|
46306
46304
|
var dataTable = new Map(); // eslint-disable-line
|
|
46307
46305
|
var streamTable = new Map(); // eslint-disable-line
|
|
46308
46306
|
var streamDictionary = value.dictionary;
|
|
46307
|
+
var data = value.getString(true);
|
|
46308
|
+
if (!streamDictionary.has('Length') && data && data !== '') {
|
|
46309
|
+
streamDictionary.update('Length', value.length);
|
|
46310
|
+
}
|
|
46309
46311
|
this._writeAppearanceDictionary(streamTable, streamDictionary);
|
|
46310
|
-
var length_1 = streamDictionary.get('Length');
|
|
46311
46312
|
var type = void 0;
|
|
46312
46313
|
if (streamDictionary.has('Subtype')) {
|
|
46313
46314
|
type = this._getValue(streamDictionary.get('Subtype'));
|
|
46314
46315
|
}
|
|
46315
|
-
if (
|
|
46316
|
-
|
|
46317
|
-
(
|
|
46318
|
-
|
|
46319
|
-
|
|
46320
|
-
|
|
46321
|
-
|
|
46322
|
-
|
|
46323
|
-
|
|
46324
|
-
|
|
46325
|
-
|
|
46326
|
-
|
|
46327
|
-
if (data && data !== '') {
|
|
46328
|
-
dataTable.set('bytes', data);
|
|
46329
|
-
}
|
|
46316
|
+
if ((!streamDictionary.has('Type') && !streamDictionary.has('Subtype')) ||
|
|
46317
|
+
(streamDictionary.has('Subtype') &&
|
|
46318
|
+
(type === 'Image' || type === 'Form' || type === 'CIDFontType0C' || type === 'OpenType'))) {
|
|
46319
|
+
dataTable.set('mode', 'raw');
|
|
46320
|
+
dataTable.set('encoding', 'hex');
|
|
46321
|
+
}
|
|
46322
|
+
else {
|
|
46323
|
+
dataTable.set('mode', 'filtered');
|
|
46324
|
+
dataTable.set('encoding', 'ascii');
|
|
46325
|
+
}
|
|
46326
|
+
if (data && data !== '') {
|
|
46327
|
+
dataTable.set('bytes', data);
|
|
46330
46328
|
}
|
|
46331
46329
|
streamTable.set('data', this._convertToJson(dataTable));
|
|
46332
46330
|
this._writeTable('stream', this._convertToJson(streamTable), table, key, array);
|