@syncfusion/ej2-pdf-export 19.3.43 → 19.3.53

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 (166) hide show
  1. package/.eslintrc.json +1 -1
  2. package/CHANGELOG.md +167 -0
  3. package/README.md +1 -10
  4. package/dist/ej2-pdf-export.umd.min.js +1 -1
  5. package/dist/ej2-pdf-export.umd.min.js.map +1 -1
  6. package/dist/es6/ej2-pdf-export.es2015.js +1 -2
  7. package/dist/es6/ej2-pdf-export.es2015.js.map +1 -1
  8. package/dist/es6/ej2-pdf-export.es5.js +1 -2
  9. package/dist/es6/ej2-pdf-export.es5.js.map +1 -1
  10. package/dist/global/ej2-pdf-export.min.js +1 -1
  11. package/dist/global/ej2-pdf-export.min.js.map +1 -1
  12. package/dist/global/index.d.ts +1 -1
  13. package/license +3 -0
  14. package/package.json +15 -7
  15. package/src/implementation/pages/pdf-section.d.ts +0 -1
  16. package/src/implementation/pages/pdf-section.js +0 -1
  17. package/src/implementation/structured-elements/grid/pdf-grid-cell.js +1 -1
  18. package/dist/ts/implementation/actions/action.ts +0 -76
  19. package/dist/ts/implementation/actions/uri-action.ts +0 -52
  20. package/dist/ts/implementation/annotations/action-link-annotation.ts +0 -43
  21. package/dist/ts/implementation/annotations/annotation-collection.ts +0 -159
  22. package/dist/ts/implementation/annotations/annotation.ts +0 -241
  23. package/dist/ts/implementation/annotations/document-link-annotation.ts +0 -118
  24. package/dist/ts/implementation/annotations/link-annotation.ts +0 -32
  25. package/dist/ts/implementation/annotations/pdf-text-web-link.ts +0 -265
  26. package/dist/ts/implementation/annotations/uri-annotation.ts +0 -86
  27. package/dist/ts/implementation/collections/dictionary.ts +0 -150
  28. package/dist/ts/implementation/collections/object-object-pair/dictionary.ts +0 -125
  29. package/dist/ts/implementation/collections/utils.ts +0 -38
  30. package/dist/ts/implementation/document/automatic-fields/automatic-field-info-collection.ts +0 -39
  31. package/dist/ts/implementation/document/automatic-fields/automatic-field-info.ts +0 -108
  32. package/dist/ts/implementation/document/automatic-fields/automatic-field.ts +0 -127
  33. package/dist/ts/implementation/document/automatic-fields/composite-field.ts +0 -76
  34. package/dist/ts/implementation/document/automatic-fields/multiple-value-field.ts +0 -37
  35. package/dist/ts/implementation/document/automatic-fields/page-count-field.ts +0 -75
  36. package/dist/ts/implementation/document/automatic-fields/pdf-numbers-convertor.ts +0 -157
  37. package/dist/ts/implementation/document/automatic-fields/pdf-page-number-field.ts +0 -82
  38. package/dist/ts/implementation/document/automatic-fields/pdf-template-value-pair.ts +0 -60
  39. package/dist/ts/implementation/document/automatic-fields/single-value-field.ts +0 -48
  40. package/dist/ts/implementation/document/pdf-catalog.ts +0 -52
  41. package/dist/ts/implementation/document/pdf-document-base.ts +0 -166
  42. package/dist/ts/implementation/document/pdf-document-template.ts +0 -310
  43. package/dist/ts/implementation/document/pdf-document.ts +0 -342
  44. package/dist/ts/implementation/drawing/pdf-drawing.ts +0 -218
  45. package/dist/ts/implementation/general/enum.ts +0 -21
  46. package/dist/ts/implementation/general/functions/pdf-function.ts +0 -66
  47. package/dist/ts/implementation/general/functions/pdf-sampled-function.ts +0 -62
  48. package/dist/ts/implementation/general/pdf-cache-collection.ts +0 -97
  49. package/dist/ts/implementation/general/pdf-collection.ts +0 -41
  50. package/dist/ts/implementation/general/pdf-destination.ts +0 -170
  51. package/dist/ts/implementation/graphics/brushes/enum.ts +0 -237
  52. package/dist/ts/implementation/graphics/brushes/pdf-blend.ts +0 -294
  53. package/dist/ts/implementation/graphics/brushes/pdf-brush.ts +0 -68
  54. package/dist/ts/implementation/graphics/brushes/pdf-brushes.ts +0 -2438
  55. package/dist/ts/implementation/graphics/brushes/pdf-color-blend.ts +0 -295
  56. package/dist/ts/implementation/graphics/brushes/pdf-gradient-brush.ts +0 -311
  57. package/dist/ts/implementation/graphics/brushes/pdf-linear-gradient-brush.ts +0 -406
  58. package/dist/ts/implementation/graphics/brushes/pdf-radial-gradient-brush.ts +0 -290
  59. package/dist/ts/implementation/graphics/brushes/pdf-solid-brush.ts +0 -107
  60. package/dist/ts/implementation/graphics/brushes/pdf-tiling-brush.ts +0 -304
  61. package/dist/ts/implementation/graphics/constants.ts +0 -31
  62. package/dist/ts/implementation/graphics/enum.ts +0 -413
  63. package/dist/ts/implementation/graphics/figures/arc.ts +0 -133
  64. package/dist/ts/implementation/graphics/figures/base/draw-element.ts +0 -59
  65. package/dist/ts/implementation/graphics/figures/base/element-layouter.ts +0 -260
  66. package/dist/ts/implementation/graphics/figures/base/fill-element.ts +0 -72
  67. package/dist/ts/implementation/graphics/figures/base/graphics-element.ts +0 -34
  68. package/dist/ts/implementation/graphics/figures/base/pdf-shape-element.ts +0 -69
  69. package/dist/ts/implementation/graphics/figures/base/shape-layouter.ts +0 -276
  70. package/dist/ts/implementation/graphics/figures/base/text-layouter.ts +0 -205
  71. package/dist/ts/implementation/graphics/figures/ellipse-part.ts +0 -76
  72. package/dist/ts/implementation/graphics/figures/enum.ts +0 -80
  73. package/dist/ts/implementation/graphics/figures/layout-element.ts +0 -132
  74. package/dist/ts/implementation/graphics/figures/path.ts +0 -646
  75. package/dist/ts/implementation/graphics/figures/pdf-template.ts +0 -205
  76. package/dist/ts/implementation/graphics/figures/rectangle-area.ts +0 -108
  77. package/dist/ts/implementation/graphics/figures/text-element.ts +0 -445
  78. package/dist/ts/implementation/graphics/fonts/enum.ts +0 -385
  79. package/dist/ts/implementation/graphics/fonts/pdf-font-metrics.ts +0 -248
  80. package/dist/ts/implementation/graphics/fonts/pdf-font.ts +0 -316
  81. package/dist/ts/implementation/graphics/fonts/pdf-standard-font-metrics-factory.ts +0 -606
  82. package/dist/ts/implementation/graphics/fonts/pdf-standard-font.ts +0 -243
  83. package/dist/ts/implementation/graphics/fonts/pdf-string-format.ts +0 -474
  84. package/dist/ts/implementation/graphics/fonts/pdf-true-type-font.ts +0 -165
  85. package/dist/ts/implementation/graphics/fonts/rtl/rtl-bidirectional.ts +0 -958
  86. package/dist/ts/implementation/graphics/fonts/rtl/rtl-text-shape.ts +0 -374
  87. package/dist/ts/implementation/graphics/fonts/rtl-renderer.ts +0 -255
  88. package/dist/ts/implementation/graphics/fonts/string-layouter.ts +0 -617
  89. package/dist/ts/implementation/graphics/fonts/string-tokenizer.ts +0 -275
  90. package/dist/ts/implementation/graphics/fonts/ttf-OS2-Table.ts +0 -206
  91. package/dist/ts/implementation/graphics/fonts/ttf-apple-cmap-sub-table.ts +0 -18
  92. package/dist/ts/implementation/graphics/fonts/ttf-cmap-sub-table.ts +0 -18
  93. package/dist/ts/implementation/graphics/fonts/ttf-cmap-table.ts +0 -14
  94. package/dist/ts/implementation/graphics/fonts/ttf-glyph-header.ts +0 -26
  95. package/dist/ts/implementation/graphics/fonts/ttf-glyph-info.ts +0 -35
  96. package/dist/ts/implementation/graphics/fonts/ttf-head-table.ts +0 -94
  97. package/dist/ts/implementation/graphics/fonts/ttf-horizontal-header-table.ts +0 -56
  98. package/dist/ts/implementation/graphics/fonts/ttf-loca-table.ts +0 -10
  99. package/dist/ts/implementation/graphics/fonts/ttf-long-hor-metric.ts +0 -14
  100. package/dist/ts/implementation/graphics/fonts/ttf-metrics.ts +0 -106
  101. package/dist/ts/implementation/graphics/fonts/ttf-microsoft-cmap-sub-table.ts +0 -58
  102. package/dist/ts/implementation/graphics/fonts/ttf-name-record.ts +0 -33
  103. package/dist/ts/implementation/graphics/fonts/ttf-name-table.ts +0 -22
  104. package/dist/ts/implementation/graphics/fonts/ttf-post-table.ts +0 -42
  105. package/dist/ts/implementation/graphics/fonts/ttf-reader.ts +0 -1254
  106. package/dist/ts/implementation/graphics/fonts/ttf-table-info.ts +0 -26
  107. package/dist/ts/implementation/graphics/fonts/ttf-trimmed-cmap-sub-table.ts +0 -26
  108. package/dist/ts/implementation/graphics/fonts/unicode-true-type-font.ts +0 -577
  109. package/dist/ts/implementation/graphics/images/byte-array.ts +0 -137
  110. package/dist/ts/implementation/graphics/images/image-decoder.ts +0 -437
  111. package/dist/ts/implementation/graphics/images/pdf-bitmap.ts +0 -110
  112. package/dist/ts/implementation/graphics/images/pdf-image.ts +0 -132
  113. package/dist/ts/implementation/graphics/pdf-color.ts +0 -478
  114. package/dist/ts/implementation/graphics/pdf-graphics.ts +0 -2424
  115. package/dist/ts/implementation/graphics/pdf-margins.ts +0 -124
  116. package/dist/ts/implementation/graphics/pdf-pen.ts +0 -370
  117. package/dist/ts/implementation/graphics/pdf-resources.ts +0 -300
  118. package/dist/ts/implementation/graphics/pdf-transformation-matrix.ts +0 -246
  119. package/dist/ts/implementation/graphics/pdf-transparency.ts +0 -93
  120. package/dist/ts/implementation/graphics/unit-convertor.ts +0 -96
  121. package/dist/ts/implementation/input-output/big-endian-writer.ts +0 -121
  122. package/dist/ts/implementation/input-output/cross-table.ts +0 -21
  123. package/dist/ts/implementation/input-output/enum.ts +0 -16
  124. package/dist/ts/implementation/input-output/pdf-cross-table.ts +0 -524
  125. package/dist/ts/implementation/input-output/pdf-dictionary-properties.ts +0 -515
  126. package/dist/ts/implementation/input-output/pdf-main-object-collection.ts +0 -194
  127. package/dist/ts/implementation/input-output/pdf-operators.ts +0 -363
  128. package/dist/ts/implementation/input-output/pdf-stream-writer.ts +0 -681
  129. package/dist/ts/implementation/input-output/pdf-writer.ts +0 -88
  130. package/dist/ts/implementation/pages/enum.ts +0 -201
  131. package/dist/ts/implementation/pages/page-added-event-arguments.ts +0 -39
  132. package/dist/ts/implementation/pages/pdf-document-page-collection.ts +0 -180
  133. package/dist/ts/implementation/pages/pdf-page-base.ts +0 -181
  134. package/dist/ts/implementation/pages/pdf-page-layer-collection.ts +0 -348
  135. package/dist/ts/implementation/pages/pdf-page-layer.ts +0 -271
  136. package/dist/ts/implementation/pages/pdf-page-settings.ts +0 -192
  137. package/dist/ts/implementation/pages/pdf-page-size.ts +0 -162
  138. package/dist/ts/implementation/pages/pdf-page-template-element.ts +0 -659
  139. package/dist/ts/implementation/pages/pdf-page.ts +0 -235
  140. package/dist/ts/implementation/pages/pdf-section-collection.ts +0 -187
  141. package/dist/ts/implementation/pages/pdf-section-page-collection.ts +0 -61
  142. package/dist/ts/implementation/pages/pdf-section-templates.ts +0 -96
  143. package/dist/ts/implementation/pages/pdf-section.ts +0 -644
  144. package/dist/ts/implementation/primitives/pdf-array.ts +0 -386
  145. package/dist/ts/implementation/primitives/pdf-boolean.ts +0 -119
  146. package/dist/ts/implementation/primitives/pdf-dictionary.ts +0 -513
  147. package/dist/ts/implementation/primitives/pdf-name.ts +0 -218
  148. package/dist/ts/implementation/primitives/pdf-number.ts +0 -165
  149. package/dist/ts/implementation/primitives/pdf-reference.ts +0 -430
  150. package/dist/ts/implementation/primitives/pdf-stream.ts +0 -336
  151. package/dist/ts/implementation/primitives/pdf-string.ts +0 -397
  152. package/dist/ts/implementation/structured-elements/grid/layout/grid-layouter.ts +0 -1998
  153. package/dist/ts/implementation/structured-elements/grid/pdf-grid-cell.ts +0 -1189
  154. package/dist/ts/implementation/structured-elements/grid/pdf-grid-column.ts +0 -206
  155. package/dist/ts/implementation/structured-elements/grid/pdf-grid-row.ts +0 -468
  156. package/dist/ts/implementation/structured-elements/grid/pdf-grid.ts +0 -839
  157. package/dist/ts/implementation/structured-elements/grid/styles/pdf-borders.ts +0 -240
  158. package/dist/ts/implementation/structured-elements/grid/styles/style.ts +0 -424
  159. package/dist/ts/implementation/structured-elements/tables/light-tables/enum.ts +0 -16
  160. package/dist/ts/interfaces/i-pdf-cache.ts +0 -23
  161. package/dist/ts/interfaces/i-pdf-changable.ts +0 -17
  162. package/dist/ts/interfaces/i-pdf-clonable.ts +0 -12
  163. package/dist/ts/interfaces/i-pdf-primitives.ts +0 -45
  164. package/dist/ts/interfaces/i-pdf-true-type-font.ts +0 -48
  165. package/dist/ts/interfaces/i-pdf-wrapper.ts +0 -13
  166. package/dist/ts/interfaces/i-pdf-writer.ts +0 -29
@@ -1,206 +0,0 @@
1
- /**
2
- * `PdfGridColumn.ts` class for EJ2-PDF
3
- */
4
- import { PdfGrid } from './pdf-grid';
5
- import { PdfGridRow } from './pdf-grid-row';
6
- import { PdfGridCell } from './pdf-grid-cell';
7
- import { PdfStringFormat } from './../../graphics/fonts/pdf-string-format';
8
- /**
9
- * `PdfGridColumn` class represents the schema of a column in a 'PdfGrid'.
10
- */
11
- export class PdfGridColumn {
12
- //Fields
13
- /**
14
- * The current `grid`.
15
- * @private
16
- */
17
- private grid : PdfGrid;
18
- /**
19
- * The `width` of the column.
20
- * @default 0
21
- * @private
22
- */
23
- public columnWidth : number = 0;
24
- /**
25
- * Represent the `custom width` of the column.
26
- * @private
27
- */
28
- public isCustomWidth : boolean;
29
- /**
30
- * The `string format` of the column.
31
- * @private
32
- */
33
- private stringFormat : PdfStringFormat;
34
- //Constructors
35
- /**
36
- * Initializes a new instance of the `PdfGridColumn` class with the parent grid.
37
- * @private
38
- */
39
- public constructor(grid : PdfGrid) {
40
- this.grid = grid;
41
- }
42
- /**
43
- * Gets or sets the `width` of the 'PdfGridColumn'.
44
- * @private
45
- */
46
- public get width() : number {
47
- return this.columnWidth;
48
- }
49
- public set width(value : number) {
50
- this.isCustomWidth = true;
51
- this.columnWidth = value;
52
- }
53
- /**
54
- * Gets or sets the information about the text `formatting`.
55
- * @private
56
- */
57
- public get format() : PdfStringFormat {
58
- if (this.stringFormat == null) {
59
- this.stringFormat = new PdfStringFormat(); //GetDefaultFormat();
60
- }
61
- return this.stringFormat;
62
- }
63
- public set format(value : PdfStringFormat) {
64
- this.stringFormat = value;
65
- }
66
- }
67
- /**
68
- * `PdfGridColumnCollection` class provides access to an ordered,
69
- * strongly typed collection of 'PdfGridColumn' objects.
70
- * @private
71
- */
72
- export class PdfGridColumnCollection {
73
- //Fields
74
- /**
75
- * @hidden
76
- * @private
77
- */
78
- private grid : PdfGrid;
79
- /**
80
- * @hidden
81
- * @private
82
- */
83
- private internalColumns : PdfGridColumn[] = [];
84
- /**
85
- * @hidden
86
- * @private
87
- */
88
- private columnWidth : number = 0;
89
- //properties
90
-
91
- //Constructors
92
- /**
93
- * Initializes a new instance of the `PdfGridColumnCollection` class with the parent grid.
94
- * @private
95
- */
96
- public constructor(grid : PdfGrid) {
97
- this.grid = grid;
98
- this.internalColumns = [];
99
- }
100
- //Iplementation
101
- /**
102
- * `Add` a new column to the 'PdfGrid'.
103
- * @private
104
- */
105
- public add(count : number) : void {
106
- // public add(column : PdfGridColumn) : void
107
- // public add(arg : number|PdfGridColumn) : void {
108
- // if (typeof arg === 'number') {
109
- for (let i : number = 0; i < count; i++) {
110
- this.internalColumns.push(new PdfGridColumn(this.grid));
111
- for (let index : number = 0; index < this.grid.rows.count; index++) {
112
- let row : PdfGridRow = this.grid.rows.getRow(index);
113
- let cell : PdfGridCell = new PdfGridCell();
114
- cell.value = '';
115
- row.cells.add(cell);
116
- }
117
- }
118
- // } else {
119
- // let column : PdfGridColumn = new PdfGridColumn(this.grid);
120
- // this.columns.push(column);
121
- // return column;
122
- // }
123
- }
124
- /**
125
- * Gets the `number of columns` in the 'PdfGrid'.[Read-Only].
126
- * @private
127
- */
128
- public get count() : number {
129
- return this.internalColumns.length;
130
- }
131
- /**
132
- * Gets the `widths`.
133
- * @private
134
- */
135
- public get width() : number {
136
- if (this.columnWidth === 0 ) {
137
- this.columnWidth = this.measureColumnsWidth();
138
- }
139
- if (this.grid.initialWidth !== 0 && this.columnWidth !== this.grid.initialWidth && !this.grid.style.allowHorizontalOverflow) {
140
- this.columnWidth = this.grid.initialWidth;
141
- this.grid.isPageWidth = true;
142
- }
143
- return this.columnWidth;
144
- }
145
- /**
146
- * Gets the `array of PdfGridColumn`.[Read-Only]
147
- * @private
148
- */
149
- public get columns() : PdfGridColumn[] {
150
- return this.internalColumns;
151
- }
152
- /**
153
- * Gets the `PdfGridColumn` from the specified index.[Read-Only]
154
- * @private
155
- */
156
- public getColumn(index : number) : PdfGridColumn {
157
- if (index >= 0 && index <= this.columns.length) {
158
- return this.columns[index];
159
- } else {
160
- throw Error('can not get the column from the index: ' + index);
161
- }
162
- }
163
-
164
- //Implementation
165
- /**
166
- * `Calculates the column widths`.
167
- * @private
168
- */
169
- public measureColumnsWidth() : number {
170
- let totalWidth : number = 0;
171
- this.grid.measureColumnsWidth();
172
- for (let i : number = 0, count : number = this.internalColumns.length; i < count; i++) {
173
- totalWidth += this.internalColumns[i].width;
174
- }
175
- return totalWidth;
176
- }
177
- /**
178
- * Gets the `widths of the columns`.
179
- * @private
180
- */
181
- public getDefaultWidths(totalWidth : number) : number[] {
182
- let widths : number[] = [];
183
- let summ : number = 0.0;
184
- let subFactor : number = this.count;
185
- for (let i : number = 0; i < this.count; i++) {
186
- if (this.grid.isPageWidth && totalWidth >= 0 && !this.internalColumns[i].isCustomWidth) {
187
- this.internalColumns[i].width = 0;
188
- } else {
189
- widths[i] = this.internalColumns[i].width;
190
- if (this.internalColumns[i].width > 0 && this. internalColumns[i].isCustomWidth) {
191
- totalWidth -= this.internalColumns[i].width;
192
- subFactor--;
193
- } else {
194
- widths[i] = 0;
195
- }
196
- }
197
- }
198
- for (let i : number = 0; i < this.count; i++) {
199
- let width : number = totalWidth / subFactor;
200
- if (widths[i] <= 0) {
201
- widths[i] = width;
202
- }
203
- }
204
- return widths;
205
- }
206
- }
@@ -1,468 +0,0 @@
1
- /**
2
- * PdfGridRow.ts class for EJ2-PDF
3
- */
4
- import { PdfGrid } from './pdf-grid';
5
- import { PdfGridCell, PdfGridCellCollection } from './pdf-grid-cell';
6
- import { PdfGridRowStyle } from './styles/style';
7
- import { PdfLayoutResult } from '../../graphics/figures/base/element-layouter';
8
- import { PdfGridColumn } from './../../structured-elements/grid/pdf-grid-column';
9
- /**
10
- * `PdfGridRow` class provides customization of the settings for the particular row.
11
- */
12
- export class PdfGridRow {
13
- //Fields
14
- /**
15
- * `Cell collecton` of the current row..
16
- * @private
17
- */
18
- private gridCells : PdfGridCellCollection;
19
- /**
20
- * Stores the current `grid`.
21
- * @private
22
- */
23
- private pdfGrid : PdfGrid;
24
- /**
25
- * The grid row `style`.
26
- * @private
27
- */
28
- private rowStyle : PdfGridRowStyle;
29
- /**
30
- * Stores the row `break height`.
31
- * @private
32
- */
33
- private gridRowBreakHeight : number;
34
- /**
35
- * Stores the index of the overflowing row.
36
- * @private
37
- */
38
- private gridRowOverflowIndex : number = 0;
39
- /**
40
- * The `height` of the row.
41
- * @private
42
- */
43
- private rowHeight : number = 0;
44
- /**
45
- * The `width` of the row.
46
- * @private
47
- */
48
- private rowWidth : number = 0;
49
- /**
50
- * The `isFinish` of the row.
51
- * @private
52
- */
53
- public isrowFinish : boolean = false;
54
- /**
55
- * Check whether the Row span row height `is set explicitly`.
56
- * @default false
57
- * @public
58
- */
59
- public isRowSpanRowHeightSet : boolean = false;
60
- /**
61
- * The grid row `Layout Result`.
62
- * @private
63
- */
64
- private gridResult : PdfLayoutResult ;
65
- /**
66
- * The `Maximum span` of the row.
67
- * @public
68
- */
69
- public maximumRowSpan : number;
70
- /**
71
- * The `page count` of the row.
72
- * @public
73
- */
74
- public noOfPageCount : number = 0 ;
75
- /**
76
- * Check whether the row height `is set explicitly`.
77
- * @default false
78
- * @private
79
- */
80
- public isRowHeightSet : boolean = false;
81
- public isRowBreaksNextPage : boolean ;
82
- public rowBreakHeightValue : number;
83
- public isPageBreakRowSpanApplied : boolean = false;
84
- /**
85
- * Checks whether the `columns span is exist or not`.
86
- * @private
87
- */
88
- private bColumnSpanExists : boolean;
89
- /**
90
- * Check weather the row merge `is completed` or not.
91
- * @default true
92
- * @private
93
- */
94
- private isRowMergeComplete : boolean = true;
95
- /**
96
- * Checks whether the `row span is exist or not`.
97
- * @private
98
- */
99
- private bRowSpanExists : boolean;
100
- public repeatFlag : boolean = false;
101
- public repeatRowNumber : number;
102
- public rowFontSplit : boolean = false;
103
- //Constructor
104
- /**
105
- * Initializes a new instance of the `PdfGridRow` class with the parent grid.
106
- * @private
107
- */
108
- public constructor(grid : PdfGrid) {
109
- this.pdfGrid = grid;
110
- }
111
- //Properties
112
- /**
113
- * Gets or sets a value indicating [`row span exists`].
114
- * @private
115
- */
116
- public get rowSpanExists() : boolean {
117
- return this.bRowSpanExists;
118
- }
119
- public set rowSpanExists(value : boolean) {
120
- this.bRowSpanExists = value;
121
- }
122
- /**
123
- * Gets the `cells` from the selected row.[Read-Only].
124
- * @private
125
- */
126
- public get cells() : PdfGridCellCollection {
127
- if (this.gridCells == null) {
128
- this.gridCells = new PdfGridCellCollection(this);
129
- }
130
- return this.gridCells;
131
- }
132
- /**
133
- * Gets or sets the parent `grid`.
134
- * @private
135
- */
136
- public get grid() : PdfGrid {
137
- return this.pdfGrid;
138
- }
139
- public set grid(value : PdfGrid) {
140
- this.pdfGrid = value;
141
- }
142
- /**
143
- * Gets or sets the row `style`.
144
- * @private
145
- */
146
- public get style() : PdfGridRowStyle {
147
- if (typeof this.rowStyle === 'undefined') {
148
- this.rowStyle = new PdfGridRowStyle();
149
- this.rowStyle.setParent(this);
150
- }
151
- return this.rowStyle;
152
- }
153
- public set style(value : PdfGridRowStyle) {
154
- this.rowStyle = value;
155
- for (let i : number = 0; i < this.cells.count; i++) {
156
- this.cells.getCell(i).style.borders = value.border;
157
- if (typeof value.font !== 'undefined') {
158
- this.cells.getCell(i).style.font = value.font;
159
- }
160
- if (typeof value.backgroundBrush !== 'undefined') {
161
- this.cells.getCell(i).style.backgroundBrush = value.backgroundBrush;
162
- }
163
- if (typeof value.backgroundImage !== 'undefined') {
164
- this.cells.getCell(i).style.backgroundImage = value.backgroundImage;
165
- }
166
- if (typeof value.textBrush !== 'undefined') {
167
- this.cells.getCell(i).style.textBrush = value.textBrush;
168
- }
169
- if (typeof value.textPen !== 'undefined') {
170
- this.cells.getCell(i).style.textPen = value.textPen;
171
- }
172
- }
173
- }
174
- /**
175
- * `Height` of the row yet to be drawn after split.
176
- * @private
177
- */
178
- public get rowBreakHeight() : number {
179
- if (typeof this.gridRowBreakHeight === 'undefined') {
180
- this.gridRowBreakHeight = 0;
181
- }
182
- return this.gridRowBreakHeight;
183
- }
184
- public set rowBreakHeight(value : number) {
185
- this.gridRowBreakHeight = value;
186
- }
187
- /**
188
- * `over flow index` of the row.
189
- * @private
190
- */
191
- public get rowOverflowIndex() : number {
192
- return this.gridRowOverflowIndex;
193
- }
194
- public set rowOverflowIndex(value : number) {
195
- this.gridRowOverflowIndex = value;
196
- }
197
- /**
198
- * Gets or sets the `height` of the row.
199
- * @private
200
- */
201
- public get height() : number {
202
- if (!this.isRowHeightSet) {
203
- this.rowHeight = this.measureHeight();
204
- }
205
- return this.rowHeight;
206
- }
207
- public set height(value : number) {
208
- this.rowHeight = value;
209
- this.isRowHeightSet = true;
210
- }
211
- /**
212
- * Gets or sets the `width` of the row.
213
- * @private
214
- */
215
- public get width() : number {
216
- if (this.rowWidth === 0 || typeof this.rowWidth === 'undefined') {
217
- this.rowWidth = this.measureWidth();
218
- }
219
- return this.rowWidth;
220
- }
221
- /**
222
- * Gets or sets the row `Nested grid Layout Result`.
223
- * @private
224
- */
225
- public get NestedGridLayoutResult() : PdfLayoutResult{
226
- return this.gridResult;
227
- }
228
- public set NestedGridLayoutResult(value : PdfLayoutResult ) {
229
- this.gridResult = value;
230
- }
231
- /**
232
- * Gets or sets a value indicating [`column span exists`].
233
- * @private
234
- */
235
- public get columnSpanExists() : boolean {
236
- return this.bColumnSpanExists;
237
- }
238
- public set columnSpanExists(value : boolean) {
239
- this.bColumnSpanExists = value;
240
- }
241
- /**
242
- * Check whether the Row `has row span or row merge continue`.
243
- * @private
244
- */
245
- public get rowMergeComplete() : boolean {
246
- return this.isRowMergeComplete;
247
- }
248
- public set rowMergeComplete(value : boolean) {
249
- this.isRowMergeComplete = value;
250
- }
251
- /**
252
- * Returns `index` of the row.
253
- * @private
254
- */
255
- public get rowIndex() : number {
256
- return this.grid.rows.rowCollection.indexOf(this);
257
- }
258
- //Implementation
259
- /**
260
- * `Calculates the height`.
261
- * @private
262
- */
263
- private measureHeight() : number {
264
- let rowSpanRemainingHeight : number = 0;
265
- let rowHeight : number;
266
- let maxHeight : number = 0;
267
- if (this.cells.getCell(0).rowSpan > 1) {
268
- rowHeight = 0;
269
- } else {
270
- rowHeight = this.cells.getCell(0).height;
271
- }
272
- for (let i : number = 0; i < this.cells.count; i++) {
273
- let cell : PdfGridCell = this.cells.getCell(i);
274
- //get the maximum rowspan remaining height.
275
- if (cell.rowSpanRemainingHeight > rowSpanRemainingHeight) {
276
- rowSpanRemainingHeight = cell.rowSpanRemainingHeight;
277
- }
278
- //skip the cell if row spanned.
279
- // if (cell.isRowMergeContinue) {
280
- // continue;
281
- // }
282
- // if (!cell.isRowMergeContinue) {
283
- // this.rowMergeComplete = false;
284
- // }
285
- this.rowMergeComplete = false;
286
- if (cell.rowSpan > 1) {
287
- let cellIn : number = i;
288
- let rowin : number = this.grid.rows.rowCollection.indexOf(this);
289
- for (let j : number = 0; j < cell.rowSpan; j++ ) {
290
- if ( (j + 1) < cell.rowSpan) {
291
- this.grid.rows.getRow(rowin + j + 1).cells.getCell(cellIn).hasRowSpan = true;
292
- }
293
- }
294
- if (maxHeight < cell.height) {
295
- maxHeight = cell.height;
296
- }
297
- continue;
298
- }
299
- rowHeight = Math.max(rowHeight, cell.height);
300
- }
301
- if (maxHeight > rowHeight) {
302
- rowHeight = maxHeight;
303
- }
304
- if (rowHeight === 0) {
305
- rowHeight = maxHeight;
306
- } else if (rowSpanRemainingHeight > 0) {
307
- rowHeight += rowSpanRemainingHeight;
308
- }
309
- return rowHeight;
310
- }
311
- private measureWidth() : number {
312
- let rowWid : number = 0;
313
- for (let i : number = 0; i < this.grid.columns.count; i++) {
314
- let column : PdfGridColumn = this.grid.columns.getColumn(i);
315
- rowWid += column.width;
316
- }
317
- return rowWid;
318
- }
319
- }
320
- /**
321
- * `PdfGridRowCollection` class provides access to an ordered, strongly typed collection of 'PdfGridRow' objects.
322
- * @private
323
- */
324
- export class PdfGridRowCollection {
325
- // Fields
326
- /**
327
- * @hidden
328
- * @private
329
- */
330
- private grid : PdfGrid;
331
- /**
332
- * The row collection of the `grid`.
333
- * @private
334
- */
335
- private rows : PdfGridRow[];
336
- // Constructor
337
- /**
338
- * Initializes a new instance of the `PdfGridRowCollection` class with the parent grid.
339
- * @private
340
- */
341
- public constructor(grid : PdfGrid) {
342
- this.rows = [];
343
- this.grid = grid;
344
- }
345
- //Properties
346
- /**
347
- * Gets the number of header in the `PdfGrid`.[Read-Only].
348
- * @private
349
- */
350
- public get count() : number {
351
- return this.rows.length;
352
- }
353
- //Implementation
354
- /**
355
- * Return the row collection of the `grid`.
356
- * @private
357
- */
358
- public get rowCollection() : PdfGridRow[] {
359
- return this.rows;
360
- }
361
- /**
362
- * `Adds` the specified row.
363
- * @private
364
- */
365
- public addRow() : PdfGridRow
366
- /**
367
- * `Adds` the specified row.
368
- * @private
369
- */
370
- public addRow(row : PdfGridRow) : void
371
- public addRow(arg ?: PdfGridRow) : void | PdfGridRow {
372
- if (typeof arg === 'undefined') {
373
- let temprow : PdfGridRow = new PdfGridRow(this.grid);
374
- this.addRow(temprow);
375
- return temprow;
376
- } else {
377
- arg.style.setBackgroundBrush(this.grid.style.backgroundBrush);
378
- arg.style.setFont(this.grid.style.font);
379
- arg.style.setTextBrush(this.grid.style.textBrush);
380
- arg.style.setTextPen(this.grid.style.textPen);
381
- if (arg.cells.count === 0) {
382
- for (let i : number = 0; i < this.grid.columns.count; i++) {
383
- arg.cells.add(new PdfGridCell());
384
- }
385
- }
386
- this.rows.push(arg);
387
- }
388
- }
389
- /**
390
- * Return the row by index.
391
- * @private
392
- */
393
- public getRow(index : number) : PdfGridRow {
394
- return this.rows[index];
395
- }
396
- }
397
- /**
398
- * `PdfGridHeaderCollection` class provides customization of the settings for the header.
399
- * @private
400
- */
401
- export class PdfGridHeaderCollection {
402
- /**
403
- * The `grid`.
404
- * @private
405
- */
406
- private grid : PdfGrid;
407
- /**
408
- * The array to store the `rows` of the grid header.
409
- * @private
410
- */
411
- private rows : PdfGridRow[] = [];
412
- //constructor
413
- /**
414
- * Initializes a new instance of the `PdfGridHeaderCollection` class with the parent grid.
415
- * @private
416
- */
417
- public constructor(grid : PdfGrid) {
418
- this.grid = grid;
419
- this.rows = [];
420
- }
421
- //Properties
422
- /**
423
- * Gets a 'PdfGridRow' object that represents the `header` row in a 'PdfGridHeaderCollection' control.[Read-Only].
424
- * @private
425
- */
426
- public getHeader(index : number) : PdfGridRow {
427
- // if (index < 0 || index >= Count) {
428
- // throw new IndexOutOfRangeException();
429
- // }
430
- return (this.rows[index]);
431
- }
432
- /**
433
- * Gets the `number of header` in the 'PdfGrid'.[Read-Only]
434
- * @private
435
- */
436
- public get count() : number {
437
- return this.rows.length;
438
- }
439
- //Implementation
440
- /**
441
- * `Adds` the specified row.
442
- * @private
443
- */
444
- public add(row : PdfGridRow) : void
445
- /**
446
- * `Adds` the specified row.
447
- * @private
448
- */
449
- public add(count : number) : PdfGridRow[]
450
- public add(arg : number|PdfGridRow) : void|PdfGridRow[] {
451
- if (typeof arg === 'number') {
452
- let row : PdfGridRow;
453
- for (let i : number = 0; i < arg; i++) {
454
- row = new PdfGridRow(this.grid);
455
- for (let j : number = 0; j < this.grid.columns.count; j++) {
456
- row.cells.add(new PdfGridCell());
457
- }
458
- this.rows.push(row);
459
- }
460
- return this.rows;
461
- } else {
462
- this.rows.push(arg);
463
- }
464
- }
465
- public indexOf(row : PdfGridRow) : number {
466
- return this.rows.indexOf(row);
467
- }
468
- }