@syncfusion/ej2-pdf-export 22.2.5 → 23.1.39

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.
@@ -1347,7 +1347,7 @@ var PdfDictionary = /** @__PURE__ @class */ (function () {
1347
1347
  * @hidden
1348
1348
  * @private
1349
1349
  */
1350
- this.isFont = false;
1350
+ this.isResource = false;
1351
1351
  if (typeof dictionary === 'undefined') {
1352
1352
  this.primitiveItems = new Dictionary();
1353
1353
  this.encrypt = true;
@@ -2279,16 +2279,6 @@ var PdfStream = /** @__PURE__ @class */ (function (_super) {
2279
2279
  * @private
2280
2280
  */
2281
2281
  _this.bCompress = true;
2282
- /**
2283
- * @hidden
2284
- * @private
2285
- */
2286
- _this.isImageStream = false;
2287
- /**
2288
- * @hidden
2289
- * @private
2290
- */
2291
- _this.isFontStream = false;
2292
2282
  if (typeof dictionary !== 'undefined' || typeof data !== 'undefined') {
2293
2283
  _this.dataStream2 = [];
2294
2284
  _this.dataStream2 = data;
@@ -2317,34 +2307,6 @@ var PdfStream = /** @__PURE__ @class */ (function (_super) {
2317
2307
  enumerable: true,
2318
2308
  configurable: true
2319
2309
  });
2320
- Object.defineProperty(PdfStream.prototype, "isImage", {
2321
- /**
2322
- * Gets or sets 'is image' flag.
2323
- * @private
2324
- */
2325
- get: function () {
2326
- return this.isImageStream;
2327
- },
2328
- set: function (value) {
2329
- this.isImageStream = value;
2330
- },
2331
- enumerable: true,
2332
- configurable: true
2333
- });
2334
- Object.defineProperty(PdfStream.prototype, "isFont", {
2335
- /**
2336
- * Gets or sets 'is font' flag.
2337
- * @private
2338
- */
2339
- get: function () {
2340
- return this.isFontStream;
2341
- },
2342
- set: function (value) {
2343
- this.isFontStream = value;
2344
- },
2345
- enumerable: true,
2346
- configurable: true
2347
- });
2348
2310
  Object.defineProperty(PdfStream.prototype, "compress", {
2349
2311
  /**
2350
2312
  * Gets or sets `compression` flag.
@@ -2494,7 +2456,7 @@ var PdfStream = /** @__PURE__ @class */ (function (_super) {
2494
2456
  for (var i = 0; i < this.data.length; i++) {
2495
2457
  data = data + this.data[i];
2496
2458
  }
2497
- if (data.length > 1 && !this.isImage && !this.isFont) {
2459
+ if (data.length > 1 && !this.isResource) {
2498
2460
  data = 'q\r\n' + data + 'Q\r\n';
2499
2461
  }
2500
2462
  data = this.compressContent(data, writer);
@@ -11076,7 +11038,7 @@ var ImageDecoder = /** @__PURE__ @class */ (function () {
11076
11038
  if (this.mFormat === ImageFormat.Jpeg) {
11077
11039
  var tempArrayBuffer = this.imageData.internalBuffer.length;
11078
11040
  this.imageStream = new PdfStream();
11079
- this.imageStream.isImage = true;
11041
+ this.imageStream.isResource = true;
11080
11042
  var tempString = '';
11081
11043
  var decodedString = '';
11082
11044
  for (var i = 0; i < this.imageDataAsNumberArray.byteLength; i++) {
@@ -13412,7 +13374,7 @@ var UnicodeTrueTypeFont = /** @__PURE__ @class */ (function () {
13412
13374
  */
13413
13375
  UnicodeTrueTypeFont.prototype.createDescendantFont = function () {
13414
13376
  // Set property used to clone Font every time
13415
- this.descendantFont.isFont = true;
13377
+ this.descendantFont.isResource = true;
13416
13378
  this.descendantFont.descendantFontBeginSave = new SaveDescendantFontEventHandler(this);
13417
13379
  this.descendantFont.items.setValue(this.dictionaryProperties.type, new PdfName(this.dictionaryProperties.font));
13418
13380
  this.descendantFont.items.setValue(this.dictionaryProperties.subtype, new PdfName(this.dictionaryProperties.cIDFontType2));
@@ -13431,7 +13393,7 @@ var UnicodeTrueTypeFont = /** @__PURE__ @class */ (function () {
13431
13393
  var descriptor = new PdfDictionary();
13432
13394
  var metrics = this.ttfReader.metrics;
13433
13395
  // Set property used to clone Font every time
13434
- descriptor.isFont = true;
13396
+ descriptor.isResource = true;
13435
13397
  descriptor.items.setValue(this.dictionaryProperties.type, new PdfName(this.dictionaryProperties.fontDescriptor));
13436
13398
  descriptor.items.setValue(this.dictionaryProperties.fontName, new PdfName(this.subsetName));
13437
13399
  descriptor.items.setValue(this.dictionaryProperties.flags, new PdfNumber(this.getDescriptorFlags()));
@@ -13462,7 +13424,7 @@ var UnicodeTrueTypeFont = /** @__PURE__ @class */ (function () {
13462
13424
  */
13463
13425
  UnicodeTrueTypeFont.prototype.createFontDictionary = function () {
13464
13426
  // Set property used to clone Font every time
13465
- this.fontDictionary.isFont = true;
13427
+ this.fontDictionary.isResource = true;
13466
13428
  this.fontDictionary.fontDictionaryBeginSave = new SaveFontDictionaryEventHandler(this);
13467
13429
  this.fontDictionary.items.setValue(this.dictionaryProperties.type, new PdfName(this.dictionaryProperties.font));
13468
13430
  this.fontDictionary.items.setValue(this.dictionaryProperties.baseFont, new PdfName(this.subsetName));
@@ -13631,7 +13593,7 @@ var UnicodeTrueTypeFont = /** @__PURE__ @class */ (function () {
13631
13593
  }
13632
13594
  builder += this.cmapSuffix;
13633
13595
  this.cmap.clearStream();
13634
- this.cmap.isFont = true;
13596
+ this.cmap.isResource = true;
13635
13597
  this.cmap.write(builder);
13636
13598
  }
13637
13599
  }
@@ -13645,7 +13607,7 @@ var UnicodeTrueTypeFont = /** @__PURE__ @class */ (function () {
13645
13607
  this.ttfReader.setOffset(0);
13646
13608
  fontProgram = this.ttfReader.readFontProgram(this.usedChars);
13647
13609
  this.fontProgram.clearStream();
13648
- this.fontProgram.isFont = true;
13610
+ this.fontProgram.isResource = true;
13649
13611
  this.fontProgram.writeBytes(fontProgram);
13650
13612
  };
13651
13613
  /**
@@ -24988,6 +24950,7 @@ var PdfSampledFunction = /** @__PURE__ @class */ (function (_super) {
24988
24950
  */
24989
24951
  PdfSampledFunction.prototype.setSizeAndValues = function (sizes, samples) {
24990
24952
  var s = (this.dictionary);
24953
+ s.isResource = true;
24991
24954
  this.dictionary.items.setValue(this.mDictionaryProperties.size, new PdfArray(sizes));
24992
24955
  this.dictionary.items.setValue(this.mDictionaryProperties.bitsPerSample, new PdfNumber(8));
24993
24956
  s.writeBytes(samples);