@syncfusion/ej2-pdf-export 34.2.8 → 35.1.43

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.
Files changed (64) hide show
  1. package/dist/ej2-pdf-export.min.js +2 -2
  2. package/dist/ej2-pdf-export.umd.min.js +2 -2
  3. package/dist/ej2-pdf-export.umd.min.js.map +1 -1
  4. package/dist/es6/ej2-pdf-export.es2015.js +430 -2797
  5. package/dist/es6/ej2-pdf-export.es2015.js.map +1 -1
  6. package/dist/es6/ej2-pdf-export.es5.js +430 -2797
  7. package/dist/es6/ej2-pdf-export.es5.js.map +1 -1
  8. package/dist/global/ej2-pdf-export.min.js +2 -2
  9. package/dist/global/ej2-pdf-export.min.js.map +1 -1
  10. package/dist/global/index.d.ts +1 -1
  11. package/package.json +2 -2
  12. package/src/implementation/actions/action.d.ts +0 -6
  13. package/src/implementation/actions/action.js +2 -8
  14. package/src/implementation/actions/uri-action.js +2 -2
  15. package/src/implementation/annotations/annotation-collection.d.ts +0 -6
  16. package/src/implementation/annotations/annotation-collection.js +1 -7
  17. package/src/implementation/annotations/annotation.d.ts +0 -6
  18. package/src/implementation/annotations/annotation.js +5 -11
  19. package/src/implementation/annotations/document-link-annotation.js +1 -1
  20. package/src/implementation/annotations/link-annotation.js +1 -1
  21. package/src/implementation/annotations/uri-annotation.js +2 -2
  22. package/src/implementation/document/pdf-viewer-preferences.d.ts +0 -2
  23. package/src/implementation/document/pdf-viewer-preferences.js +12 -14
  24. package/src/implementation/general/pdf-destination.d.ts +0 -6
  25. package/src/implementation/general/pdf-destination.js +2 -8
  26. package/src/implementation/graphics/brushes/pdf-brushes.d.ts +10 -4
  27. package/src/implementation/graphics/brushes/pdf-brushes.js +163 -1843
  28. package/src/implementation/graphics/brushes/pdf-gradient-brush.d.ts +0 -5
  29. package/src/implementation/graphics/brushes/pdf-gradient-brush.js +18 -24
  30. package/src/implementation/graphics/figures/pdf-template.d.ts +0 -6
  31. package/src/implementation/graphics/figures/pdf-template.js +7 -14
  32. package/src/implementation/graphics/fonts/pdf-standard-font-metrics-factory.d.ts +15 -1
  33. package/src/implementation/graphics/fonts/pdf-standard-font-metrics-factory.js +45 -161
  34. package/src/implementation/graphics/fonts/pdf-standard-font.d.ts +0 -5
  35. package/src/implementation/graphics/fonts/pdf-standard-font.js +4 -10
  36. package/src/implementation/graphics/fonts/rtl/rtl-bidirectional.d.ts +7 -0
  37. package/src/implementation/graphics/fonts/rtl/rtl-bidirectional.js +31 -461
  38. package/src/implementation/graphics/fonts/rtl/rtl-text-shape.d.ts +12 -0
  39. package/src/implementation/graphics/fonts/rtl/rtl-text-shape.js +32 -76
  40. package/src/implementation/graphics/fonts/unicode-true-type-font.d.ts +0 -5
  41. package/src/implementation/graphics/fonts/unicode-true-type-font.js +37 -43
  42. package/src/implementation/graphics/images/image-decoder.d.ts +0 -6
  43. package/src/implementation/graphics/images/image-decoder.js +14 -21
  44. package/src/implementation/graphics/images/pdf-bitmap.d.ts +0 -6
  45. package/src/implementation/graphics/images/pdf-bitmap.js +0 -7
  46. package/src/implementation/graphics/pdf-graphics.d.ts +0 -5
  47. package/src/implementation/graphics/pdf-graphics.js +0 -6
  48. package/src/implementation/graphics/pdf-resources.js +15 -15
  49. package/src/implementation/graphics/pdf-transparency.d.ts +0 -6
  50. package/src/implementation/graphics/pdf-transparency.js +6 -13
  51. package/src/implementation/input-output/pdf-cross-table.d.ts +0 -6
  52. package/src/implementation/input-output/pdf-cross-table.js +2 -9
  53. package/src/implementation/pages/pdf-page-base.d.ts +0 -7
  54. package/src/implementation/pages/pdf-page-base.js +4 -11
  55. package/src/implementation/pages/pdf-page-layer.d.ts +0 -5
  56. package/src/implementation/pages/pdf-page-layer.js +0 -6
  57. package/src/implementation/pages/pdf-page.js +5 -5
  58. package/src/implementation/pages/pdf-section-collection.d.ts +0 -5
  59. package/src/implementation/pages/pdf-section-collection.js +5 -11
  60. package/src/implementation/pages/pdf-section.d.ts +0 -5
  61. package/src/implementation/pages/pdf-section.js +6 -12
  62. package/src/implementation/primitives/pdf-reference.d.ts +0 -5
  63. package/src/implementation/primitives/pdf-reference.js +1 -7
  64. package/src/implementation/primitives/pdf-stream.js +7 -7
@@ -1,6 +1,5 @@
1
1
  import { ObjectStatus } from './../input-output/enum';
2
2
  import { PdfDictionary } from './../primitives/pdf-dictionary';
3
- import { DictionaryProperties } from './pdf-dictionary-properties';
4
3
  import { Operators } from './pdf-operators';
5
4
  import { Dictionary } from './../collections/dictionary';
6
5
  import { PdfReference } from './../primitives/pdf-reference';
@@ -32,12 +31,6 @@ var PdfCrossTable = /** @class */ (function () {
32
31
  * @private
33
32
  */
34
33
  this.objectCount = 0;
35
- /**
36
- * Internal variable for accessing fields from `DictionryProperties` class.
37
- * @default new PdfDictionaryProperties()
38
- * @private
39
- */
40
- this.dictionaryProperties = new DictionaryProperties();
41
34
  }
42
35
  Object.defineProperty(PdfCrossTable.prototype, "isMerging", {
43
36
  //Properties
@@ -191,7 +184,7 @@ var PdfCrossTable = /** @class */ (function () {
191
184
  writer.write(Operators.trailer + Operators.newLine);
192
185
  // Save the dictionary.
193
186
  var trailer = this.trailer;
194
- trailer.items.setValue(this.dictionaryProperties.size, new PdfNumber(this.objectCount + 1));
187
+ trailer.items.setValue('Size', new PdfNumber(this.objectCount + 1));
195
188
  trailer = new PdfDictionary(trailer); // Make it real dictionary.
196
189
  trailer.setEncrypt(false);
197
190
  trailer.save(writer);
@@ -386,7 +379,7 @@ var PdfCrossTable = /** @class */ (function () {
386
379
  PdfCrossTable.prototype.saveIndirectObject = function (obj, writer) {
387
380
  var reference = this.getReference(obj);
388
381
  if (obj instanceof PdfCatalog) {
389
- this.trailer.items.setValue(this.dictionaryProperties.root, reference);
382
+ this.trailer.items.setValue('Root', reference);
390
383
  }
391
384
  // NOTE : This is needed for correct string objects encryption.
392
385
  this.pdfDocument.currentSavingObj = reference;
@@ -5,7 +5,6 @@ import { PdfArray } from './../primitives/pdf-array';
5
5
  import { PointF, SizeF } from './../drawing/pdf-drawing';
6
6
  import { PdfPageLayerCollection } from './pdf-page-layer-collection';
7
7
  import { PdfPageLayer } from './pdf-page-layer';
8
- import { DictionaryProperties } from './../input-output/pdf-dictionary-properties';
9
8
  import { PdfResources } from './../graphics/pdf-resources';
10
9
  import { PdfSection } from './pdf-section';
11
10
  /**
@@ -42,12 +41,6 @@ export declare abstract class PdfPageBase implements IPdfWrapper {
42
41
  * @private
43
42
  */
44
43
  private resources;
45
- /**
46
- * Instance of `DictionaryProperties` class.
47
- * @hidden
48
- * @private
49
- */
50
- protected dictionaryProperties: DictionaryProperties;
51
44
  /**
52
45
  * Specifies the current `section`.
53
46
  * @hidden
@@ -1,6 +1,5 @@
1
1
  import { PdfArray } from './../primitives/pdf-array';
2
2
  import { PdfPageLayerCollection } from './pdf-page-layer-collection';
3
- import { DictionaryProperties } from './../input-output/pdf-dictionary-properties';
4
3
  import { PdfResources } from './../graphics/pdf-resources';
5
4
  /**
6
5
  * The abstract base class for all pages,
@@ -26,12 +25,6 @@ var PdfPageBase = /** @class */ (function () {
26
25
  * @private
27
26
  */
28
27
  this.modified = false;
29
- /**
30
- * Instance of `DictionaryProperties` class.
31
- * @hidden
32
- * @private
33
- */
34
- this.dictionaryProperties = new DictionaryProperties();
35
28
  this.pageDictionary = dictionary;
36
29
  }
37
30
  Object.defineProperty(PdfPageBase.prototype, "section", {
@@ -137,7 +130,7 @@ var PdfPageBase = /** @class */ (function () {
137
130
  PdfPageBase.prototype.getResources = function () {
138
131
  if (this.resources == null) {
139
132
  this.resources = new PdfResources();
140
- this.dictionary.items.setValue(this.dictionaryProperties.resources, this.resources);
133
+ this.dictionary.items.setValue('Resources', this.resources);
141
134
  }
142
135
  return this.resources;
143
136
  };
@@ -147,12 +140,12 @@ var PdfPageBase = /** @class */ (function () {
147
140
  * @private
148
141
  */
149
142
  get: function () {
150
- var obj = this.pageDictionary.items.getValue(this.dictionaryProperties.contents);
143
+ var obj = this.pageDictionary.items.getValue('Contents');
151
144
  var contents = obj;
152
145
  var rh = obj;
153
146
  if (contents == null) {
154
147
  contents = new PdfArray();
155
- this.pageDictionary.items.setValue(this.dictionaryProperties.contents, contents);
148
+ this.pageDictionary.items.setValue('Contents', contents);
156
149
  }
157
150
  return contents;
158
151
  },
@@ -165,7 +158,7 @@ var PdfPageBase = /** @class */ (function () {
165
158
  */
166
159
  PdfPageBase.prototype.setResources = function (res) {
167
160
  this.resources = res;
168
- this.dictionary.items.setValue(this.dictionaryProperties.resources, this.resources);
161
+ this.dictionary.items.setValue('Resources', this.resources);
169
162
  this.modified = true;
170
163
  };
171
164
  return PdfPageBase;
@@ -82,11 +82,6 @@ export declare class PdfPageLayer implements IPdfWrapper {
82
82
  * @private
83
83
  */
84
84
  usage: PdfDictionary;
85
- /**
86
- * Instance for `PdfDictionaryProperties` Class.
87
- * @private
88
- */
89
- private dictionaryProperties;
90
85
  /**
91
86
  * Get or set the `color space`.
92
87
  * @private
@@ -1,7 +1,6 @@
1
1
  import { PdfStream } from './../primitives/pdf-stream';
2
2
  import { PdfGraphics, GetResourceEventHandler } from './../graphics/pdf-graphics';
3
3
  import { PdfPageLayerCollection } from './pdf-page-layer-collection';
4
- import { DictionaryProperties } from './../input-output/pdf-dictionary-properties';
5
4
  import { PdfColorSpace } from './../graphics/enum';
6
5
  /**
7
6
  * The `PdfPageLayer` used to create layers in PDF document.
@@ -33,11 +32,6 @@ var PdfPageLayer = /** @class */ (function () {
33
32
  * @private
34
33
  */
35
34
  this.contentLength = 0;
36
- /**
37
- * Instance for `PdfDictionaryProperties` Class.
38
- * @private
39
- */
40
- this.dictionaryProperties = new DictionaryProperties();
41
35
  if (page === null) {
42
36
  throw new Error('ArgumentNullException:page');
43
37
  }
@@ -158,10 +158,10 @@ var PdfPage = /** @class */ (function (_super) {
158
158
  get: function () {
159
159
  if (this.annotationCollection == null) {
160
160
  this.annotationCollection = new PdfAnnotationCollection(this);
161
- // if (!this.Dictionary.ContainsKey(this.dictionaryProperties.annots)) {
162
- this.dictionary.items.setValue(this.dictionaryProperties.annots, this.annotationCollection.element);
161
+ // if (!this.Dictionary.ContainsKey('Annots')) {
162
+ this.dictionary.items.setValue('Annots', this.annotationCollection.element);
163
163
  // }
164
- this.annotationCollection.annotations = this.dictionary.items.getValue(this.dictionaryProperties.annots);
164
+ this.annotationCollection.annotations = this.dictionary.items.getValue('Annots');
165
165
  }
166
166
  return this.annotationCollection;
167
167
  },
@@ -174,7 +174,7 @@ var PdfPage = /** @class */ (function (_super) {
174
174
  * @private
175
175
  */
176
176
  PdfPage.prototype.initialize = function () {
177
- this.dictionary.items.setValue(this.dictionaryProperties.type, new PdfName('Page'));
177
+ this.dictionary.items.setValue('Type', new PdfName('Page'));
178
178
  this.dictionary.pageBeginDrawTemplate = new SaveTemplateEventHandler(this);
179
179
  };
180
180
  /**
@@ -183,7 +183,7 @@ var PdfPage = /** @class */ (function (_super) {
183
183
  */
184
184
  PdfPage.prototype.setSection = function (section) {
185
185
  this.section = section;
186
- this.dictionary.items.setValue(this.dictionaryProperties.parent, new PdfReferenceHolder(section));
186
+ this.dictionary.items.setValue('Parent', new PdfReferenceHolder(section));
187
187
  };
188
188
  /**
189
189
  * `Resets the progress`.
@@ -41,11 +41,6 @@ export declare class PdfSectionCollection implements IPdfWrapper {
41
41
  * @private
42
42
  */
43
43
  private pages;
44
- /**
45
- * @hidden
46
- * @private
47
- */
48
- private dictionaryProperties;
49
44
  /**
50
45
  * Initializes a new instance of the `PdfSectionCollection` class.
51
46
  * @private
@@ -5,7 +5,6 @@ import { PdfDictionary, SaveSectionCollectionEventHandler } from './../primitive
5
5
  import { PdfReferenceHolder } from './../primitives/pdf-reference';
6
6
  import { RectangleF, PointF } from './../drawing/pdf-drawing';
7
7
  import { PdfSection } from './pdf-section';
8
- import { DictionaryProperties } from './../input-output/pdf-dictionary-properties';
9
8
  /**
10
9
  * Represents the `collection of the sections`.
11
10
  * @private
@@ -22,11 +21,6 @@ var PdfSectionCollection = /** @class */ (function () {
22
21
  * @private
23
22
  */
24
23
  this.sections = [];
25
- /**
26
- * @hidden
27
- * @private
28
- */
29
- this.dictionaryProperties = new DictionaryProperties();
30
24
  // if (document === null) {
31
25
  // throw new Error('ArgumentNullException : document');
32
26
  // }
@@ -87,10 +81,10 @@ var PdfSectionCollection = /** @class */ (function () {
87
81
  this.sectionCollection = new PdfArray();
88
82
  this.pages = new PdfDictionary();
89
83
  this.pages.beginSave = new SaveSectionCollectionEventHandler(this);
90
- this.pages.items.setValue(this.dictionaryProperties.type, new PdfName('Pages'));
91
- this.pages.items.setValue(this.dictionaryProperties.kids, this.sectionCollection);
92
- this.pages.items.setValue(this.dictionaryProperties.count, this.sectionCount);
93
- this.pages.items.setValue(this.dictionaryProperties.resources, new PdfDictionary());
84
+ this.pages.items.setValue('Type', new PdfName('Pages'));
85
+ this.pages.items.setValue('Kids', this.sectionCollection);
86
+ this.pages.items.setValue('Count', this.sectionCount);
87
+ this.pages.items.setValue('Resources', new PdfDictionary());
94
88
  this.setPageSettings(this.pages, this.pdfDocument.pageSettings);
95
89
  };
96
90
  /**
@@ -115,7 +109,7 @@ var PdfSectionCollection = /** @class */ (function () {
115
109
  // throw new Error('ArgumentNullException : pageSettings');
116
110
  // }
117
111
  var bounds = new RectangleF(new PointF(), pageSettings.size);
118
- container.items.setValue(this.dictionaryProperties.mediaBox, PdfArray.fromRectangle(bounds));
112
+ container.items.setValue('MediaBox', PdfArray.fromRectangle(bounds));
119
113
  };
120
114
  /**
121
115
  * `Adds` the specified section.
@@ -76,11 +76,6 @@ export declare class PdfSection implements IPdfWrapper {
76
76
  * @private
77
77
  */
78
78
  private pageTemplate;
79
- /**
80
- * @hidden
81
- * @private
82
- */
83
- private dictionaryProperties;
84
79
  /**
85
80
  * A virtual `collection of pages`.
86
81
  * @private
@@ -6,7 +6,6 @@ import { PdfNumber } from './../primitives/pdf-number';
6
6
  import { PdfName } from './../primitives/pdf-name';
7
7
  import { PdfDictionary } from './../primitives/pdf-dictionary';
8
8
  import { SaveSectionEventHandler } from './../primitives/pdf-dictionary';
9
- import { DictionaryProperties } from './../input-output/pdf-dictionary-properties';
10
9
  import { PdfSectionCollection } from './pdf-section-collection';
11
10
  import { PdfSectionPageCollection } from './pdf-section-page-collection';
12
11
  import { RectangleF } from './../drawing/pdf-drawing';
@@ -28,11 +27,6 @@ var PdfSection = /** @class */ (function () {
28
27
  * @private
29
28
  */
30
29
  this.pdfPages = [];
31
- /**
32
- * @hidden
33
- * @private
34
- */
35
- this.dictionaryProperties = new DictionaryProperties();
36
30
  this.pdfDocument = document;
37
31
  if (typeof pageSettings === 'undefined') {
38
32
  this.settings = document.pageSettings.clone();
@@ -55,7 +49,7 @@ var PdfSection = /** @class */ (function () {
55
49
  },
56
50
  set: function (value) {
57
51
  this.sectionCollection = value;
58
- this.section.items.setValue(this.dictionaryProperties.parent, new PdfReferenceHolder(value));
52
+ this.section.items.setValue('Parent', new PdfReferenceHolder(value));
59
53
  },
60
54
  enumerable: true,
61
55
  configurable: true
@@ -194,9 +188,9 @@ var PdfSection = /** @class */ (function () {
194
188
  this.state = new PageSettingsState(this.pdfDocument);
195
189
  this.section.sectionBeginSave = new SaveSectionEventHandler(this, this.state);
196
190
  this.pageCount = new PdfNumber(0);
197
- this.section.items.setValue(this.dictionaryProperties.count, this.pageCount);
198
- this.section.items.setValue(this.dictionaryProperties.type, new PdfName(this.dictionaryProperties.pages));
199
- this.section.items.setValue(this.dictionaryProperties.kids, this.pagesReferences);
191
+ this.section.items.setValue('Count', this.pageCount);
192
+ this.section.items.setValue('Type', new PdfName('Pages'));
193
+ this.section.items.setValue('Kids', this.pagesReferences);
200
194
  };
201
195
  /**
202
196
  * Checks whether any template should be printed on this layer.
@@ -475,11 +469,11 @@ var PdfSection = /** @class */ (function () {
475
469
  */
476
470
  PdfSection.prototype.applyPageSettings = function (container, parentSettings, state) {
477
471
  var bounds = new RectangleF(state.origin, state.size);
478
- container.items.setValue(this.dictionaryProperties.mediaBox, PdfArray.fromRectangle(bounds));
472
+ container.items.setValue('MediaBox', PdfArray.fromRectangle(bounds));
479
473
  var rotate = 0;
480
474
  rotate = PdfSectionCollection.rotateFactor * state.rotate;
481
475
  var angle = new PdfNumber(rotate);
482
- container.items.setValue(this.dictionaryProperties.rotate, angle);
476
+ container.items.setValue('Rotate', angle);
483
477
  };
484
478
  /**
485
479
  * Catches the Save event of the dictionary.
@@ -144,11 +144,6 @@ export declare class PdfReferenceHolder implements IPdfPrimitive, IPdfWrapper {
144
144
  * @private
145
145
  */
146
146
  private objectIndex;
147
- /**
148
- * @hidden
149
- * @private
150
- */
151
- private dictionaryProperties;
152
147
  /**
153
148
  * Gets or sets the `Status` of the specified object.
154
149
  * @private
@@ -1,4 +1,3 @@
1
- import { DictionaryProperties } from './../input-output/pdf-dictionary-properties';
2
1
  import { PdfStream } from './../primitives/pdf-stream';
3
2
  import { PdfArray } from './../primitives/pdf-array';
4
3
  import { PdfNumber } from './../primitives/pdf-number';
@@ -163,11 +162,6 @@ var PdfReferenceHolder = /** @class */ (function () {
163
162
  * @private
164
163
  */
165
164
  this.objectIndex = -1;
166
- /**
167
- * @hidden
168
- * @private
169
- */
170
- this.dictionaryProperties = new DictionaryProperties();
171
165
  // if (typeof obj2 === 'undefined') {
172
166
  this.initialize(obj1);
173
167
  // }
@@ -370,7 +364,7 @@ var PdfReferenceHolder = /** @class */ (function () {
370
364
  */
371
365
  // if (Object instanceof PdfDictionary) {
372
366
  // // Meaning the referenced page is not available for import.
373
- // let type : PdfName = new PdfName(this.dictionaryProperties.type);
367
+ // let type : PdfName = new PdfName('Type');
374
368
  // let dict : PdfDictionary = Object as PdfDictionary;
375
369
  // if (dict.ContainsKey(type)) {
376
370
  // let pageName : PdfName = dict.Items.getValue(type.Value) as PdfName;
@@ -112,8 +112,8 @@ var PdfStream = /** @class */ (function (_super) {
112
112
  */
113
113
  PdfStream.prototype.clearStream = function () {
114
114
  this.internalStream = [];
115
- if (this.items.containsKey(this.dictionaryProperties.filter)) {
116
- this.remove(this.dictionaryProperties.filter);
115
+ if (this.items.containsKey('Filter')) {
116
+ this.remove('Filter');
117
117
  }
118
118
  this.bCompress = true;
119
119
  this.modify();
@@ -180,7 +180,7 @@ var PdfStream = /** @class */ (function (_super) {
180
180
  sw.write(dataArray, 0, dataArray.length);
181
181
  sw.close();
182
182
  data = sw.getCompressedString;
183
- this.addFilter(this.dictionaryProperties.flatedecode);
183
+ this.addFilter('FlateDecode');
184
184
  }
185
185
  return data;
186
186
  };
@@ -189,7 +189,7 @@ var PdfStream = /** @class */ (function (_super) {
189
189
  * @private
190
190
  */
191
191
  PdfStream.prototype.addFilter = function (filterName) {
192
- var obj = this.items.getValue(this.dictionaryProperties.filter);
192
+ var obj = this.items.getValue('Filter');
193
193
  if (obj instanceof PdfReferenceHolder) {
194
194
  var rh = obj;
195
195
  obj = rh.object;
@@ -199,11 +199,11 @@ var PdfStream = /** @class */ (function (_super) {
199
199
  if (name != null) {
200
200
  array = new PdfArray();
201
201
  array.insert(0, name);
202
- this.items.setValue(this.dictionaryProperties.filter, array);
202
+ this.items.setValue('Filter', array);
203
203
  }
204
204
  name = new PdfName(filterName);
205
205
  if (array == null) {
206
- this.items.setValue(this.dictionaryProperties.filter, name);
206
+ this.items.setValue('Filter', name);
207
207
  }
208
208
  else {
209
209
  array.insert(0, name);
@@ -229,7 +229,7 @@ var PdfStream = /** @class */ (function (_super) {
229
229
  }
230
230
  data = this.compressContent(data, writer);
231
231
  var length = data.length;
232
- this.items.setValue(this.dictionaryProperties.length, new PdfNumber(length));
232
+ this.items.setValue('Length', new PdfNumber(length));
233
233
  _super.prototype.save.call(this, writer, false);
234
234
  writer.write(this.dicPrefix);
235
235
  writer.write(Operators.newLine);