@syncfusion/ej2-pdf-export 19.4.52 → 20.2.36

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 (154) hide show
  1. package/dist/ej2-pdf-export.umd.min.js +1 -1
  2. package/dist/global/ej2-pdf-export.min.js +1 -1
  3. package/dist/global/index.d.ts +1 -1
  4. package/dist/ts/implementation/actions/action.ts +76 -0
  5. package/dist/ts/implementation/actions/uri-action.ts +52 -0
  6. package/dist/ts/implementation/annotations/action-link-annotation.ts +43 -0
  7. package/dist/ts/implementation/annotations/annotation-collection.ts +159 -0
  8. package/dist/ts/implementation/annotations/annotation.ts +241 -0
  9. package/dist/ts/implementation/annotations/document-link-annotation.ts +118 -0
  10. package/dist/ts/implementation/annotations/link-annotation.ts +32 -0
  11. package/dist/ts/implementation/annotations/pdf-text-web-link.ts +265 -0
  12. package/dist/ts/implementation/annotations/uri-annotation.ts +86 -0
  13. package/dist/ts/implementation/collections/dictionary.ts +150 -0
  14. package/dist/ts/implementation/collections/object-object-pair/dictionary.ts +125 -0
  15. package/dist/ts/implementation/collections/utils.ts +38 -0
  16. package/dist/ts/implementation/document/automatic-fields/automatic-field-info-collection.ts +39 -0
  17. package/dist/ts/implementation/document/automatic-fields/automatic-field-info.ts +108 -0
  18. package/dist/ts/implementation/document/automatic-fields/automatic-field.ts +127 -0
  19. package/dist/ts/implementation/document/automatic-fields/composite-field.ts +76 -0
  20. package/dist/ts/implementation/document/automatic-fields/multiple-value-field.ts +37 -0
  21. package/dist/ts/implementation/document/automatic-fields/page-count-field.ts +75 -0
  22. package/dist/ts/implementation/document/automatic-fields/pdf-numbers-convertor.ts +157 -0
  23. package/dist/ts/implementation/document/automatic-fields/pdf-page-number-field.ts +82 -0
  24. package/dist/ts/implementation/document/automatic-fields/pdf-template-value-pair.ts +60 -0
  25. package/dist/ts/implementation/document/automatic-fields/single-value-field.ts +48 -0
  26. package/dist/ts/implementation/document/pdf-catalog.ts +52 -0
  27. package/dist/ts/implementation/document/pdf-document-base.ts +166 -0
  28. package/dist/ts/implementation/document/pdf-document-template.ts +310 -0
  29. package/dist/ts/implementation/document/pdf-document.ts +342 -0
  30. package/dist/ts/implementation/drawing/pdf-drawing.ts +218 -0
  31. package/dist/ts/implementation/general/enum.ts +21 -0
  32. package/dist/ts/implementation/general/functions/pdf-function.ts +66 -0
  33. package/dist/ts/implementation/general/functions/pdf-sampled-function.ts +62 -0
  34. package/dist/ts/implementation/general/pdf-cache-collection.ts +97 -0
  35. package/dist/ts/implementation/general/pdf-collection.ts +41 -0
  36. package/dist/ts/implementation/general/pdf-destination.ts +170 -0
  37. package/dist/ts/implementation/graphics/brushes/enum.ts +237 -0
  38. package/dist/ts/implementation/graphics/brushes/pdf-blend.ts +294 -0
  39. package/dist/ts/implementation/graphics/brushes/pdf-brush.ts +68 -0
  40. package/dist/ts/implementation/graphics/brushes/pdf-brushes.ts +2438 -0
  41. package/dist/ts/implementation/graphics/brushes/pdf-color-blend.ts +295 -0
  42. package/dist/ts/implementation/graphics/brushes/pdf-gradient-brush.ts +311 -0
  43. package/dist/ts/implementation/graphics/brushes/pdf-linear-gradient-brush.ts +406 -0
  44. package/dist/ts/implementation/graphics/brushes/pdf-radial-gradient-brush.ts +290 -0
  45. package/dist/ts/implementation/graphics/brushes/pdf-solid-brush.ts +107 -0
  46. package/dist/ts/implementation/graphics/brushes/pdf-tiling-brush.ts +304 -0
  47. package/dist/ts/implementation/graphics/constants.ts +31 -0
  48. package/dist/ts/implementation/graphics/enum.ts +413 -0
  49. package/dist/ts/implementation/graphics/figures/arc.ts +133 -0
  50. package/dist/ts/implementation/graphics/figures/base/draw-element.ts +59 -0
  51. package/dist/ts/implementation/graphics/figures/base/element-layouter.ts +260 -0
  52. package/dist/ts/implementation/graphics/figures/base/fill-element.ts +72 -0
  53. package/dist/ts/implementation/graphics/figures/base/graphics-element.ts +34 -0
  54. package/dist/ts/implementation/graphics/figures/base/pdf-shape-element.ts +69 -0
  55. package/dist/ts/implementation/graphics/figures/base/shape-layouter.ts +276 -0
  56. package/dist/ts/implementation/graphics/figures/base/text-layouter.ts +205 -0
  57. package/dist/ts/implementation/graphics/figures/ellipse-part.ts +76 -0
  58. package/dist/ts/implementation/graphics/figures/enum.ts +80 -0
  59. package/dist/ts/implementation/graphics/figures/layout-element.ts +132 -0
  60. package/dist/ts/implementation/graphics/figures/path.ts +646 -0
  61. package/dist/ts/implementation/graphics/figures/pdf-template.ts +205 -0
  62. package/dist/ts/implementation/graphics/figures/rectangle-area.ts +108 -0
  63. package/dist/ts/implementation/graphics/figures/text-element.ts +445 -0
  64. package/dist/ts/implementation/graphics/fonts/enum.ts +385 -0
  65. package/dist/ts/implementation/graphics/fonts/pdf-font-metrics.ts +248 -0
  66. package/dist/ts/implementation/graphics/fonts/pdf-font.ts +316 -0
  67. package/dist/ts/implementation/graphics/fonts/pdf-standard-font-metrics-factory.ts +606 -0
  68. package/dist/ts/implementation/graphics/fonts/pdf-standard-font.ts +243 -0
  69. package/dist/ts/implementation/graphics/fonts/pdf-string-format.ts +474 -0
  70. package/dist/ts/implementation/graphics/fonts/pdf-true-type-font.ts +165 -0
  71. package/dist/ts/implementation/graphics/fonts/rtl/rtl-bidirectional.ts +958 -0
  72. package/dist/ts/implementation/graphics/fonts/rtl/rtl-text-shape.ts +374 -0
  73. package/dist/ts/implementation/graphics/fonts/rtl-renderer.ts +255 -0
  74. package/dist/ts/implementation/graphics/fonts/string-layouter.ts +617 -0
  75. package/dist/ts/implementation/graphics/fonts/string-tokenizer.ts +275 -0
  76. package/dist/ts/implementation/graphics/fonts/ttf-OS2-Table.ts +206 -0
  77. package/dist/ts/implementation/graphics/fonts/ttf-apple-cmap-sub-table.ts +18 -0
  78. package/dist/ts/implementation/graphics/fonts/ttf-cmap-sub-table.ts +18 -0
  79. package/dist/ts/implementation/graphics/fonts/ttf-cmap-table.ts +14 -0
  80. package/dist/ts/implementation/graphics/fonts/ttf-glyph-header.ts +26 -0
  81. package/dist/ts/implementation/graphics/fonts/ttf-glyph-info.ts +35 -0
  82. package/dist/ts/implementation/graphics/fonts/ttf-head-table.ts +94 -0
  83. package/dist/ts/implementation/graphics/fonts/ttf-horizontal-header-table.ts +56 -0
  84. package/dist/ts/implementation/graphics/fonts/ttf-loca-table.ts +10 -0
  85. package/dist/ts/implementation/graphics/fonts/ttf-long-hor-metric.ts +14 -0
  86. package/dist/ts/implementation/graphics/fonts/ttf-metrics.ts +106 -0
  87. package/dist/ts/implementation/graphics/fonts/ttf-microsoft-cmap-sub-table.ts +58 -0
  88. package/dist/ts/implementation/graphics/fonts/ttf-name-record.ts +33 -0
  89. package/dist/ts/implementation/graphics/fonts/ttf-name-table.ts +22 -0
  90. package/dist/ts/implementation/graphics/fonts/ttf-post-table.ts +42 -0
  91. package/dist/ts/implementation/graphics/fonts/ttf-reader.ts +1254 -0
  92. package/dist/ts/implementation/graphics/fonts/ttf-table-info.ts +26 -0
  93. package/dist/ts/implementation/graphics/fonts/ttf-trimmed-cmap-sub-table.ts +26 -0
  94. package/dist/ts/implementation/graphics/fonts/unicode-true-type-font.ts +577 -0
  95. package/dist/ts/implementation/graphics/images/byte-array.ts +137 -0
  96. package/dist/ts/implementation/graphics/images/image-decoder.ts +437 -0
  97. package/dist/ts/implementation/graphics/images/pdf-bitmap.ts +110 -0
  98. package/dist/ts/implementation/graphics/images/pdf-image.ts +132 -0
  99. package/dist/ts/implementation/graphics/pdf-color.ts +478 -0
  100. package/dist/ts/implementation/graphics/pdf-graphics.ts +2424 -0
  101. package/dist/ts/implementation/graphics/pdf-margins.ts +124 -0
  102. package/dist/ts/implementation/graphics/pdf-pen.ts +370 -0
  103. package/dist/ts/implementation/graphics/pdf-resources.ts +300 -0
  104. package/dist/ts/implementation/graphics/pdf-transformation-matrix.ts +246 -0
  105. package/dist/ts/implementation/graphics/pdf-transparency.ts +93 -0
  106. package/dist/ts/implementation/graphics/unit-convertor.ts +96 -0
  107. package/dist/ts/implementation/input-output/big-endian-writer.ts +121 -0
  108. package/dist/ts/implementation/input-output/cross-table.ts +21 -0
  109. package/dist/ts/implementation/input-output/enum.ts +16 -0
  110. package/dist/ts/implementation/input-output/pdf-cross-table.ts +524 -0
  111. package/dist/ts/implementation/input-output/pdf-dictionary-properties.ts +515 -0
  112. package/dist/ts/implementation/input-output/pdf-main-object-collection.ts +194 -0
  113. package/dist/ts/implementation/input-output/pdf-operators.ts +363 -0
  114. package/dist/ts/implementation/input-output/pdf-stream-writer.ts +681 -0
  115. package/dist/ts/implementation/input-output/pdf-writer.ts +88 -0
  116. package/dist/ts/implementation/pages/enum.ts +201 -0
  117. package/dist/ts/implementation/pages/page-added-event-arguments.ts +39 -0
  118. package/dist/ts/implementation/pages/pdf-document-page-collection.ts +180 -0
  119. package/dist/ts/implementation/pages/pdf-page-base.ts +181 -0
  120. package/dist/ts/implementation/pages/pdf-page-layer-collection.ts +348 -0
  121. package/dist/ts/implementation/pages/pdf-page-layer.ts +271 -0
  122. package/dist/ts/implementation/pages/pdf-page-settings.ts +192 -0
  123. package/dist/ts/implementation/pages/pdf-page-size.ts +162 -0
  124. package/dist/ts/implementation/pages/pdf-page-template-element.ts +659 -0
  125. package/dist/ts/implementation/pages/pdf-page.ts +235 -0
  126. package/dist/ts/implementation/pages/pdf-section-collection.ts +187 -0
  127. package/dist/ts/implementation/pages/pdf-section-page-collection.ts +61 -0
  128. package/dist/ts/implementation/pages/pdf-section-templates.ts +96 -0
  129. package/dist/ts/implementation/pages/pdf-section.ts +644 -0
  130. package/dist/ts/implementation/primitives/pdf-array.ts +386 -0
  131. package/dist/ts/implementation/primitives/pdf-boolean.ts +119 -0
  132. package/dist/ts/implementation/primitives/pdf-dictionary.ts +513 -0
  133. package/dist/ts/implementation/primitives/pdf-name.ts +218 -0
  134. package/dist/ts/implementation/primitives/pdf-number.ts +165 -0
  135. package/dist/ts/implementation/primitives/pdf-reference.ts +430 -0
  136. package/dist/ts/implementation/primitives/pdf-stream.ts +336 -0
  137. package/dist/ts/implementation/primitives/pdf-string.ts +397 -0
  138. package/dist/ts/implementation/structured-elements/grid/layout/grid-layouter.ts +2027 -0
  139. package/dist/ts/implementation/structured-elements/grid/pdf-grid-cell.ts +1189 -0
  140. package/dist/ts/implementation/structured-elements/grid/pdf-grid-column.ts +206 -0
  141. package/dist/ts/implementation/structured-elements/grid/pdf-grid-row.ts +470 -0
  142. package/dist/ts/implementation/structured-elements/grid/pdf-grid.ts +853 -0
  143. package/dist/ts/implementation/structured-elements/grid/styles/pdf-borders.ts +240 -0
  144. package/dist/ts/implementation/structured-elements/grid/styles/style.ts +424 -0
  145. package/dist/ts/implementation/structured-elements/tables/light-tables/enum.ts +16 -0
  146. package/dist/ts/interfaces/i-pdf-cache.ts +23 -0
  147. package/dist/ts/interfaces/i-pdf-changable.ts +17 -0
  148. package/dist/ts/interfaces/i-pdf-clonable.ts +12 -0
  149. package/dist/ts/interfaces/i-pdf-primitives.ts +45 -0
  150. package/dist/ts/interfaces/i-pdf-true-type-font.ts +48 -0
  151. package/dist/ts/interfaces/i-pdf-wrapper.ts +13 -0
  152. package/dist/ts/interfaces/i-pdf-writer.ts +29 -0
  153. package/package.json +6 -6
  154. package/CHANGELOG.md +0 -81
@@ -0,0 +1,240 @@
1
+ /**
2
+ * PdfBorders.ts class for EJ2-PDF
3
+ */
4
+ import { PdfPen } from './../../../graphics/pdf-pen';
5
+ import { PdfDashStyle } from './../../../graphics/enum';
6
+ import { PdfColor } from './../../../graphics/pdf-color';
7
+ /**
8
+ * `PdfBorders` class used represents the cell border of the PDF grid.
9
+ */
10
+ export class PdfBorders {
11
+ // Fields
12
+ /**
13
+ * The `left` border.
14
+ * @private
15
+ */
16
+ private leftPen : PdfPen;
17
+ /**
18
+ * The `right` border.
19
+ * @private
20
+ */
21
+ private rightPen : PdfPen;
22
+ /**
23
+ * The `top` border.
24
+ * @private
25
+ */
26
+ private topPen : PdfPen;
27
+ /**
28
+ * The `bottom` border.
29
+ * @private
30
+ */
31
+ private bottomPen : PdfPen;
32
+ // Properties
33
+ /**
34
+ * Gets or sets the `Left`.
35
+ * @private
36
+ */
37
+ public get left() : PdfPen {
38
+ return this.leftPen;
39
+ }
40
+ public set left(value : PdfPen) {
41
+ this.leftPen = value;
42
+ }
43
+ /**
44
+ * Gets or sets the `Right`.
45
+ * @private
46
+ */
47
+ public get right() : PdfPen {
48
+ return this.rightPen;
49
+ }
50
+ public set right(value : PdfPen) {
51
+ this.rightPen = value;
52
+ }
53
+ /**
54
+ * Gets or sets the `Top`.
55
+ * @private
56
+ */
57
+ public get top() : PdfPen {
58
+ return this.topPen;
59
+ }
60
+ public set top(value : PdfPen) {
61
+ this.topPen = value;
62
+ }
63
+ /**
64
+ * Gets or sets the `Bottom`.
65
+ * @private
66
+ */
67
+ public get bottom() : PdfPen {
68
+ return this.bottomPen;
69
+ }
70
+ public set bottom(value : PdfPen) {
71
+ this.bottomPen = value;
72
+ }
73
+ /**
74
+ * sets the `All`.
75
+ * @private
76
+ */
77
+ public set all(value : PdfPen) {
78
+ this.leftPen = this.rightPen = this.topPen = this.bottomPen = value;
79
+ }
80
+ /**
81
+ * Gets a value indicating whether this instance `is all`.
82
+ * @private
83
+ */
84
+ public get isAll() : boolean {
85
+ return ((this.leftPen === this.rightPen) && (this.leftPen === this.topPen) && (this.leftPen === this.bottomPen));
86
+ }
87
+ /**
88
+ * Gets the `default`.
89
+ * @private
90
+ */
91
+ public static get default() : PdfBorders {
92
+ return new PdfBorders();
93
+ }
94
+
95
+ // Constructor
96
+ /**
97
+ * Create a new instance for `PdfBorders` class.
98
+ * @private
99
+ */
100
+ public constructor() {
101
+ let defaultBorderPenLeft : PdfPen = new PdfPen(new PdfColor(0, 0, 0));
102
+ defaultBorderPenLeft.dashStyle = PdfDashStyle.Solid;
103
+ let defaultBorderPenRight : PdfPen = new PdfPen(new PdfColor(0, 0, 0));
104
+ defaultBorderPenRight.dashStyle = PdfDashStyle.Solid;
105
+ let defaultBorderPenTop : PdfPen = new PdfPen(new PdfColor(0, 0, 0));
106
+ defaultBorderPenTop.dashStyle = PdfDashStyle.Solid;
107
+ let defaultBorderPenBottom : PdfPen = new PdfPen(new PdfColor(0, 0, 0));
108
+ defaultBorderPenBottom.dashStyle = PdfDashStyle.Solid;
109
+ this.leftPen = defaultBorderPenLeft;
110
+ this.rightPen = defaultBorderPenRight;
111
+ this.topPen = defaultBorderPenTop;
112
+ this.bottomPen = defaultBorderPenBottom;
113
+ }
114
+ }
115
+ export class PdfPaddings {
116
+ //Fields
117
+ /**
118
+ * The `left` padding.
119
+ * @private
120
+ */
121
+ private leftPad : number;
122
+ /**
123
+ * The `right` padding.
124
+ * @private
125
+ */
126
+ private rightPad : number;
127
+ /**
128
+ * The `top` padding.
129
+ * @private
130
+ */
131
+ private topPad : number;
132
+ /**
133
+ * The `bottom` padding.
134
+ * @private
135
+ */
136
+ private bottomPad : number;
137
+ /**
138
+ * The 'left' border padding set.
139
+ * @private
140
+ */
141
+ public hasLeftPad : boolean = false;
142
+ /**
143
+ * The 'right' border padding set.
144
+ * @private
145
+ */
146
+ public hasRightPad : boolean = false;
147
+ /**
148
+ * The 'top' border padding set.
149
+ * @private
150
+ */
151
+ public hasTopPad : boolean = false;
152
+ /**
153
+ * The 'bottom' border padding set.
154
+ * @private
155
+ */
156
+ public hasBottomPad : boolean = false;
157
+ // Properties
158
+ /**
159
+ * Gets or sets the `left` value of the edge
160
+ * @private
161
+ */
162
+ public get left() : number {
163
+ return this.leftPad;
164
+ }
165
+ public set left(value : number) {
166
+ this.leftPad = value;
167
+ this.hasLeftPad = true;
168
+ }
169
+ /**
170
+ * Gets or sets the `right` value of the edge.
171
+ * @private
172
+ */
173
+ public get right() : number {
174
+ return this.rightPad;
175
+ }
176
+ public set right(value : number) {
177
+ this.rightPad = value;
178
+ this.hasRightPad = true;
179
+ }
180
+ /**
181
+ * Gets or sets the `top` value of the edge
182
+ * @private
183
+ */
184
+ public get top() : number {
185
+ return this.topPad;
186
+ }
187
+ public set top(value : number) {
188
+ this.topPad = value;
189
+ this.hasTopPad = true;
190
+ }
191
+ /**
192
+ * Gets or sets the `bottom` value of the edge.
193
+ * @private
194
+ */
195
+ public get bottom() : number {
196
+ return this.bottomPad;
197
+ }
198
+ public set bottom(value : number) {
199
+ this.bottomPad = value;
200
+ this.hasBottomPad = true;
201
+ }
202
+ /**
203
+ * Sets value to all sides `left,right,top and bottom`.s
204
+ * @private
205
+ */
206
+ public set all(value : number) {
207
+ this.leftPad = this.rightPad = this.topPad = this.bottomPad = value;
208
+ this.hasLeftPad = true;
209
+ this.hasRightPad = true;
210
+ this.hasTopPad = true;
211
+ this.hasBottomPad = true;
212
+ }
213
+ /**
214
+ * Initializes a new instance of the `PdfPaddings` class.
215
+ * @private
216
+ */
217
+ public constructor()
218
+ /**
219
+ * Initializes a new instance of the `PdfPaddings` class.
220
+ * @private
221
+ */
222
+ public constructor(left : number, right : number, top : number, bottom : number)
223
+ public constructor(left ?: number, right ?: number, top ?: number, bottom ?: number) {
224
+ if (typeof left === 'undefined') {
225
+ //5.76 and 0 are taken from ms-word default table margins.
226
+ this.leftPad = this.rightPad = 5.76;
227
+ //0.5 is set for top and bottom by default.
228
+ this.bottomPad = this.topPad = 0.5;
229
+ } else {
230
+ this.leftPad = left;
231
+ this.rightPad = right;
232
+ this.topPad = top;
233
+ this.bottomPad = bottom;
234
+ this.hasLeftPad = true;
235
+ this.hasRightPad = true;
236
+ this.hasTopPad = true;
237
+ this.hasBottomPad = true;
238
+ }
239
+ }
240
+ }
@@ -0,0 +1,424 @@
1
+ /**
2
+ * PdfGridStyleBase.ts class for EJ2-PDF
3
+ */
4
+ import { PdfBrush } from './../../../graphics/brushes/pdf-brush';
5
+ import { PdfPen } from './../../../graphics/pdf-pen';
6
+ import { PdfFont } from './../../../graphics/fonts/pdf-font';
7
+ import { PdfBorders, PdfPaddings } from './pdf-borders';
8
+ import { PdfBorderOverlapStyle } from './../../tables/light-tables/enum';
9
+ import { PdfStringFormat } from './../../../graphics/fonts/pdf-string-format';
10
+ import { PdfGridRow } from './../pdf-grid-row';
11
+ import { PdfImage } from './../../../graphics/images/pdf-image';
12
+ /**
13
+ * Base class for the `grid style`,
14
+ */
15
+ export abstract class PdfGridStyleBase {
16
+ /**
17
+ * @hidden
18
+ * @private
19
+ */
20
+ private gridBackgroundBrush : PdfBrush;
21
+ /**
22
+ * @hidden
23
+ * @private
24
+ */
25
+ private gridTextBrush : PdfBrush;
26
+ /**
27
+ * @hidden
28
+ * @private
29
+ */
30
+ private gridTextPen : PdfPen;
31
+ /**
32
+ * @hidden
33
+ * @private
34
+ */
35
+ private gridFont : PdfFont;
36
+ /**
37
+ * @hidden
38
+ * @private
39
+ */
40
+ private gridBackgroundImage : PdfImage;
41
+ // Properties
42
+ /**
43
+ * Gets or sets the `background brush`.
44
+ * @private
45
+ */
46
+ public get backgroundBrush() : PdfBrush {
47
+ return this.gridBackgroundBrush;
48
+ }
49
+ public set backgroundBrush(value : PdfBrush) {
50
+ this.gridBackgroundBrush = value;
51
+ }
52
+ /**
53
+ * Gets or sets the `text brush`.
54
+ * @private
55
+ */
56
+ public get textBrush() : PdfBrush {
57
+ return this.gridTextBrush;
58
+ }
59
+ public set textBrush(value : PdfBrush) {
60
+ this.gridTextBrush = value;
61
+ }
62
+ /**
63
+ * Gets or sets the `text pen`.
64
+ * @private
65
+ */
66
+ public get textPen() : PdfPen {
67
+ return this.gridTextPen;
68
+ }
69
+ public set textPen(value : PdfPen) {
70
+ this.gridTextPen = value;
71
+ }
72
+ /**
73
+ * Gets or sets the `font`.
74
+ * @private
75
+ */
76
+ public get font() : PdfFont {
77
+ return this.gridFont;
78
+ }
79
+ public set font(value : PdfFont) {
80
+ this.gridFont = value;
81
+ }
82
+ /**
83
+ * Gets or sets the `background Image`.
84
+ * @private
85
+ */
86
+ public get backgroundImage() : PdfImage {
87
+ return this.gridBackgroundImage;
88
+ }
89
+ public set backgroundImage(value : PdfImage) {
90
+ this.gridBackgroundImage = value;
91
+ }
92
+ }
93
+ /**
94
+ * `PdfGridStyle` class provides customization of the appearance for the 'PdfGrid'.
95
+ */
96
+ export class PdfGridStyle extends PdfGridStyleBase {
97
+ //Fields
98
+ /**
99
+ * @hidden
100
+ * @private
101
+ */
102
+ private gridBorderOverlapStyle : PdfBorderOverlapStyle;
103
+ /**
104
+ * @hidden
105
+ * @private
106
+ */
107
+ private gridHorizontalOverflowType : PdfHorizontalOverflowType;
108
+ /**
109
+ * @hidden
110
+ * @private
111
+ */
112
+ private bAllowHorizontalOverflow : boolean;
113
+ /**
114
+ * @hidden
115
+ * @private
116
+ */
117
+ private gridCellPadding : PdfPaddings;
118
+ /**
119
+ * @hidden
120
+ * @private
121
+ */
122
+ private gridCellSpacing : number;
123
+
124
+ //constructor
125
+ /**
126
+ * Initialize a new instance for `PdfGridStyle` class.
127
+ * @private
128
+ */
129
+ public constructor() {
130
+ super();
131
+ this.gridBorderOverlapStyle = PdfBorderOverlapStyle.Overlap;
132
+ this.bAllowHorizontalOverflow = false;
133
+ this.gridHorizontalOverflowType = PdfHorizontalOverflowType.LastPage;
134
+ }
135
+
136
+ //Properties
137
+ /**
138
+ * Gets or sets the `cell spacing` of the 'PdfGrid'.
139
+ * @private
140
+ */
141
+ public get cellSpacing() : number {
142
+ if (typeof this.gridCellSpacing === 'undefined') {
143
+ this.gridCellSpacing = 0;
144
+ }
145
+ return this.gridCellSpacing;
146
+ }
147
+ public set cellSpacing(value : number) {
148
+ this.gridCellSpacing = value;
149
+ }
150
+ /**
151
+ * Gets or sets the type of the `horizontal overflow` of the 'PdfGrid'.
152
+ * @private
153
+ */
154
+ public get horizontalOverflowType() : PdfHorizontalOverflowType {
155
+ return this.gridHorizontalOverflowType;
156
+ }
157
+ public set horizontalOverflowType(value : PdfHorizontalOverflowType) {
158
+ this.gridHorizontalOverflowType = value;
159
+ }
160
+ /**
161
+ * Gets or sets a value indicating whether to `allow horizontal overflow`.
162
+ * @private
163
+ */
164
+ public get allowHorizontalOverflow() : boolean {
165
+ return this.bAllowHorizontalOverflow;
166
+ }
167
+ public set allowHorizontalOverflow(value : boolean) {
168
+ this.bAllowHorizontalOverflow = value;
169
+ }
170
+ /**
171
+ * Gets or sets the `cell padding`.
172
+ * @private
173
+ */
174
+ public get cellPadding() : PdfPaddings {
175
+ if (typeof this.gridCellPadding === 'undefined') {
176
+ this.gridCellPadding = new PdfPaddings();
177
+ }
178
+ return this.gridCellPadding;
179
+ }
180
+ public set cellPadding(value : PdfPaddings) {
181
+ if (typeof this.gridCellPadding === 'undefined') {
182
+ this.gridCellPadding = new PdfPaddings();
183
+ this.gridCellPadding = value;
184
+ } else {
185
+ this.gridCellPadding = value;
186
+ }
187
+ }
188
+ /**
189
+ * Gets or sets the `border overlap style` of the 'PdfGrid'.
190
+ * @private
191
+ */
192
+ public get borderOverlapStyle() : PdfBorderOverlapStyle {
193
+ return this.gridBorderOverlapStyle;
194
+ }
195
+ public set borderOverlapStyle(value : PdfBorderOverlapStyle) {
196
+ this.gridBorderOverlapStyle = value;
197
+ }
198
+ }
199
+ /**
200
+ * `PdfGridCellStyle` class provides customization of the appearance for the 'PdfGridCell'.
201
+ */
202
+ export class PdfGridCellStyle extends PdfGridStyleBase {
203
+ /**
204
+ * @hidden
205
+ * @private
206
+ */
207
+ private gridCellBorders : PdfBorders = PdfBorders.default;
208
+ /**
209
+ * @hidden
210
+ * @private
211
+ */
212
+ private gridCellPadding : PdfPaddings;
213
+ /**
214
+ * @hidden
215
+ * @private
216
+ */
217
+ private format : PdfStringFormat;
218
+ //Properties
219
+ /**
220
+ * Gets the `string format` of the 'PdfGridCell'.
221
+ * @private
222
+ */
223
+ public get stringFormat() : PdfStringFormat {
224
+ return this.format;
225
+ }
226
+ public set stringFormat(value : PdfStringFormat) {
227
+ this.format = value;
228
+ }
229
+ /**
230
+ * Gets or sets the `border` of the 'PdfGridCell'.
231
+ * @private
232
+ */
233
+ public get borders() : PdfBorders {
234
+ return this.gridCellBorders;
235
+ }
236
+ public set borders(value : PdfBorders) {
237
+ this.gridCellBorders = value;
238
+ }
239
+ /**
240
+ * Gets or sets the `cell padding`.
241
+ * @private
242
+ */
243
+ public get cellPadding() : PdfPaddings {
244
+ return this.gridCellPadding;
245
+ }
246
+ public set cellPadding(value : PdfPaddings) {
247
+ if (this.gridCellPadding == null || typeof this.gridCellPadding === 'undefined') {
248
+ this.gridCellPadding = new PdfPaddings();
249
+ }
250
+ this.gridCellPadding = value;
251
+ }
252
+ /**
253
+ * Initializes a new instance of the `PdfGridCellStyle` class.
254
+ * @private
255
+ */
256
+ public constructor() {
257
+ super();
258
+ }
259
+ }
260
+ /**
261
+ * `PdfGridRowStyle` class provides customization of the appearance for the `PdfGridRow`.
262
+ */
263
+ export class PdfGridRowStyle {
264
+ //Fields
265
+ /**
266
+ * @hidden
267
+ * @private
268
+ */
269
+ private gridRowBackgroundBrush : PdfBrush;
270
+ /**
271
+ * @hidden
272
+ * @private
273
+ */
274
+ private gridRowTextBrush : PdfBrush;
275
+ /**
276
+ * @hidden
277
+ * @private
278
+ */
279
+ private gridRowTextPen : PdfPen;
280
+ /**
281
+ * @hidden
282
+ * @private
283
+ */
284
+ private gridRowFont : PdfFont;
285
+ /**
286
+ * Specifies the `border` value of the current row.
287
+ * @private
288
+ */
289
+ private gridRowBorder : PdfBorders;
290
+ /**
291
+ * Specifies the `parent row` of the current object.
292
+ * @private
293
+ */
294
+ private parent : PdfGridRow;
295
+ /**
296
+ * @hidden
297
+ * @private
298
+ */
299
+ private gridRowBackgroundImage : PdfImage;
300
+ // Properties
301
+ /**
302
+ * Gets or sets the `background brush`.
303
+ * @private
304
+ */
305
+ public get backgroundBrush() : PdfBrush {
306
+ return this.gridRowBackgroundBrush;
307
+ }
308
+ public setBackgroundBrush(value : PdfBrush) : void {
309
+ this.gridRowBackgroundBrush = value;
310
+ if (typeof this.parent !== 'undefined') {
311
+ for (let i : number = 0; i < this.parent.cells.count; i++) {
312
+ this.parent.cells.getCell(i).style.backgroundBrush = value;
313
+ }
314
+ }
315
+ }
316
+ /**
317
+ * Gets or sets the `text brush`.
318
+ * @private
319
+ */
320
+ public get textBrush() : PdfBrush {
321
+ return this.gridRowTextBrush;
322
+ }
323
+ public setTextBrush(value : PdfBrush) : void {
324
+ this.gridRowTextBrush = value;
325
+ if (typeof this.parent !== 'undefined') {
326
+ for (let i : number = 0; i < this.parent.cells.count; i++) {
327
+ this.parent.cells.getCell(i).style.textBrush = value;
328
+ }
329
+ }
330
+ }
331
+ /**
332
+ * Gets or sets the `text pen`.
333
+ * @private
334
+ */
335
+ public get textPen() : PdfPen {
336
+ return this.gridRowTextPen;
337
+ }
338
+ public setTextPen(value : PdfPen) : void {
339
+ this.gridRowTextPen = value;
340
+ if (typeof this.parent !== 'undefined') {
341
+ for (let i : number = 0; i < this.parent.cells.count; i++) {
342
+ this.parent.cells.getCell(i).style.textPen = value;
343
+ }
344
+ }
345
+ }
346
+ /**
347
+ * Gets or sets the `font`.
348
+ * @private
349
+ */
350
+ public get font() : PdfFont {
351
+ return this.gridRowFont;
352
+ }
353
+ public setFont(value : PdfFont) : void {
354
+ this.gridRowFont = value;
355
+ if (typeof this.parent !== 'undefined') {
356
+ for (let i : number = 0; i < this.parent.cells.count; i++) {
357
+ this.parent.cells.getCell(i).style.font = value;
358
+ }
359
+ }
360
+ }
361
+ /**
362
+ * Gets or sets the `border` of the current row.
363
+ * @private
364
+ */
365
+ public get border() : PdfBorders {
366
+ if (typeof this.gridRowBorder === 'undefined') {
367
+ this.setBorder(new PdfBorders());
368
+ }
369
+ return this.gridRowBorder;
370
+ }
371
+ public setBorder(value : PdfBorders) : void {
372
+ this.gridRowBorder = value;
373
+ if (typeof this.parent !== 'undefined') {
374
+ for (let i : number = 0; i < this.parent.cells.count; i++) {
375
+ this.parent.cells.getCell(i).style.borders = value;
376
+ }
377
+ }
378
+ }
379
+ /**
380
+ * sets the `parent row` of the current object.
381
+ * @private
382
+ */
383
+ public setParent(parent : PdfGridRow) : void {
384
+ this.parent = parent;
385
+ }
386
+ /**
387
+ * Gets or sets the `backgroundImage` of the 'PdfGridCell'.
388
+ * @private
389
+ */
390
+ public get backgroundImage() : PdfImage {
391
+ return this.gridRowBackgroundImage;
392
+ }
393
+ /**
394
+ * sets the `backgroundImage` of the 'PdfGridCell'.
395
+ * @private
396
+ */
397
+ public setBackgroundImage(value: PdfImage): void {
398
+ this.gridRowBackgroundImage = value;
399
+ }
400
+ // Constructor
401
+ /**
402
+ * Initializes a new instance of the `PdfGridRowStyle` class.
403
+ * @private
404
+ */
405
+ public constructor() {
406
+ //
407
+ }
408
+ }
409
+ /**
410
+ * public Enum for `PdfHorizontalOverflowType`.
411
+ * @private
412
+ */
413
+ export enum PdfHorizontalOverflowType {
414
+ /**
415
+ * Specifies the type of `NextPage`.
416
+ * @private
417
+ */
418
+ NextPage,
419
+ /**
420
+ * Specifies the type of `LastPage`.
421
+ * @private
422
+ */
423
+ LastPage
424
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * public Enum for `PdfBorderOverlapStyle`.
3
+ * @private
4
+ */
5
+ export enum PdfBorderOverlapStyle {
6
+ /**
7
+ * Specifies the type of `Overlap`.
8
+ * @private
9
+ */
10
+ Overlap,
11
+ /**
12
+ * Specifies the type of `Inside`.
13
+ * @private
14
+ */
15
+ Inside,
16
+ }
@@ -0,0 +1,23 @@
1
+ /**
2
+ * `IPdfCache.ts` interface for EJ2-PDF
3
+ * Interface of the objects that support caching of their internals.
4
+ * @private
5
+ */
6
+ import { IPdfPrimitive } from './i-pdf-primitives';
7
+ export interface IPdfCache {
8
+ /**
9
+ * Checks whether the object `is similar to another object`.
10
+ * @private
11
+ */
12
+ equalsTo(obj : IPdfCache) : boolean;
13
+ /**
14
+ * Returns `internals of the object`.
15
+ * @private
16
+ */
17
+ getInternals() : IPdfPrimitive;
18
+ /**
19
+ * Sets `internals of the object`.
20
+ * @private
21
+ */
22
+ setInternals(internals : IPdfPrimitive) : void;
23
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * `IPdfChangable.ts` interface for EJ2-PDF
3
+ * Interface of the objects that support Changable of their internals.
4
+ * @private
5
+ */
6
+ export interface IPdfChangable {
7
+ /**
8
+ * Gets a value indicating whether this 'IPdfChangable' `is changed`.
9
+ * @private
10
+ */
11
+ changed() : boolean;
12
+ /**
13
+ * `Freezes the changes`.
14
+ * @private
15
+ */
16
+ freezeChanges(freezer : Object) : void;
17
+ }