@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.
@@ -1319,7 +1319,7 @@ class PdfDictionary {
1319
1319
  * @hidden
1320
1320
  * @private
1321
1321
  */
1322
- this.isFont = false;
1322
+ this.isResource = false;
1323
1323
  if (typeof dictionary === 'undefined') {
1324
1324
  this.primitiveItems = new Dictionary();
1325
1325
  this.encrypt = true;
@@ -2136,16 +2136,6 @@ class PdfStream extends PdfDictionary {
2136
2136
  * @private
2137
2137
  */
2138
2138
  this.bCompress = true;
2139
- /**
2140
- * @hidden
2141
- * @private
2142
- */
2143
- this.isImageStream = false;
2144
- /**
2145
- * @hidden
2146
- * @private
2147
- */
2148
- this.isFontStream = false;
2149
2139
  if (typeof dictionary !== 'undefined' || typeof data !== 'undefined') {
2150
2140
  this.dataStream2 = [];
2151
2141
  this.dataStream2 = data;
@@ -2169,26 +2159,6 @@ class PdfStream extends PdfDictionary {
2169
2159
  this.dataStream2 = value;
2170
2160
  this.modify();
2171
2161
  }
2172
- /**
2173
- * Gets or sets 'is image' flag.
2174
- * @private
2175
- */
2176
- get isImage() {
2177
- return this.isImageStream;
2178
- }
2179
- set isImage(value) {
2180
- this.isImageStream = value;
2181
- }
2182
- /**
2183
- * Gets or sets 'is font' flag.
2184
- * @private
2185
- */
2186
- get isFont() {
2187
- return this.isFontStream;
2188
- }
2189
- set isFont(value) {
2190
- this.isFontStream = value;
2191
- }
2192
2162
  /**
2193
2163
  * Gets or sets `compression` flag.
2194
2164
  * @private
@@ -2330,7 +2300,7 @@ class PdfStream extends PdfDictionary {
2330
2300
  for (let i = 0; i < this.data.length; i++) {
2331
2301
  data = data + this.data[i];
2332
2302
  }
2333
- if (data.length > 1 && !this.isImage && !this.isFont) {
2303
+ if (data.length > 1 && !this.isResource) {
2334
2304
  data = 'q\r\n' + data + 'Q\r\n';
2335
2305
  }
2336
2306
  data = this.compressContent(data, writer);
@@ -10105,7 +10075,7 @@ class ImageDecoder {
10105
10075
  if (this.mFormat === ImageFormat.Jpeg) {
10106
10076
  let tempArrayBuffer = this.imageData.internalBuffer.length;
10107
10077
  this.imageStream = new PdfStream();
10108
- this.imageStream.isImage = true;
10078
+ this.imageStream.isResource = true;
10109
10079
  let tempString = '';
10110
10080
  let decodedString = '';
10111
10081
  for (let i = 0; i < this.imageDataAsNumberArray.byteLength; i++) {
@@ -12279,7 +12249,7 @@ class UnicodeTrueTypeFont {
12279
12249
  */
12280
12250
  createDescendantFont() {
12281
12251
  // Set property used to clone Font every time
12282
- this.descendantFont.isFont = true;
12252
+ this.descendantFont.isResource = true;
12283
12253
  this.descendantFont.descendantFontBeginSave = new SaveDescendantFontEventHandler(this);
12284
12254
  this.descendantFont.items.setValue(this.dictionaryProperties.type, new PdfName(this.dictionaryProperties.font));
12285
12255
  this.descendantFont.items.setValue(this.dictionaryProperties.subtype, new PdfName(this.dictionaryProperties.cIDFontType2));
@@ -12298,7 +12268,7 @@ class UnicodeTrueTypeFont {
12298
12268
  let descriptor = new PdfDictionary();
12299
12269
  let metrics = this.ttfReader.metrics;
12300
12270
  // Set property used to clone Font every time
12301
- descriptor.isFont = true;
12271
+ descriptor.isResource = true;
12302
12272
  descriptor.items.setValue(this.dictionaryProperties.type, new PdfName(this.dictionaryProperties.fontDescriptor));
12303
12273
  descriptor.items.setValue(this.dictionaryProperties.fontName, new PdfName(this.subsetName));
12304
12274
  descriptor.items.setValue(this.dictionaryProperties.flags, new PdfNumber(this.getDescriptorFlags()));
@@ -12329,7 +12299,7 @@ class UnicodeTrueTypeFont {
12329
12299
  */
12330
12300
  createFontDictionary() {
12331
12301
  // Set property used to clone Font every time
12332
- this.fontDictionary.isFont = true;
12302
+ this.fontDictionary.isResource = true;
12333
12303
  this.fontDictionary.fontDictionaryBeginSave = new SaveFontDictionaryEventHandler(this);
12334
12304
  this.fontDictionary.items.setValue(this.dictionaryProperties.type, new PdfName(this.dictionaryProperties.font));
12335
12305
  this.fontDictionary.items.setValue(this.dictionaryProperties.baseFont, new PdfName(this.subsetName));
@@ -12498,7 +12468,7 @@ class UnicodeTrueTypeFont {
12498
12468
  }
12499
12469
  builder += this.cmapSuffix;
12500
12470
  this.cmap.clearStream();
12501
- this.cmap.isFont = true;
12471
+ this.cmap.isResource = true;
12502
12472
  this.cmap.write(builder);
12503
12473
  }
12504
12474
  }
@@ -12512,7 +12482,7 @@ class UnicodeTrueTypeFont {
12512
12482
  this.ttfReader.setOffset(0);
12513
12483
  fontProgram = this.ttfReader.readFontProgram(this.usedChars);
12514
12484
  this.fontProgram.clearStream();
12515
- this.fontProgram.isFont = true;
12485
+ this.fontProgram.isResource = true;
12516
12486
  this.fontProgram.writeBytes(fontProgram);
12517
12487
  }
12518
12488
  /**
@@ -22734,6 +22704,7 @@ class PdfSampledFunction extends PdfFunction {
22734
22704
  */
22735
22705
  setSizeAndValues(sizes, samples) {
22736
22706
  let s = (this.dictionary);
22707
+ s.isResource = true;
22737
22708
  this.dictionary.items.setValue(this.mDictionaryProperties.size, new PdfArray(sizes));
22738
22709
  this.dictionary.items.setValue(this.mDictionaryProperties.bitsPerSample, new PdfNumber(8));
22739
22710
  s.writeBytes(samples);