@syncfusion/ej2-pdf-export 24.1.41 → 24.1.47

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 +8 -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 +5 -5
  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
@@ -15470,7 +15470,6 @@ class PdfGraphics {
15470
15470
  this.getResources.getResources().requireProcedureSet(this.procedureSets.text);
15471
15471
  }
15472
15472
  }
15473
- /* tslint:disable */
15474
15473
  /**
15475
15474
  * @public
15476
15475
  */
@@ -15508,7 +15507,7 @@ class PdfGraphics {
15508
15507
  this.pdfStringLayoutResult = result;
15509
15508
  this.isUseFontSize = false;
15510
15509
  }
15511
- } /* tslint:enable */
15510
+ }
15512
15511
  drawLine(arg1, arg2, arg3, arg4, arg5) {
15513
15512
  if (arg2 instanceof PointF) {
15514
15513
  let temparg2 = arg2;
@@ -15528,7 +15527,6 @@ class PdfGraphics {
15528
15527
  this.getResources.getResources().requireProcedureSet(this.procedureSets.pdf);
15529
15528
  }
15530
15529
  }
15531
- /* tslint:disable */
15532
15530
  drawRectangle(arg1, arg2, arg3, arg4, arg5, arg6) {
15533
15531
  if (arg1 instanceof PdfPen && typeof arg2 === 'number') {
15534
15532
  let temparg3 = arg3;
@@ -15569,6 +15567,152 @@ class PdfGraphics {
15569
15567
  this.drawPathHelper(temparg1, temparg2, false);
15570
15568
  }
15571
15569
  }
15570
+ /**
15571
+ * Draw rounded rectangle specified by a brush, pen, coordinate pair, a width, a height and a radius.
15572
+ * ```typescript
15573
+ * // Create a new PDF document.
15574
+ * let document : PdfDocument = new PdfDocument();
15575
+ * // Create a new page
15576
+ * let page : PdfPage = document.pages.add();
15577
+ * // Create brush for draw rectangle
15578
+ * let brush : PdfSolidBrush = new PdfSolidBrush(new PdfColor(238, 130, 238));
15579
+ * // Create a new PDF pen
15580
+ * let pen: PdfPen = new PdfPen(new PdfColor(255, 0, 0), 1);
15581
+ * // Draw rounded rectangle
15582
+ * page.graphics.drawRoundedRectangle(pen, brush, 20, 20, 100, 50, 5);
15583
+ * // save the document
15584
+ * document.save('output.pdf');
15585
+ * // destroy the document
15586
+ * document.destroy();
15587
+ * ```
15588
+ * @param pen Stoke color of the rectangle.
15589
+ * @param brush Fill color of the rectangle.
15590
+ * @param x The x-coordinate of the upper-left corner of the rectangle to draw.
15591
+ * @param y The y-coordinate of the upper-left corner of the rectangle to draw.
15592
+ * @param width Width of the rectangle to draw.
15593
+ * @param height Height of the rectangle to draw.
15594
+ * @param radius Radius of the arcs to draw.
15595
+ */
15596
+ drawRoundedRectangle(pen, brush, x, y, width, height, radius) {
15597
+ if (pen === null) {
15598
+ throw new Error('pen');
15599
+ }
15600
+ if (brush === null) {
15601
+ throw new Error('brush');
15602
+ }
15603
+ if (radius === 0) {
15604
+ this.drawRectangle(pen, brush, x, y, width, height);
15605
+ }
15606
+ else {
15607
+ const bounds = [x, y, width, height];
15608
+ const diameter = radius * 2;
15609
+ const size = [diameter, diameter];
15610
+ const arc = [bounds[0], bounds[1], size[0], size[1]];
15611
+ this._pathPoints = [];
15612
+ this._pathTypes = [];
15613
+ let startFigure = true;
15614
+ startFigure = this._addArc(arc[0], arc[1], arc[2], arc[3], 180, 90, startFigure);
15615
+ arc[0] = (bounds[0] + bounds[2]) - diameter;
15616
+ startFigure = this._addArc(arc[0], arc[1], arc[2], arc[3], 270, 90, startFigure);
15617
+ arc[1] = (bounds[1] + bounds[3]) - diameter;
15618
+ startFigure = this._addArc(arc[0], arc[1], arc[2], arc[3], 0, 90, startFigure);
15619
+ arc[0] = bounds[0];
15620
+ startFigure = this._addArc(arc[0], arc[1], arc[2], arc[3], 90, 90, startFigure);
15621
+ const index = this._pathPoints.length - 1;
15622
+ let type = ((this._pathTypes[index]));
15623
+ type = (type | PathPointType.CloseSubpath);
15624
+ this._pathTypes[index] = (type);
15625
+ this._drawPath(pen, brush, this._pathPoints, this._pathTypes, PdfFillMode.Alternate);
15626
+ this._pathPoints = [];
15627
+ this._pathTypes = [];
15628
+ }
15629
+ }
15630
+ _addArc(x, y, width, height, startAngle, sweepAngle, startFigure) {
15631
+ let points = this._getBezierArcPoints(x, y, (x + width), (y + height), startAngle, sweepAngle);
15632
+ for (let i = 0; i < points.length; i = i + 8) {
15633
+ let point = [points[i], points[i + 1], points[i + 2], points[i + 3], points[i + 4], points[i + 5], points[i + 6], points[i + 7]];
15634
+ startFigure = this._addArcPoints(point, PathPointType.Bezier3, startFigure);
15635
+ }
15636
+ return startFigure;
15637
+ }
15638
+ _addArcPoints(points, pointType, startFigure) {
15639
+ for (let i = 0; i < points.length; i++) {
15640
+ let point = new PointF(points[i], points[(i + 1)]);
15641
+ if (i === 0) {
15642
+ if (this._pathPoints.length === 0 || startFigure) {
15643
+ this._addPoint(point, PathPointType.Start);
15644
+ startFigure = false;
15645
+ }
15646
+ else if (point.x !== this._getLastPoint().x || point.y !== this._getLastPoint().y) {
15647
+ this._addPoint(point, PathPointType.Line);
15648
+ }
15649
+ }
15650
+ else {
15651
+ this._addPoint(point, pointType);
15652
+ }
15653
+ i++;
15654
+ }
15655
+ return startFigure;
15656
+ }
15657
+ _getLastPoint() {
15658
+ let lastPoint = new PointF(0, 0);
15659
+ const count = this._pathPoints.length;
15660
+ if (count > 0) {
15661
+ lastPoint.x = this._pathPoints[(count - 1)].x;
15662
+ lastPoint.y = this._pathPoints[(count - 1)].y;
15663
+ }
15664
+ return lastPoint;
15665
+ }
15666
+ _addPoint(point, type) {
15667
+ this._pathPoints.push(point);
15668
+ this._pathTypes.push(type);
15669
+ }
15670
+ _getBezierArcPoints(x1, y1, x2, y2, s1, e1) {
15671
+ if ((x1 > x2)) {
15672
+ let tmp;
15673
+ tmp = x1;
15674
+ x1 = x2;
15675
+ x2 = tmp;
15676
+ }
15677
+ if ((y2 > y1)) {
15678
+ let tmp;
15679
+ tmp = y1;
15680
+ y1 = y2;
15681
+ y2 = tmp;
15682
+ }
15683
+ let fragAngle;
15684
+ let numFragments;
15685
+ if ((Math.abs(e1) <= 90)) {
15686
+ fragAngle = e1;
15687
+ numFragments = 1;
15688
+ }
15689
+ else {
15690
+ numFragments = (Math.ceil((Math.abs(e1) / 90)));
15691
+ fragAngle = (e1 / numFragments);
15692
+ }
15693
+ let xcen = ((x1 + x2) / 2);
15694
+ let ycen = ((y1 + y2) / 2);
15695
+ let rx = ((x2 - x1) / 2);
15696
+ let ry = ((y2 - y1) / 2);
15697
+ let halfAng = ((fragAngle * (Math.PI / 360)));
15698
+ let kappa = (Math.abs(4.0 / 3.0 * (1.0 - Math.cos(halfAng)) / Math.sin(halfAng)));
15699
+ let pointList = [];
15700
+ for (let i = 0; (i < numFragments); i++) {
15701
+ let theta0 = (((s1 + (i * fragAngle)) * (Math.PI / 180)));
15702
+ let theta1 = (((s1 + ((i + 1) * fragAngle)) * (Math.PI / 180)));
15703
+ let cos0 = (Math.cos(theta0));
15704
+ let cos1 = (Math.cos(theta1));
15705
+ let sin0 = (Math.sin(theta0));
15706
+ let sin1 = (Math.sin(theta1));
15707
+ if ((fragAngle > 0)) {
15708
+ 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)));
15709
+ }
15710
+ else {
15711
+ 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)));
15712
+ }
15713
+ }
15714
+ return pointList;
15715
+ }
15572
15716
  drawPathHelper(arg1, arg2, arg3, arg4) {
15573
15717
  if (typeof arg3 === 'boolean') {
15574
15718
  let temparg3 = arg3;
@@ -15593,7 +15737,6 @@ class PdfGraphics {
15593
15737
  }
15594
15738
  }
15595
15739
  }
15596
- /* tslint:disable */
15597
15740
  drawImage(arg1, arg2, arg3, arg4, arg5) {
15598
15741
  if (typeof arg2 === 'number' && typeof arg3 === 'number' && typeof arg4 === 'undefined') {
15599
15742
  let size = arg1.physicalDimension;
@@ -15629,7 +15772,6 @@ class PdfGraphics {
15629
15772
  }
15630
15773
  }
15631
15774
  //Implementation
15632
- /* tslint:disable */
15633
15775
  /**
15634
15776
  * Returns `bounds` of the line info.
15635
15777
  * @private
@@ -15645,8 +15787,7 @@ class PdfGraphics {
15645
15787
  let lineIndent = this.getLineIndent(line, format, layoutRectangle, (lineIndex === 0));
15646
15788
  hShift += (!this.rightToLeft(format)) ? lineIndent : 0;
15647
15789
  let x = layoutRectangle.x + hShift;
15648
- /* tslint:disable */
15649
- let width = (!this.shouldJustify(line, layoutRectangle.width, format)) ? lineWidth - lineIndent : layoutRectangle.width - lineIndent; /* tslint:enable */
15790
+ let width = (!this.shouldJustify(line, layoutRectangle.width, format)) ? lineWidth - lineIndent : layoutRectangle.width - lineIndent;
15650
15791
  let height = result.lineHeight;
15651
15792
  bounds = new RectangleF(x, y, width, height);
15652
15793
  }
@@ -15696,7 +15837,6 @@ class PdfGraphics {
15696
15837
  * Adding page number field before page saving.
15697
15838
  * @private
15698
15839
  */
15699
- /* tslint:disable */
15700
15840
  pageSave(page) {
15701
15841
  if (page.graphics.automaticFields != null) {
15702
15842
  for (let i = 0; i < page.graphics.automaticFields.automaticFields.length; i++) {
@@ -15828,7 +15968,6 @@ class PdfGraphics {
15828
15968
  }
15829
15969
  return shift;
15830
15970
  }
15831
- /* tslint:disable */
15832
15971
  /**
15833
15972
  * `Draws layout result`.
15834
15973
  * @private
@@ -15955,9 +16094,7 @@ class PdfGraphics {
15955
16094
  /**
15956
16095
  * Draws array of unicode tokens.
15957
16096
  */
15958
- /* tslint:disable */
15959
16097
  drawUnicodeBlocks(blocks, words, font, format, wordSpacing) {
15960
- /* tslint:enable */
15961
16098
  if (blocks == null) {
15962
16099
  throw new Error('Argument Null Exception : blocks');
15963
16100
  }
@@ -16117,11 +16254,9 @@ class PdfGraphics {
16117
16254
  let whitespacesCount = StringTokenizer.getCharsCount(line, symbols);
16118
16255
  let hasSpaces = (whitespacesCount > 0 && line[0] !== StringTokenizer.whiteSpace);
16119
16256
  let goodLineBreakStyle = ((lineInfo.lineType & LineType.LayoutBreak) > 0);
16120
- /* tslint:disable */
16121
- let shouldJustify = (justifyStyle && goodWidth && hasSpaces && (goodLineBreakStyle || format.alignment === PdfTextAlignment.Justify)); /* tslint:enable */
16257
+ let shouldJustify = (justifyStyle && goodWidth && hasSpaces && (goodLineBreakStyle || format.alignment === PdfTextAlignment.Justify));
16122
16258
  return shouldJustify;
16123
16259
  }
16124
- /* tslint:disable */
16125
16260
  /**
16126
16261
  * Emulates `Underline, Strikeout` of the text if needed.
16127
16262
  * @private
@@ -16146,9 +16281,7 @@ class PdfGraphics {
16146
16281
  let lineIndent = this.getLineIndent(lineInfo, format, layoutRectangle, (i === 0));
16147
16282
  hShift += (!this.rightToLeft(format)) ? lineIndent : 0;
16148
16283
  let x1 = layoutRectangle.x + hShift;
16149
- /* tslint:disable */
16150
16284
  let x2 = (!this.shouldJustify(lineInfo, layoutRectangle.width, format)) ? x1 + lineWidth - lineIndent : x1 + layoutRectangle.width - lineIndent;
16151
- /* tslint:enable */
16152
16285
  if (font.underline) {
16153
16286
  let y = underlineYOffset;
16154
16287
  this.drawLine(linePen, x1, y, x2, y);
@@ -16277,7 +16410,6 @@ class PdfGraphics {
16277
16410
  }
16278
16411
  else if (pen != null) {
16279
16412
  if (typeof this.pageLayer !== 'undefined' && this.pageLayer != null) {
16280
- /* tslint:disable */
16281
16413
  this.colorSpace = this.pageLayer.page.document.colorSpace;
16282
16414
  this.currentColorSpace = this.pageLayer.page.document.colorSpace;
16283
16415
  }
@@ -16314,9 +16446,7 @@ class PdfGraphics {
16314
16446
  penControl(pen, saveState) {
16315
16447
  if (pen != null) {
16316
16448
  this.currentPen = pen;
16317
- /* tslint:disable */
16318
16449
  pen.monitorChanges(this.currentPen, this.pdfStreamWriter, this.getResources, saveState, this.colorSpace, this.matrix.clone());
16319
- /* tslint:enable */
16320
16450
  this.currentPen = pen.clone();
16321
16451
  }
16322
16452
  }
@@ -16339,7 +16469,6 @@ class PdfGraphics {
16339
16469
  }
16340
16470
  this.currentBrush = lgb;
16341
16471
  b.monitorChanges(this.currentBrush, this.pdfStreamWriter, this.getResources, saveState, this.colorSpace);
16342
- /* tslint:enable */
16343
16472
  this.currentBrush = brush;
16344
16473
  brush = null;
16345
16474
  }
@@ -16351,14 +16480,12 @@ class PdfGraphics {
16351
16480
  fontControl(font, format, saveState) {
16352
16481
  if (font != null) {
16353
16482
  let curSubSuper = (format != null) ? format.subSuperScript : PdfSubSuperScript.None;
16354
- /* tslint:disable */
16355
- let prevSubSuper = (this.currentStringFormat != null) ? this.currentStringFormat.subSuperScript : PdfSubSuperScript.None; /* tslint:enable */
16483
+ let prevSubSuper = (this.currentStringFormat != null) ? this.currentStringFormat.subSuperScript : PdfSubSuperScript.None;
16356
16484
  if (saveState || font !== this.currentFont || curSubSuper !== prevSubSuper) {
16357
16485
  let resources = this.getResources.getResources();
16358
16486
  this.currentFont = font;
16359
16487
  this.currentStringFormat = format;
16360
16488
  let size = font.metrics.getSize(format);
16361
- /* tslint:disable */
16362
16489
  this.isEmfTextScaled = false;
16363
16490
  let fontName = resources.getName(font);
16364
16491
  this.pdfStreamWriter.setFont(font, fontName, size);
@@ -16457,7 +16584,6 @@ class PdfGraphics {
16457
16584
  input.translate(x, this.updateY(y));
16458
16585
  return input;
16459
16586
  }
16460
- /* tslint:disable */
16461
16587
  /**
16462
16588
  * Applies the specified `scaling operation` to the transformation matrix of this Graphics by prepending it to the object's transformation matrix.
16463
16589
  * ```typescript
@@ -16481,7 +16607,6 @@ class PdfGraphics {
16481
16607
  * @param scaleX Scale factor in the x direction.
16482
16608
  * @param scaleY Scale factor in the y direction.
16483
16609
  */
16484
- /* tslint:enable */
16485
16610
  scaleTransform(scaleX, scaleY) {
16486
16611
  let matrix = new PdfTransformationMatrix();
16487
16612
  this.getScaleTransform(scaleX, scaleY, matrix);
@@ -16633,7 +16758,6 @@ class PdfGraphics {
16633
16758
  this.pdfStreamWriter.restoreGraphicsState();
16634
16759
  return state;
16635
16760
  }
16636
- /* tslint:enable */
16637
16761
  /**
16638
16762
  * `Draws the specified path`, using its original physical size, at the location specified by a coordinate pair.
16639
16763
  * ```typescript
@@ -16664,6 +16788,9 @@ class PdfGraphics {
16664
16788
  * @param path Draw path.
16665
16789
  */
16666
16790
  drawPath(pen, brush, path) {
16791
+ this._drawPath(pen, brush, path.pathPoints, path.pathTypes, path.fillMode);
16792
+ }
16793
+ _drawPath(pen, brush, pathPoints, pathTypes, fillMode) {
16667
16794
  if (brush instanceof PdfTilingBrush) {
16668
16795
  this.bCSInitialized = false;
16669
16796
  brush.graphics.colorSpace = this.colorSpace;
@@ -16673,8 +16800,8 @@ class PdfGraphics {
16673
16800
  brush.colorSpace = this.colorSpace;
16674
16801
  }
16675
16802
  this.stateControl(pen, brush, null);
16676
- this.buildUpPath(path.pathPoints, path.pathTypes);
16677
- this.drawPathHelper(pen, brush, path.fillMode, false);
16803
+ this.buildUpPath(pathPoints, pathTypes);
16804
+ this.drawPathHelper(pen, brush, fillMode, false);
16678
16805
  }
16679
16806
  /* tslint:disable-next-line:max-line-length */
16680
16807
  drawArc(arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
@@ -16820,6 +16947,7 @@ class PdfGraphics {
16820
16947
  return pointsList;
16821
16948
  }
16822
16949
  }
16950
+ /* tslint:disable */
16823
16951
  // Constants
16824
16952
  /**
16825
16953
  * Specifies the mask of `path type values`.
@@ -17004,6 +17132,7 @@ class TransparencyData {
17004
17132
  this.blendMode = blendMode;
17005
17133
  }
17006
17134
  }
17135
+ /* tslint:enable */
17007
17136
 
17008
17137
  /**
17009
17138
  * The `PdfPageLayer` used to create layers in PDF document.