@syncfusion/ej2-pdf-export 24.1.41 → 24.2.3

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 (164) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/ej2-pdf-export.min.js +2 -2
  3. package/dist/ej2-pdf-export.umd.min.js +2 -2
  4. package/dist/ej2-pdf-export.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-pdf-export.es2015.js +157 -28
  6. package/dist/es6/ej2-pdf-export.es2015.js.map +1 -1
  7. package/dist/es6/ej2-pdf-export.es5.js +157 -28
  8. package/dist/es6/ej2-pdf-export.es5.js.map +1 -1
  9. package/dist/global/ej2-pdf-export.min.js +2 -2
  10. package/dist/global/ej2-pdf-export.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +6 -6
  13. package/src/implementation/graphics/pdf-graphics.d.ts +35 -0
  14. package/src/implementation/graphics/pdf-graphics.js +157 -29
  15. package/dist/ts/implementation/actions/action.ts +0 -76
  16. package/dist/ts/implementation/actions/uri-action.ts +0 -52
  17. package/dist/ts/implementation/annotations/action-link-annotation.ts +0 -43
  18. package/dist/ts/implementation/annotations/annotation-collection.ts +0 -159
  19. package/dist/ts/implementation/annotations/annotation.ts +0 -241
  20. package/dist/ts/implementation/annotations/document-link-annotation.ts +0 -118
  21. package/dist/ts/implementation/annotations/link-annotation.ts +0 -32
  22. package/dist/ts/implementation/annotations/pdf-text-web-link.ts +0 -265
  23. package/dist/ts/implementation/annotations/uri-annotation.ts +0 -86
  24. package/dist/ts/implementation/collections/dictionary.ts +0 -150
  25. package/dist/ts/implementation/collections/object-object-pair/dictionary.ts +0 -125
  26. package/dist/ts/implementation/collections/utils.ts +0 -38
  27. package/dist/ts/implementation/document/automatic-fields/automatic-field-info-collection.ts +0 -39
  28. package/dist/ts/implementation/document/automatic-fields/automatic-field-info.ts +0 -108
  29. package/dist/ts/implementation/document/automatic-fields/automatic-field.ts +0 -127
  30. package/dist/ts/implementation/document/automatic-fields/composite-field.ts +0 -76
  31. package/dist/ts/implementation/document/automatic-fields/multiple-value-field.ts +0 -37
  32. package/dist/ts/implementation/document/automatic-fields/page-count-field.ts +0 -75
  33. package/dist/ts/implementation/document/automatic-fields/pdf-numbers-convertor.ts +0 -157
  34. package/dist/ts/implementation/document/automatic-fields/pdf-page-number-field.ts +0 -82
  35. package/dist/ts/implementation/document/automatic-fields/pdf-template-value-pair.ts +0 -60
  36. package/dist/ts/implementation/document/automatic-fields/single-value-field.ts +0 -48
  37. package/dist/ts/implementation/document/pdf-catalog.ts +0 -65
  38. package/dist/ts/implementation/document/pdf-document-base.ts +0 -180
  39. package/dist/ts/implementation/document/pdf-document-template.ts +0 -310
  40. package/dist/ts/implementation/document/pdf-document.ts +0 -342
  41. package/dist/ts/implementation/document/pdf-viewer-preferences.ts +0 -578
  42. package/dist/ts/implementation/drawing/pdf-drawing.ts +0 -218
  43. package/dist/ts/implementation/general/enum.ts +0 -21
  44. package/dist/ts/implementation/general/functions/pdf-function.ts +0 -66
  45. package/dist/ts/implementation/general/functions/pdf-sampled-function.ts +0 -63
  46. package/dist/ts/implementation/general/pdf-cache-collection.ts +0 -97
  47. package/dist/ts/implementation/general/pdf-collection.ts +0 -41
  48. package/dist/ts/implementation/general/pdf-destination.ts +0 -170
  49. package/dist/ts/implementation/graphics/brushes/enum.ts +0 -237
  50. package/dist/ts/implementation/graphics/brushes/pdf-blend.ts +0 -294
  51. package/dist/ts/implementation/graphics/brushes/pdf-brush.ts +0 -68
  52. package/dist/ts/implementation/graphics/brushes/pdf-brushes.ts +0 -2438
  53. package/dist/ts/implementation/graphics/brushes/pdf-color-blend.ts +0 -295
  54. package/dist/ts/implementation/graphics/brushes/pdf-gradient-brush.ts +0 -311
  55. package/dist/ts/implementation/graphics/brushes/pdf-linear-gradient-brush.ts +0 -406
  56. package/dist/ts/implementation/graphics/brushes/pdf-radial-gradient-brush.ts +0 -290
  57. package/dist/ts/implementation/graphics/brushes/pdf-solid-brush.ts +0 -107
  58. package/dist/ts/implementation/graphics/brushes/pdf-tiling-brush.ts +0 -304
  59. package/dist/ts/implementation/graphics/constants.ts +0 -31
  60. package/dist/ts/implementation/graphics/enum.ts +0 -413
  61. package/dist/ts/implementation/graphics/figures/arc.ts +0 -133
  62. package/dist/ts/implementation/graphics/figures/base/draw-element.ts +0 -59
  63. package/dist/ts/implementation/graphics/figures/base/element-layouter.ts +0 -260
  64. package/dist/ts/implementation/graphics/figures/base/fill-element.ts +0 -72
  65. package/dist/ts/implementation/graphics/figures/base/graphics-element.ts +0 -34
  66. package/dist/ts/implementation/graphics/figures/base/pdf-shape-element.ts +0 -69
  67. package/dist/ts/implementation/graphics/figures/base/shape-layouter.ts +0 -276
  68. package/dist/ts/implementation/graphics/figures/base/text-layouter.ts +0 -205
  69. package/dist/ts/implementation/graphics/figures/ellipse-part.ts +0 -76
  70. package/dist/ts/implementation/graphics/figures/enum.ts +0 -80
  71. package/dist/ts/implementation/graphics/figures/layout-element.ts +0 -132
  72. package/dist/ts/implementation/graphics/figures/path.ts +0 -646
  73. package/dist/ts/implementation/graphics/figures/pdf-template.ts +0 -205
  74. package/dist/ts/implementation/graphics/figures/rectangle-area.ts +0 -108
  75. package/dist/ts/implementation/graphics/figures/text-element.ts +0 -445
  76. package/dist/ts/implementation/graphics/fonts/enum.ts +0 -385
  77. package/dist/ts/implementation/graphics/fonts/pdf-font-metrics.ts +0 -248
  78. package/dist/ts/implementation/graphics/fonts/pdf-font.ts +0 -316
  79. package/dist/ts/implementation/graphics/fonts/pdf-standard-font-metrics-factory.ts +0 -606
  80. package/dist/ts/implementation/graphics/fonts/pdf-standard-font.ts +0 -243
  81. package/dist/ts/implementation/graphics/fonts/pdf-string-format.ts +0 -474
  82. package/dist/ts/implementation/graphics/fonts/pdf-true-type-font.ts +0 -165
  83. package/dist/ts/implementation/graphics/fonts/rtl/rtl-bidirectional.ts +0 -958
  84. package/dist/ts/implementation/graphics/fonts/rtl/rtl-text-shape.ts +0 -374
  85. package/dist/ts/implementation/graphics/fonts/rtl-renderer.ts +0 -255
  86. package/dist/ts/implementation/graphics/fonts/string-layouter.ts +0 -617
  87. package/dist/ts/implementation/graphics/fonts/string-tokenizer.ts +0 -275
  88. package/dist/ts/implementation/graphics/fonts/ttf-OS2-Table.ts +0 -206
  89. package/dist/ts/implementation/graphics/fonts/ttf-apple-cmap-sub-table.ts +0 -18
  90. package/dist/ts/implementation/graphics/fonts/ttf-cmap-sub-table.ts +0 -18
  91. package/dist/ts/implementation/graphics/fonts/ttf-cmap-table.ts +0 -14
  92. package/dist/ts/implementation/graphics/fonts/ttf-glyph-header.ts +0 -26
  93. package/dist/ts/implementation/graphics/fonts/ttf-glyph-info.ts +0 -35
  94. package/dist/ts/implementation/graphics/fonts/ttf-head-table.ts +0 -94
  95. package/dist/ts/implementation/graphics/fonts/ttf-horizontal-header-table.ts +0 -56
  96. package/dist/ts/implementation/graphics/fonts/ttf-loca-table.ts +0 -10
  97. package/dist/ts/implementation/graphics/fonts/ttf-long-hor-metric.ts +0 -14
  98. package/dist/ts/implementation/graphics/fonts/ttf-metrics.ts +0 -106
  99. package/dist/ts/implementation/graphics/fonts/ttf-microsoft-cmap-sub-table.ts +0 -58
  100. package/dist/ts/implementation/graphics/fonts/ttf-name-record.ts +0 -33
  101. package/dist/ts/implementation/graphics/fonts/ttf-name-table.ts +0 -22
  102. package/dist/ts/implementation/graphics/fonts/ttf-post-table.ts +0 -42
  103. package/dist/ts/implementation/graphics/fonts/ttf-reader.ts +0 -1254
  104. package/dist/ts/implementation/graphics/fonts/ttf-table-info.ts +0 -26
  105. package/dist/ts/implementation/graphics/fonts/ttf-trimmed-cmap-sub-table.ts +0 -26
  106. package/dist/ts/implementation/graphics/fonts/unicode-true-type-font.ts +0 -577
  107. package/dist/ts/implementation/graphics/images/byte-array.ts +0 -137
  108. package/dist/ts/implementation/graphics/images/image-decoder.ts +0 -439
  109. package/dist/ts/implementation/graphics/images/pdf-bitmap.ts +0 -110
  110. package/dist/ts/implementation/graphics/images/pdf-image.ts +0 -132
  111. package/dist/ts/implementation/graphics/pdf-color.ts +0 -478
  112. package/dist/ts/implementation/graphics/pdf-graphics.ts +0 -2429
  113. package/dist/ts/implementation/graphics/pdf-margins.ts +0 -124
  114. package/dist/ts/implementation/graphics/pdf-pen.ts +0 -370
  115. package/dist/ts/implementation/graphics/pdf-resources.ts +0 -300
  116. package/dist/ts/implementation/graphics/pdf-transformation-matrix.ts +0 -246
  117. package/dist/ts/implementation/graphics/pdf-transparency.ts +0 -93
  118. package/dist/ts/implementation/graphics/unit-convertor.ts +0 -96
  119. package/dist/ts/implementation/input-output/big-endian-writer.ts +0 -121
  120. package/dist/ts/implementation/input-output/cross-table.ts +0 -21
  121. package/dist/ts/implementation/input-output/enum.ts +0 -16
  122. package/dist/ts/implementation/input-output/pdf-cross-table.ts +0 -524
  123. package/dist/ts/implementation/input-output/pdf-dictionary-properties.ts +0 -571
  124. package/dist/ts/implementation/input-output/pdf-main-object-collection.ts +0 -194
  125. package/dist/ts/implementation/input-output/pdf-operators.ts +0 -363
  126. package/dist/ts/implementation/input-output/pdf-stream-writer.ts +0 -681
  127. package/dist/ts/implementation/input-output/pdf-writer.ts +0 -88
  128. package/dist/ts/implementation/pages/enum.ts +0 -201
  129. package/dist/ts/implementation/pages/page-added-event-arguments.ts +0 -39
  130. package/dist/ts/implementation/pages/pdf-document-page-collection.ts +0 -180
  131. package/dist/ts/implementation/pages/pdf-page-base.ts +0 -181
  132. package/dist/ts/implementation/pages/pdf-page-layer-collection.ts +0 -348
  133. package/dist/ts/implementation/pages/pdf-page-layer.ts +0 -271
  134. package/dist/ts/implementation/pages/pdf-page-settings.ts +0 -192
  135. package/dist/ts/implementation/pages/pdf-page-size.ts +0 -162
  136. package/dist/ts/implementation/pages/pdf-page-template-element.ts +0 -663
  137. package/dist/ts/implementation/pages/pdf-page.ts +0 -235
  138. package/dist/ts/implementation/pages/pdf-section-collection.ts +0 -187
  139. package/dist/ts/implementation/pages/pdf-section-page-collection.ts +0 -61
  140. package/dist/ts/implementation/pages/pdf-section-templates.ts +0 -96
  141. package/dist/ts/implementation/pages/pdf-section.ts +0 -644
  142. package/dist/ts/implementation/primitives/pdf-array.ts +0 -386
  143. package/dist/ts/implementation/primitives/pdf-boolean.ts +0 -119
  144. package/dist/ts/implementation/primitives/pdf-dictionary.ts +0 -513
  145. package/dist/ts/implementation/primitives/pdf-name.ts +0 -218
  146. package/dist/ts/implementation/primitives/pdf-number.ts +0 -165
  147. package/dist/ts/implementation/primitives/pdf-reference.ts +0 -430
  148. package/dist/ts/implementation/primitives/pdf-stream.ts +0 -306
  149. package/dist/ts/implementation/primitives/pdf-string.ts +0 -397
  150. package/dist/ts/implementation/structured-elements/grid/layout/grid-layouter.ts +0 -2027
  151. package/dist/ts/implementation/structured-elements/grid/pdf-grid-cell.ts +0 -1193
  152. package/dist/ts/implementation/structured-elements/grid/pdf-grid-column.ts +0 -206
  153. package/dist/ts/implementation/structured-elements/grid/pdf-grid-row.ts +0 -470
  154. package/dist/ts/implementation/structured-elements/grid/pdf-grid.ts +0 -853
  155. package/dist/ts/implementation/structured-elements/grid/styles/pdf-borders.ts +0 -240
  156. package/dist/ts/implementation/structured-elements/grid/styles/style.ts +0 -424
  157. package/dist/ts/implementation/structured-elements/tables/light-tables/enum.ts +0 -16
  158. package/dist/ts/interfaces/i-pdf-cache.ts +0 -23
  159. package/dist/ts/interfaces/i-pdf-changable.ts +0 -17
  160. package/dist/ts/interfaces/i-pdf-clonable.ts +0 -12
  161. package/dist/ts/interfaces/i-pdf-primitives.ts +0 -45
  162. package/dist/ts/interfaces/i-pdf-true-type-font.ts +0 -48
  163. package/dist/ts/interfaces/i-pdf-wrapper.ts +0 -13
  164. package/dist/ts/interfaces/i-pdf-writer.ts +0 -29
@@ -16808,7 +16808,6 @@ var PdfGraphics = /** @__PURE__ @class */ (function () {
16808
16808
  this.getResources.getResources().requireProcedureSet(this.procedureSets.text);
16809
16809
  }
16810
16810
  };
16811
- /* tslint:disable */
16812
16811
  /**
16813
16812
  * @public
16814
16813
  */
@@ -16846,7 +16845,7 @@ var PdfGraphics = /** @__PURE__ @class */ (function () {
16846
16845
  this.pdfStringLayoutResult = result;
16847
16846
  this.isUseFontSize = false;
16848
16847
  }
16849
- }; /* tslint:enable */
16848
+ };
16850
16849
  PdfGraphics.prototype.drawLine = function (arg1, arg2, arg3, arg4, arg5) {
16851
16850
  if (arg2 instanceof PointF) {
16852
16851
  var temparg2 = arg2;
@@ -16866,7 +16865,6 @@ var PdfGraphics = /** @__PURE__ @class */ (function () {
16866
16865
  this.getResources.getResources().requireProcedureSet(this.procedureSets.pdf);
16867
16866
  }
16868
16867
  };
16869
- /* tslint:disable */
16870
16868
  PdfGraphics.prototype.drawRectangle = function (arg1, arg2, arg3, arg4, arg5, arg6) {
16871
16869
  if (arg1 instanceof PdfPen && typeof arg2 === 'number') {
16872
16870
  var temparg3 = arg3;
@@ -16907,6 +16905,152 @@ var PdfGraphics = /** @__PURE__ @class */ (function () {
16907
16905
  this.drawPathHelper(temparg1, temparg2, false);
16908
16906
  }
16909
16907
  };
16908
+ /**
16909
+ * Draw rounded rectangle specified by a brush, pen, coordinate pair, a width, a height and a radius.
16910
+ * ```typescript
16911
+ * // Create a new PDF document.
16912
+ * let document : PdfDocument = new PdfDocument();
16913
+ * // Create a new page
16914
+ * let page : PdfPage = document.pages.add();
16915
+ * // Create brush for draw rectangle
16916
+ * let brush : PdfSolidBrush = new PdfSolidBrush(new PdfColor(238, 130, 238));
16917
+ * // Create a new PDF pen
16918
+ * let pen: PdfPen = new PdfPen(new PdfColor(255, 0, 0), 1);
16919
+ * // Draw rounded rectangle
16920
+ * page.graphics.drawRoundedRectangle(pen, brush, 20, 20, 100, 50, 5);
16921
+ * // save the document
16922
+ * document.save('output.pdf');
16923
+ * // destroy the document
16924
+ * document.destroy();
16925
+ * ```
16926
+ * @param pen Stoke color of the rectangle.
16927
+ * @param brush Fill color of the rectangle.
16928
+ * @param x The x-coordinate of the upper-left corner of the rectangle to draw.
16929
+ * @param y The y-coordinate of the upper-left corner of the rectangle to draw.
16930
+ * @param width Width of the rectangle to draw.
16931
+ * @param height Height of the rectangle to draw.
16932
+ * @param radius Radius of the arcs to draw.
16933
+ */
16934
+ PdfGraphics.prototype.drawRoundedRectangle = function (pen, brush, x, y, width, height, radius) {
16935
+ if (pen === null) {
16936
+ throw new Error('pen');
16937
+ }
16938
+ if (brush === null) {
16939
+ throw new Error('brush');
16940
+ }
16941
+ if (radius === 0) {
16942
+ this.drawRectangle(pen, brush, x, y, width, height);
16943
+ }
16944
+ else {
16945
+ var bounds = [x, y, width, height];
16946
+ var diameter = radius * 2;
16947
+ var size = [diameter, diameter];
16948
+ var arc = [bounds[0], bounds[1], size[0], size[1]];
16949
+ this._pathPoints = [];
16950
+ this._pathTypes = [];
16951
+ var startFigure = true;
16952
+ startFigure = this._addArc(arc[0], arc[1], arc[2], arc[3], 180, 90, startFigure);
16953
+ arc[0] = (bounds[0] + bounds[2]) - diameter;
16954
+ startFigure = this._addArc(arc[0], arc[1], arc[2], arc[3], 270, 90, startFigure);
16955
+ arc[1] = (bounds[1] + bounds[3]) - diameter;
16956
+ startFigure = this._addArc(arc[0], arc[1], arc[2], arc[3], 0, 90, startFigure);
16957
+ arc[0] = bounds[0];
16958
+ startFigure = this._addArc(arc[0], arc[1], arc[2], arc[3], 90, 90, startFigure);
16959
+ var index = this._pathPoints.length - 1;
16960
+ var type = ((this._pathTypes[index]));
16961
+ type = (type | PathPointType.CloseSubpath);
16962
+ this._pathTypes[index] = (type);
16963
+ this._drawPath(pen, brush, this._pathPoints, this._pathTypes, PdfFillMode.Alternate);
16964
+ this._pathPoints = [];
16965
+ this._pathTypes = [];
16966
+ }
16967
+ };
16968
+ PdfGraphics.prototype._addArc = function (x, y, width, height, startAngle, sweepAngle, startFigure) {
16969
+ var points = this._getBezierArcPoints(x, y, (x + width), (y + height), startAngle, sweepAngle);
16970
+ for (var i = 0; i < points.length; i = i + 8) {
16971
+ var point = [points[i], points[i + 1], points[i + 2], points[i + 3], points[i + 4], points[i + 5], points[i + 6], points[i + 7]];
16972
+ startFigure = this._addArcPoints(point, PathPointType.Bezier3, startFigure);
16973
+ }
16974
+ return startFigure;
16975
+ };
16976
+ PdfGraphics.prototype._addArcPoints = function (points, pointType, startFigure) {
16977
+ for (var i = 0; i < points.length; i++) {
16978
+ var point = new PointF(points[i], points[(i + 1)]);
16979
+ if (i === 0) {
16980
+ if (this._pathPoints.length === 0 || startFigure) {
16981
+ this._addPoint(point, PathPointType.Start);
16982
+ startFigure = false;
16983
+ }
16984
+ else if (point.x !== this._getLastPoint().x || point.y !== this._getLastPoint().y) {
16985
+ this._addPoint(point, PathPointType.Line);
16986
+ }
16987
+ }
16988
+ else {
16989
+ this._addPoint(point, pointType);
16990
+ }
16991
+ i++;
16992
+ }
16993
+ return startFigure;
16994
+ };
16995
+ PdfGraphics.prototype._getLastPoint = function () {
16996
+ var lastPoint = new PointF(0, 0);
16997
+ var count = this._pathPoints.length;
16998
+ if (count > 0) {
16999
+ lastPoint.x = this._pathPoints[(count - 1)].x;
17000
+ lastPoint.y = this._pathPoints[(count - 1)].y;
17001
+ }
17002
+ return lastPoint;
17003
+ };
17004
+ PdfGraphics.prototype._addPoint = function (point, type) {
17005
+ this._pathPoints.push(point);
17006
+ this._pathTypes.push(type);
17007
+ };
17008
+ PdfGraphics.prototype._getBezierArcPoints = function (x1, y1, x2, y2, s1, e1) {
17009
+ if ((x1 > x2)) {
17010
+ var tmp = void 0;
17011
+ tmp = x1;
17012
+ x1 = x2;
17013
+ x2 = tmp;
17014
+ }
17015
+ if ((y2 > y1)) {
17016
+ var tmp = void 0;
17017
+ tmp = y1;
17018
+ y1 = y2;
17019
+ y2 = tmp;
17020
+ }
17021
+ var fragAngle;
17022
+ var numFragments;
17023
+ if ((Math.abs(e1) <= 90)) {
17024
+ fragAngle = e1;
17025
+ numFragments = 1;
17026
+ }
17027
+ else {
17028
+ numFragments = (Math.ceil((Math.abs(e1) / 90)));
17029
+ fragAngle = (e1 / numFragments);
17030
+ }
17031
+ var xcen = ((x1 + x2) / 2);
17032
+ var ycen = ((y1 + y2) / 2);
17033
+ var rx = ((x2 - x1) / 2);
17034
+ var ry = ((y2 - y1) / 2);
17035
+ var halfAng = ((fragAngle * (Math.PI / 360)));
17036
+ var kappa = (Math.abs(4.0 / 3.0 * (1.0 - Math.cos(halfAng)) / Math.sin(halfAng)));
17037
+ var pointList = [];
17038
+ for (var i = 0; (i < numFragments); i++) {
17039
+ var theta0 = (((s1 + (i * fragAngle)) * (Math.PI / 180)));
17040
+ var theta1 = (((s1 + ((i + 1) * fragAngle)) * (Math.PI / 180)));
17041
+ var cos0 = (Math.cos(theta0));
17042
+ var cos1 = (Math.cos(theta1));
17043
+ var sin0 = (Math.sin(theta0));
17044
+ var sin1 = (Math.sin(theta1));
17045
+ if ((fragAngle > 0)) {
17046
+ pointList.push((xcen + (rx * cos0)), (ycen - (ry * sin0)), (xcen + (rx * (cos0 - (kappa * sin0)))), (ycen - (ry * (sin0 + (kappa * cos0)))), (xcen + (rx * (cos1 + (kappa * sin1)))), (ycen - (ry * (sin1 - (kappa * cos1)))), (xcen + (rx * cos1)), (ycen - (ry * sin1)));
17047
+ }
17048
+ else {
17049
+ pointList.push((xcen + (rx * cos0)), (ycen - (ry * sin0)), (xcen + (rx * (cos0 + (kappa * sin0)))), (ycen - (ry * (sin0 - (kappa * cos0)))), (xcen + (rx * (cos1 - (kappa * sin1)))), (ycen - (ry * (sin1 + (kappa * cos1)))), (xcen + (rx * cos1)), (ycen - (ry * sin1)));
17050
+ }
17051
+ }
17052
+ return pointList;
17053
+ };
16910
17054
  PdfGraphics.prototype.drawPathHelper = function (arg1, arg2, arg3, arg4) {
16911
17055
  if (typeof arg3 === 'boolean') {
16912
17056
  var temparg3 = arg3;
@@ -16931,7 +17075,6 @@ var PdfGraphics = /** @__PURE__ @class */ (function () {
16931
17075
  }
16932
17076
  }
16933
17077
  };
16934
- /* tslint:disable */
16935
17078
  PdfGraphics.prototype.drawImage = function (arg1, arg2, arg3, arg4, arg5) {
16936
17079
  if (typeof arg2 === 'number' && typeof arg3 === 'number' && typeof arg4 === 'undefined') {
16937
17080
  var size = arg1.physicalDimension;
@@ -16967,7 +17110,6 @@ var PdfGraphics = /** @__PURE__ @class */ (function () {
16967
17110
  }
16968
17111
  };
16969
17112
  //Implementation
16970
- /* tslint:disable */
16971
17113
  /**
16972
17114
  * Returns `bounds` of the line info.
16973
17115
  * @private
@@ -16983,8 +17125,7 @@ var PdfGraphics = /** @__PURE__ @class */ (function () {
16983
17125
  var lineIndent = this.getLineIndent(line, format, layoutRectangle, (lineIndex === 0));
16984
17126
  hShift += (!this.rightToLeft(format)) ? lineIndent : 0;
16985
17127
  var x = layoutRectangle.x + hShift;
16986
- /* tslint:disable */
16987
- var width = (!this.shouldJustify(line, layoutRectangle.width, format)) ? lineWidth - lineIndent : layoutRectangle.width - lineIndent; /* tslint:enable */
17128
+ var width = (!this.shouldJustify(line, layoutRectangle.width, format)) ? lineWidth - lineIndent : layoutRectangle.width - lineIndent;
16988
17129
  var height = result.lineHeight;
16989
17130
  bounds = new RectangleF(x, y, width, height);
16990
17131
  }
@@ -17034,7 +17175,6 @@ var PdfGraphics = /** @__PURE__ @class */ (function () {
17034
17175
  * Adding page number field before page saving.
17035
17176
  * @private
17036
17177
  */
17037
- /* tslint:disable */
17038
17178
  PdfGraphics.prototype.pageSave = function (page) {
17039
17179
  if (page.graphics.automaticFields != null) {
17040
17180
  for (var i = 0; i < page.graphics.automaticFields.automaticFields.length; i++) {
@@ -17166,7 +17306,6 @@ var PdfGraphics = /** @__PURE__ @class */ (function () {
17166
17306
  }
17167
17307
  return shift;
17168
17308
  };
17169
- /* tslint:disable */
17170
17309
  /**
17171
17310
  * `Draws layout result`.
17172
17311
  * @private
@@ -17293,9 +17432,7 @@ var PdfGraphics = /** @__PURE__ @class */ (function () {
17293
17432
  /**
17294
17433
  * Draws array of unicode tokens.
17295
17434
  */
17296
- /* tslint:disable */
17297
17435
  PdfGraphics.prototype.drawUnicodeBlocks = function (blocks, words, font, format, wordSpacing) {
17298
- /* tslint:enable */
17299
17436
  if (blocks == null) {
17300
17437
  throw new Error('Argument Null Exception : blocks');
17301
17438
  }
@@ -17455,11 +17592,9 @@ var PdfGraphics = /** @__PURE__ @class */ (function () {
17455
17592
  var whitespacesCount = StringTokenizer.getCharsCount(line, symbols);
17456
17593
  var hasSpaces = (whitespacesCount > 0 && line[0] !== StringTokenizer.whiteSpace);
17457
17594
  var goodLineBreakStyle = ((lineInfo.lineType & LineType.LayoutBreak) > 0);
17458
- /* tslint:disable */
17459
- var shouldJustify = (justifyStyle && goodWidth && hasSpaces && (goodLineBreakStyle || format.alignment === PdfTextAlignment.Justify)); /* tslint:enable */
17595
+ var shouldJustify = (justifyStyle && goodWidth && hasSpaces && (goodLineBreakStyle || format.alignment === PdfTextAlignment.Justify));
17460
17596
  return shouldJustify;
17461
17597
  };
17462
- /* tslint:disable */
17463
17598
  /**
17464
17599
  * Emulates `Underline, Strikeout` of the text if needed.
17465
17600
  * @private
@@ -17484,9 +17619,7 @@ var PdfGraphics = /** @__PURE__ @class */ (function () {
17484
17619
  var lineIndent = this.getLineIndent(lineInfo, format, layoutRectangle, (i === 0));
17485
17620
  hShift += (!this.rightToLeft(format)) ? lineIndent : 0;
17486
17621
  var x1 = layoutRectangle.x + hShift;
17487
- /* tslint:disable */
17488
17622
  var x2 = (!this.shouldJustify(lineInfo, layoutRectangle.width, format)) ? x1 + lineWidth - lineIndent : x1 + layoutRectangle.width - lineIndent;
17489
- /* tslint:enable */
17490
17623
  if (font.underline) {
17491
17624
  var y = underlineYOffset;
17492
17625
  this.drawLine(linePen, x1, y, x2, y);
@@ -17615,7 +17748,6 @@ var PdfGraphics = /** @__PURE__ @class */ (function () {
17615
17748
  }
17616
17749
  else if (pen != null) {
17617
17750
  if (typeof this.pageLayer !== 'undefined' && this.pageLayer != null) {
17618
- /* tslint:disable */
17619
17751
  this.colorSpace = this.pageLayer.page.document.colorSpace;
17620
17752
  this.currentColorSpace = this.pageLayer.page.document.colorSpace;
17621
17753
  }
@@ -17652,9 +17784,7 @@ var PdfGraphics = /** @__PURE__ @class */ (function () {
17652
17784
  PdfGraphics.prototype.penControl = function (pen, saveState) {
17653
17785
  if (pen != null) {
17654
17786
  this.currentPen = pen;
17655
- /* tslint:disable */
17656
17787
  pen.monitorChanges(this.currentPen, this.pdfStreamWriter, this.getResources, saveState, this.colorSpace, this.matrix.clone());
17657
- /* tslint:enable */
17658
17788
  this.currentPen = pen.clone();
17659
17789
  }
17660
17790
  };
@@ -17677,7 +17807,6 @@ var PdfGraphics = /** @__PURE__ @class */ (function () {
17677
17807
  }
17678
17808
  this.currentBrush = lgb;
17679
17809
  b.monitorChanges(this.currentBrush, this.pdfStreamWriter, this.getResources, saveState, this.colorSpace);
17680
- /* tslint:enable */
17681
17810
  this.currentBrush = brush;
17682
17811
  brush = null;
17683
17812
  }
@@ -17689,14 +17818,12 @@ var PdfGraphics = /** @__PURE__ @class */ (function () {
17689
17818
  PdfGraphics.prototype.fontControl = function (font, format, saveState) {
17690
17819
  if (font != null) {
17691
17820
  var curSubSuper = (format != null) ? format.subSuperScript : PdfSubSuperScript.None;
17692
- /* tslint:disable */
17693
- var prevSubSuper = (this.currentStringFormat != null) ? this.currentStringFormat.subSuperScript : PdfSubSuperScript.None; /* tslint:enable */
17821
+ var prevSubSuper = (this.currentStringFormat != null) ? this.currentStringFormat.subSuperScript : PdfSubSuperScript.None;
17694
17822
  if (saveState || font !== this.currentFont || curSubSuper !== prevSubSuper) {
17695
17823
  var resources = this.getResources.getResources();
17696
17824
  this.currentFont = font;
17697
17825
  this.currentStringFormat = format;
17698
17826
  var size = font.metrics.getSize(format);
17699
- /* tslint:disable */
17700
17827
  this.isEmfTextScaled = false;
17701
17828
  var fontName = resources.getName(font);
17702
17829
  this.pdfStreamWriter.setFont(font, fontName, size);
@@ -17795,7 +17922,6 @@ var PdfGraphics = /** @__PURE__ @class */ (function () {
17795
17922
  input.translate(x, this.updateY(y));
17796
17923
  return input;
17797
17924
  };
17798
- /* tslint:disable */
17799
17925
  /**
17800
17926
  * Applies the specified `scaling operation` to the transformation matrix of this Graphics by prepending it to the object's transformation matrix.
17801
17927
  * ```typescript
@@ -17819,7 +17945,6 @@ var PdfGraphics = /** @__PURE__ @class */ (function () {
17819
17945
  * @param scaleX Scale factor in the x direction.
17820
17946
  * @param scaleY Scale factor in the y direction.
17821
17947
  */
17822
- /* tslint:enable */
17823
17948
  PdfGraphics.prototype.scaleTransform = function (scaleX, scaleY) {
17824
17949
  var matrix = new PdfTransformationMatrix();
17825
17950
  this.getScaleTransform(scaleX, scaleY, matrix);
@@ -17971,7 +18096,6 @@ var PdfGraphics = /** @__PURE__ @class */ (function () {
17971
18096
  this.pdfStreamWriter.restoreGraphicsState();
17972
18097
  return state;
17973
18098
  };
17974
- /* tslint:enable */
17975
18099
  /**
17976
18100
  * `Draws the specified path`, using its original physical size, at the location specified by a coordinate pair.
17977
18101
  * ```typescript
@@ -18002,6 +18126,9 @@ var PdfGraphics = /** @__PURE__ @class */ (function () {
18002
18126
  * @param path Draw path.
18003
18127
  */
18004
18128
  PdfGraphics.prototype.drawPath = function (pen, brush, path) {
18129
+ this._drawPath(pen, brush, path.pathPoints, path.pathTypes, path.fillMode);
18130
+ };
18131
+ PdfGraphics.prototype._drawPath = function (pen, brush, pathPoints, pathTypes, fillMode) {
18005
18132
  if (brush instanceof PdfTilingBrush) {
18006
18133
  this.bCSInitialized = false;
18007
18134
  brush.graphics.colorSpace = this.colorSpace;
@@ -18011,8 +18138,8 @@ var PdfGraphics = /** @__PURE__ @class */ (function () {
18011
18138
  brush.colorSpace = this.colorSpace;
18012
18139
  }
18013
18140
  this.stateControl(pen, brush, null);
18014
- this.buildUpPath(path.pathPoints, path.pathTypes);
18015
- this.drawPathHelper(pen, brush, path.fillMode, false);
18141
+ this.buildUpPath(pathPoints, pathTypes);
18142
+ this.drawPathHelper(pen, brush, fillMode, false);
18016
18143
  };
18017
18144
  /* tslint:disable-next-line:max-line-length */
18018
18145
  PdfGraphics.prototype.drawArc = function (arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
@@ -18157,6 +18284,7 @@ var PdfGraphics = /** @__PURE__ @class */ (function () {
18157
18284
  }
18158
18285
  return pointsList;
18159
18286
  };
18287
+ /* tslint:disable */
18160
18288
  // Constants
18161
18289
  /**
18162
18290
  * Specifies the mask of `path type values`.
@@ -18386,6 +18514,7 @@ var TransparencyData = /** @__PURE__ @class */ (function () {
18386
18514
  }
18387
18515
  return TransparencyData;
18388
18516
  }());
18517
+ /* tslint:enable */
18389
18518
 
18390
18519
  /**
18391
18520
  * The `PdfPageLayer` used to create layers in PDF document.