@syncfusion/ej2-pdf-export 26.2.10 → 26.2.14

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 (363) hide show
  1. package/dist/ej2-pdf-export.min.js +10 -0
  2. package/dist/ej2-pdf-export.umd.min.js +2 -2
  3. package/dist/ej2-pdf-export.umd.min.js.map +1 -1
  4. package/dist/es6/ej2-pdf-export.es2015.js +20 -4
  5. package/dist/es6/ej2-pdf-export.es2015.js.map +1 -1
  6. package/dist/es6/ej2-pdf-export.es5.js +20 -4
  7. package/dist/es6/ej2-pdf-export.es5.js.map +1 -1
  8. package/dist/global/ej2-pdf-export.min.js +2 -2
  9. package/dist/global/ej2-pdf-export.min.js.map +1 -1
  10. package/dist/global/index.d.ts +1 -1
  11. package/package.json +5 -5
  12. package/src/implementation/structured-elements/grid/layout/grid-layouter.js +19 -1
  13. package/src/implementation/structured-elements/grid/styles/pdf-borders.js +1 -3
  14. package/dist/ts/implementation/actions/action.d.ts +0 -50
  15. package/dist/ts/implementation/actions/action.ts +0 -76
  16. package/dist/ts/implementation/actions/index.d.ts +0 -6
  17. package/dist/ts/implementation/actions/index.ts +0 -6
  18. package/dist/ts/implementation/actions/uri-action.d.ts +0 -33
  19. package/dist/ts/implementation/actions/uri-action.ts +0 -52
  20. package/dist/ts/implementation/annotations/action-link-annotation.d.ts +0 -30
  21. package/dist/ts/implementation/annotations/action-link-annotation.ts +0 -43
  22. package/dist/ts/implementation/annotations/annotation-collection.d.ts +0 -77
  23. package/dist/ts/implementation/annotations/annotation-collection.ts +0 -159
  24. package/dist/ts/implementation/annotations/annotation.d.ts +0 -152
  25. package/dist/ts/implementation/annotations/annotation.ts +0 -241
  26. package/dist/ts/implementation/annotations/document-link-annotation.d.ts +0 -89
  27. package/dist/ts/implementation/annotations/document-link-annotation.ts +0 -118
  28. package/dist/ts/implementation/annotations/index.d.ts +0 -11
  29. package/dist/ts/implementation/annotations/index.ts +0 -11
  30. package/dist/ts/implementation/annotations/link-annotation.d.ts +0 -23
  31. package/dist/ts/implementation/annotations/link-annotation.ts +0 -32
  32. package/dist/ts/implementation/annotations/pdf-text-web-link.d.ts +0 -118
  33. package/dist/ts/implementation/annotations/pdf-text-web-link.ts +0 -265
  34. package/dist/ts/implementation/annotations/uri-annotation.d.ts +0 -48
  35. package/dist/ts/implementation/annotations/uri-annotation.ts +0 -86
  36. package/dist/ts/implementation/collections/dictionary.d.ts +0 -76
  37. package/dist/ts/implementation/collections/dictionary.ts +0 -150
  38. package/dist/ts/implementation/collections/index.d.ts +0 -7
  39. package/dist/ts/implementation/collections/index.ts +0 -7
  40. package/dist/ts/implementation/collections/object-object-pair/dictionary.d.ts +0 -62
  41. package/dist/ts/implementation/collections/object-object-pair/dictionary.ts +0 -125
  42. package/dist/ts/implementation/collections/object-object-pair/index.d.ts +0 -5
  43. package/dist/ts/implementation/collections/object-object-pair/index.ts +0 -5
  44. package/dist/ts/implementation/collections/utils.d.ts +0 -27
  45. package/dist/ts/implementation/collections/utils.ts +0 -38
  46. package/dist/ts/implementation/document/automatic-fields/automatic-field-info-collection.d.ts +0 -31
  47. package/dist/ts/implementation/document/automatic-fields/automatic-field-info-collection.ts +0 -39
  48. package/dist/ts/implementation/document/automatic-fields/automatic-field-info.d.ts +0 -67
  49. package/dist/ts/implementation/document/automatic-fields/automatic-field-info.ts +0 -108
  50. package/dist/ts/implementation/document/automatic-fields/automatic-field.d.ts +0 -41
  51. package/dist/ts/implementation/document/automatic-fields/automatic-field.ts +0 -127
  52. package/dist/ts/implementation/document/automatic-fields/composite-field.d.ts +0 -46
  53. package/dist/ts/implementation/document/automatic-fields/composite-field.ts +0 -76
  54. package/dist/ts/implementation/document/automatic-fields/index.d.ts +0 -11
  55. package/dist/ts/implementation/document/automatic-fields/index.ts +0 -11
  56. package/dist/ts/implementation/document/automatic-fields/multiple-value-field.d.ts +0 -18
  57. package/dist/ts/implementation/document/automatic-fields/multiple-value-field.ts +0 -37
  58. package/dist/ts/implementation/document/automatic-fields/page-count-field.d.ts +0 -44
  59. package/dist/ts/implementation/document/automatic-fields/page-count-field.ts +0 -75
  60. package/dist/ts/implementation/document/automatic-fields/pdf-numbers-convertor.d.ts +0 -53
  61. package/dist/ts/implementation/document/automatic-fields/pdf-numbers-convertor.ts +0 -157
  62. package/dist/ts/implementation/document/automatic-fields/pdf-page-number-field.d.ts +0 -51
  63. package/dist/ts/implementation/document/automatic-fields/pdf-page-number-field.ts +0 -82
  64. package/dist/ts/implementation/document/automatic-fields/pdf-template-value-pair.d.ts +0 -38
  65. package/dist/ts/implementation/document/automatic-fields/pdf-template-value-pair.ts +0 -60
  66. package/dist/ts/implementation/document/automatic-fields/single-value-field.d.ts +0 -15
  67. package/dist/ts/implementation/document/automatic-fields/single-value-field.ts +0 -48
  68. package/dist/ts/implementation/document/index.d.ts +0 -16
  69. package/dist/ts/implementation/document/index.ts +0 -16
  70. package/dist/ts/implementation/document/pdf-catalog.d.ts +0 -39
  71. package/dist/ts/implementation/document/pdf-catalog.ts +0 -65
  72. package/dist/ts/implementation/document/pdf-document-base.d.ts +0 -132
  73. package/dist/ts/implementation/document/pdf-document-base.ts +0 -180
  74. package/dist/ts/implementation/document/pdf-document-template.d.ts +0 -166
  75. package/dist/ts/implementation/document/pdf-document-template.ts +0 -310
  76. package/dist/ts/implementation/document/pdf-document.d.ts +0 -221
  77. package/dist/ts/implementation/document/pdf-document.ts +0 -342
  78. package/dist/ts/implementation/document/pdf-viewer-preferences.d.ts +0 -467
  79. package/dist/ts/implementation/document/pdf-viewer-preferences.ts +0 -578
  80. package/dist/ts/implementation/drawing/index.d.ts +0 -5
  81. package/dist/ts/implementation/drawing/index.ts +0 -5
  82. package/dist/ts/implementation/drawing/pdf-drawing.d.ts +0 -141
  83. package/dist/ts/implementation/drawing/pdf-drawing.ts +0 -218
  84. package/dist/ts/implementation/general/enum.d.ts +0 -21
  85. package/dist/ts/implementation/general/enum.ts +0 -21
  86. package/dist/ts/implementation/general/functions/index.d.ts +0 -6
  87. package/dist/ts/implementation/general/functions/index.ts +0 -6
  88. package/dist/ts/implementation/general/functions/pdf-function.d.ts +0 -44
  89. package/dist/ts/implementation/general/functions/pdf-function.ts +0 -66
  90. package/dist/ts/implementation/general/functions/pdf-sampled-function.d.ts +0 -25
  91. package/dist/ts/implementation/general/functions/pdf-sampled-function.ts +0 -63
  92. package/dist/ts/implementation/general/index.d.ts +0 -9
  93. package/dist/ts/implementation/general/index.ts +0 -9
  94. package/dist/ts/implementation/general/pdf-cache-collection.d.ts +0 -42
  95. package/dist/ts/implementation/general/pdf-cache-collection.ts +0 -97
  96. package/dist/ts/implementation/general/pdf-collection.d.ts +0 -26
  97. package/dist/ts/implementation/general/pdf-collection.ts +0 -41
  98. package/dist/ts/implementation/general/pdf-destination.d.ts +0 -103
  99. package/dist/ts/implementation/general/pdf-destination.ts +0 -170
  100. package/dist/ts/implementation/graphics/brushes/enum.d.ts +0 -236
  101. package/dist/ts/implementation/graphics/brushes/enum.ts +0 -237
  102. package/dist/ts/implementation/graphics/brushes/index.d.ts +0 -13
  103. package/dist/ts/implementation/graphics/brushes/index.ts +0 -13
  104. package/dist/ts/implementation/graphics/brushes/pdf-blend.d.ts +0 -105
  105. package/dist/ts/implementation/graphics/brushes/pdf-blend.ts +0 -294
  106. package/dist/ts/implementation/graphics/brushes/pdf-brush.d.ts +0 -57
  107. package/dist/ts/implementation/graphics/brushes/pdf-brush.ts +0 -68
  108. package/dist/ts/implementation/graphics/brushes/pdf-brushes.d.ts +0 -726
  109. package/dist/ts/implementation/graphics/brushes/pdf-brushes.ts +0 -2438
  110. package/dist/ts/implementation/graphics/brushes/pdf-color-blend.d.ts +0 -113
  111. package/dist/ts/implementation/graphics/brushes/pdf-color-blend.ts +0 -295
  112. package/dist/ts/implementation/graphics/brushes/pdf-gradient-brush.d.ts +0 -155
  113. package/dist/ts/implementation/graphics/brushes/pdf-gradient-brush.ts +0 -311
  114. package/dist/ts/implementation/graphics/brushes/pdf-linear-gradient-brush.d.ts +0 -147
  115. package/dist/ts/implementation/graphics/brushes/pdf-linear-gradient-brush.ts +0 -406
  116. package/dist/ts/implementation/graphics/brushes/pdf-radial-gradient-brush.d.ts +0 -122
  117. package/dist/ts/implementation/graphics/brushes/pdf-radial-gradient-brush.ts +0 -290
  118. package/dist/ts/implementation/graphics/brushes/pdf-solid-brush.d.ts +0 -77
  119. package/dist/ts/implementation/graphics/brushes/pdf-solid-brush.ts +0 -107
  120. package/dist/ts/implementation/graphics/brushes/pdf-tiling-brush.d.ts +0 -161
  121. package/dist/ts/implementation/graphics/brushes/pdf-tiling-brush.ts +0 -304
  122. package/dist/ts/implementation/graphics/constants.d.ts +0 -31
  123. package/dist/ts/implementation/graphics/constants.ts +0 -31
  124. package/dist/ts/implementation/graphics/enum.d.ts +0 -413
  125. package/dist/ts/implementation/graphics/enum.ts +0 -413
  126. package/dist/ts/implementation/graphics/figures/arc.d.ts +0 -87
  127. package/dist/ts/implementation/graphics/figures/arc.ts +0 -133
  128. package/dist/ts/implementation/graphics/figures/base/draw-element.d.ts +0 -30
  129. package/dist/ts/implementation/graphics/figures/base/draw-element.ts +0 -59
  130. package/dist/ts/implementation/graphics/figures/base/element-layouter.d.ts +0 -161
  131. package/dist/ts/implementation/graphics/figures/base/element-layouter.ts +0 -260
  132. package/dist/ts/implementation/graphics/figures/base/fill-element.d.ts +0 -46
  133. package/dist/ts/implementation/graphics/figures/base/fill-element.ts +0 -72
  134. package/dist/ts/implementation/graphics/figures/base/graphics-element.d.ts +0 -16
  135. package/dist/ts/implementation/graphics/figures/base/graphics-element.ts +0 -34
  136. package/dist/ts/implementation/graphics/figures/base/index.d.ts +0 -9
  137. package/dist/ts/implementation/graphics/figures/base/index.ts +0 -9
  138. package/dist/ts/implementation/graphics/figures/base/pdf-shape-element.d.ts +0 -40
  139. package/dist/ts/implementation/graphics/figures/base/pdf-shape-element.ts +0 -69
  140. package/dist/ts/implementation/graphics/figures/base/shape-layouter.d.ts +0 -131
  141. package/dist/ts/implementation/graphics/figures/base/shape-layouter.ts +0 -276
  142. package/dist/ts/implementation/graphics/figures/base/text-layouter.d.ts +0 -107
  143. package/dist/ts/implementation/graphics/figures/base/text-layouter.ts +0 -205
  144. package/dist/ts/implementation/graphics/figures/ellipse-part.d.ts +0 -48
  145. package/dist/ts/implementation/graphics/figures/ellipse-part.ts +0 -76
  146. package/dist/ts/implementation/graphics/figures/enum.d.ts +0 -79
  147. package/dist/ts/implementation/graphics/figures/enum.ts +0 -80
  148. package/dist/ts/implementation/graphics/figures/index.d.ts +0 -13
  149. package/dist/ts/implementation/graphics/figures/index.ts +0 -13
  150. package/dist/ts/implementation/graphics/figures/layout-element.d.ts +0 -73
  151. package/dist/ts/implementation/graphics/figures/layout-element.ts +0 -132
  152. package/dist/ts/implementation/graphics/figures/path.d.ts +0 -319
  153. package/dist/ts/implementation/graphics/figures/path.ts +0 -646
  154. package/dist/ts/implementation/graphics/figures/pdf-template.d.ts +0 -113
  155. package/dist/ts/implementation/graphics/figures/pdf-template.ts +0 -205
  156. package/dist/ts/implementation/graphics/figures/rectangle-area.d.ts +0 -64
  157. package/dist/ts/implementation/graphics/figures/rectangle-area.ts +0 -108
  158. package/dist/ts/implementation/graphics/figures/text-element.d.ts +0 -213
  159. package/dist/ts/implementation/graphics/figures/text-element.ts +0 -445
  160. package/dist/ts/implementation/graphics/fonts/enum.d.ts +0 -385
  161. package/dist/ts/implementation/graphics/fonts/enum.ts +0 -385
  162. package/dist/ts/implementation/graphics/fonts/index.d.ts +0 -16
  163. package/dist/ts/implementation/graphics/fonts/index.ts +0 -16
  164. package/dist/ts/implementation/graphics/fonts/pdf-font-metrics.d.ts +0 -164
  165. package/dist/ts/implementation/graphics/fonts/pdf-font-metrics.ts +0 -248
  166. package/dist/ts/implementation/graphics/fonts/pdf-font.d.ts +0 -187
  167. package/dist/ts/implementation/graphics/fonts/pdf-font.ts +0 -316
  168. package/dist/ts/implementation/graphics/fonts/pdf-standard-font-metrics-factory.d.ts +0 -301
  169. package/dist/ts/implementation/graphics/fonts/pdf-standard-font-metrics-factory.ts +0 -606
  170. package/dist/ts/implementation/graphics/fonts/pdf-standard-font.d.ts +0 -143
  171. package/dist/ts/implementation/graphics/fonts/pdf-standard-font.ts +0 -243
  172. package/dist/ts/implementation/graphics/fonts/pdf-string-format.d.ts +0 -321
  173. package/dist/ts/implementation/graphics/fonts/pdf-string-format.ts +0 -474
  174. package/dist/ts/implementation/graphics/fonts/pdf-true-type-font.d.ts +0 -49
  175. package/dist/ts/implementation/graphics/fonts/pdf-true-type-font.ts +0 -165
  176. package/dist/ts/implementation/graphics/fonts/rtl/index.d.ts +0 -6
  177. package/dist/ts/implementation/graphics/fonts/rtl/index.ts +0 -6
  178. package/dist/ts/implementation/graphics/fonts/rtl/rtl-bidirectional.d.ts +0 -62
  179. package/dist/ts/implementation/graphics/fonts/rtl/rtl-bidirectional.ts +0 -958
  180. package/dist/ts/implementation/graphics/fonts/rtl/rtl-text-shape.d.ts +0 -68
  181. package/dist/ts/implementation/graphics/fonts/rtl/rtl-text-shape.ts +0 -374
  182. package/dist/ts/implementation/graphics/fonts/rtl-renderer.d.ts +0 -23
  183. package/dist/ts/implementation/graphics/fonts/rtl-renderer.ts +0 -255
  184. package/dist/ts/implementation/graphics/fonts/string-layouter.d.ts +0 -254
  185. package/dist/ts/implementation/graphics/fonts/string-layouter.ts +0 -617
  186. package/dist/ts/implementation/graphics/fonts/string-tokenizer.d.ts +0 -109
  187. package/dist/ts/implementation/graphics/fonts/string-tokenizer.ts +0 -275
  188. package/dist/ts/implementation/graphics/fonts/ttf-OS2-Table.d.ts +0 -204
  189. package/dist/ts/implementation/graphics/fonts/ttf-OS2-Table.ts +0 -206
  190. package/dist/ts/implementation/graphics/fonts/ttf-apple-cmap-sub-table.d.ts +0 -17
  191. package/dist/ts/implementation/graphics/fonts/ttf-apple-cmap-sub-table.ts +0 -18
  192. package/dist/ts/implementation/graphics/fonts/ttf-cmap-sub-table.d.ts +0 -17
  193. package/dist/ts/implementation/graphics/fonts/ttf-cmap-sub-table.ts +0 -18
  194. package/dist/ts/implementation/graphics/fonts/ttf-cmap-table.d.ts +0 -13
  195. package/dist/ts/implementation/graphics/fonts/ttf-cmap-table.ts +0 -14
  196. package/dist/ts/implementation/graphics/fonts/ttf-glyph-header.d.ts +0 -25
  197. package/dist/ts/implementation/graphics/fonts/ttf-glyph-header.ts +0 -26
  198. package/dist/ts/implementation/graphics/fonts/ttf-glyph-info.d.ts +0 -25
  199. package/dist/ts/implementation/graphics/fonts/ttf-glyph-info.ts +0 -35
  200. package/dist/ts/implementation/graphics/fonts/ttf-head-table.d.ts +0 -94
  201. package/dist/ts/implementation/graphics/fonts/ttf-head-table.ts +0 -94
  202. package/dist/ts/implementation/graphics/fonts/ttf-horizontal-header-table.d.ts +0 -55
  203. package/dist/ts/implementation/graphics/fonts/ttf-horizontal-header-table.ts +0 -56
  204. package/dist/ts/implementation/graphics/fonts/ttf-loca-table.d.ts +0 -9
  205. package/dist/ts/implementation/graphics/fonts/ttf-loca-table.ts +0 -10
  206. package/dist/ts/implementation/graphics/fonts/ttf-long-hor-metric.d.ts +0 -13
  207. package/dist/ts/implementation/graphics/fonts/ttf-long-hor-metric.ts +0 -14
  208. package/dist/ts/implementation/graphics/fonts/ttf-metrics.d.ts +0 -101
  209. package/dist/ts/implementation/graphics/fonts/ttf-metrics.ts +0 -106
  210. package/dist/ts/implementation/graphics/fonts/ttf-microsoft-cmap-sub-table.d.ts +0 -57
  211. package/dist/ts/implementation/graphics/fonts/ttf-microsoft-cmap-sub-table.ts +0 -58
  212. package/dist/ts/implementation/graphics/fonts/ttf-name-record.d.ts +0 -33
  213. package/dist/ts/implementation/graphics/fonts/ttf-name-record.ts +0 -33
  214. package/dist/ts/implementation/graphics/fonts/ttf-name-table.d.ts +0 -22
  215. package/dist/ts/implementation/graphics/fonts/ttf-name-table.ts +0 -22
  216. package/dist/ts/implementation/graphics/fonts/ttf-post-table.d.ts +0 -41
  217. package/dist/ts/implementation/graphics/fonts/ttf-post-table.ts +0 -42
  218. package/dist/ts/implementation/graphics/fonts/ttf-reader.d.ts +0 -225
  219. package/dist/ts/implementation/graphics/fonts/ttf-reader.ts +0 -1254
  220. package/dist/ts/implementation/graphics/fonts/ttf-table-info.d.ts +0 -22
  221. package/dist/ts/implementation/graphics/fonts/ttf-table-info.ts +0 -26
  222. package/dist/ts/implementation/graphics/fonts/ttf-trimmed-cmap-sub-table.d.ts +0 -25
  223. package/dist/ts/implementation/graphics/fonts/ttf-trimmed-cmap-sub-table.ts +0 -26
  224. package/dist/ts/implementation/graphics/fonts/unicode-true-type-font.d.ts +0 -213
  225. package/dist/ts/implementation/graphics/fonts/unicode-true-type-font.ts +0 -577
  226. package/dist/ts/implementation/graphics/images/byte-array.d.ts +0 -74
  227. package/dist/ts/implementation/graphics/images/byte-array.ts +0 -137
  228. package/dist/ts/implementation/graphics/images/image-decoder.d.ts +0 -274
  229. package/dist/ts/implementation/graphics/images/image-decoder.ts +0 -439
  230. package/dist/ts/implementation/graphics/images/index.d.ts +0 -8
  231. package/dist/ts/implementation/graphics/images/index.ts +0 -8
  232. package/dist/ts/implementation/graphics/images/pdf-bitmap.d.ts +0 -90
  233. package/dist/ts/implementation/graphics/images/pdf-bitmap.ts +0 -110
  234. package/dist/ts/implementation/graphics/images/pdf-image.d.ts +0 -88
  235. package/dist/ts/implementation/graphics/images/pdf-image.ts +0 -132
  236. package/dist/ts/implementation/graphics/index.d.ts +0 -35
  237. package/dist/ts/implementation/graphics/index.ts +0 -46
  238. package/dist/ts/implementation/graphics/pdf-color.d.ts +0 -206
  239. package/dist/ts/implementation/graphics/pdf-color.ts +0 -478
  240. package/dist/ts/implementation/graphics/pdf-graphics.d.ts +0 -1210
  241. package/dist/ts/implementation/graphics/pdf-graphics.ts +0 -2554
  242. package/dist/ts/implementation/graphics/pdf-margins.d.ts +0 -82
  243. package/dist/ts/implementation/graphics/pdf-margins.ts +0 -124
  244. package/dist/ts/implementation/graphics/pdf-pen.d.ts +0 -237
  245. package/dist/ts/implementation/graphics/pdf-pen.ts +0 -370
  246. package/dist/ts/implementation/graphics/pdf-resources.d.ts +0 -122
  247. package/dist/ts/implementation/graphics/pdf-resources.ts +0 -300
  248. package/dist/ts/implementation/graphics/pdf-transformation-matrix.d.ts +0 -143
  249. package/dist/ts/implementation/graphics/pdf-transformation-matrix.ts +0 -246
  250. package/dist/ts/implementation/graphics/pdf-transparency.d.ts +0 -34
  251. package/dist/ts/implementation/graphics/pdf-transparency.ts +0 -93
  252. package/dist/ts/implementation/graphics/unit-convertor.d.ts +0 -72
  253. package/dist/ts/implementation/graphics/unit-convertor.ts +0 -96
  254. package/dist/ts/implementation/index.d.ts +0 -103
  255. package/dist/ts/implementation/index.ts +0 -103
  256. package/dist/ts/implementation/input-output/big-endian-writer.d.ts +0 -59
  257. package/dist/ts/implementation/input-output/big-endian-writer.ts +0 -121
  258. package/dist/ts/implementation/input-output/cross-table.d.ts +0 -21
  259. package/dist/ts/implementation/input-output/cross-table.ts +0 -21
  260. package/dist/ts/implementation/input-output/enum.d.ts +0 -16
  261. package/dist/ts/implementation/input-output/enum.ts +0 -16
  262. package/dist/ts/implementation/input-output/index.d.ts +0 -12
  263. package/dist/ts/implementation/input-output/index.ts +0 -12
  264. package/dist/ts/implementation/input-output/pdf-cross-table.d.ts +0 -249
  265. package/dist/ts/implementation/input-output/pdf-cross-table.ts +0 -524
  266. package/dist/ts/implementation/input-output/pdf-dictionary-properties.d.ts +0 -568
  267. package/dist/ts/implementation/input-output/pdf-dictionary-properties.ts +0 -571
  268. package/dist/ts/implementation/input-output/pdf-main-object-collection.d.ts +0 -120
  269. package/dist/ts/implementation/input-output/pdf-main-object-collection.ts +0 -194
  270. package/dist/ts/implementation/input-output/pdf-operators.d.ts +0 -361
  271. package/dist/ts/implementation/input-output/pdf-operators.ts +0 -363
  272. package/dist/ts/implementation/input-output/pdf-stream-writer.d.ts +0 -311
  273. package/dist/ts/implementation/input-output/pdf-stream-writer.ts +0 -681
  274. package/dist/ts/implementation/input-output/pdf-writer.d.ts +0 -68
  275. package/dist/ts/implementation/input-output/pdf-writer.ts +0 -88
  276. package/dist/ts/implementation/pages/enum.d.ts +0 -201
  277. package/dist/ts/implementation/pages/enum.ts +0 -201
  278. package/dist/ts/implementation/pages/index.d.ts +0 -17
  279. package/dist/ts/implementation/pages/index.ts +0 -17
  280. package/dist/ts/implementation/pages/page-added-event-arguments.d.ts +0 -30
  281. package/dist/ts/implementation/pages/page-added-event-arguments.ts +0 -39
  282. package/dist/ts/implementation/pages/pdf-document-page-collection.d.ts +0 -86
  283. package/dist/ts/implementation/pages/pdf-document-page-collection.ts +0 -180
  284. package/dist/ts/implementation/pages/pdf-page-base.d.ts +0 -121
  285. package/dist/ts/implementation/pages/pdf-page-base.ts +0 -181
  286. package/dist/ts/implementation/pages/pdf-page-layer-collection.d.ts +0 -99
  287. package/dist/ts/implementation/pages/pdf-page-layer-collection.ts +0 -348
  288. package/dist/ts/implementation/pages/pdf-page-layer.d.ts +0 -160
  289. package/dist/ts/implementation/pages/pdf-page-layer.ts +0 -271
  290. package/dist/ts/implementation/pages/pdf-page-settings.d.ts +0 -111
  291. package/dist/ts/implementation/pages/pdf-page-settings.ts +0 -192
  292. package/dist/ts/implementation/pages/pdf-page-size.d.ts +0 -159
  293. package/dist/ts/implementation/pages/pdf-page-size.ts +0 -162
  294. package/dist/ts/implementation/pages/pdf-page-template-element.d.ts +0 -240
  295. package/dist/ts/implementation/pages/pdf-page-template-element.ts +0 -663
  296. package/dist/ts/implementation/pages/pdf-page.d.ts +0 -153
  297. package/dist/ts/implementation/pages/pdf-page.ts +0 -235
  298. package/dist/ts/implementation/pages/pdf-section-collection.d.ts +0 -109
  299. package/dist/ts/implementation/pages/pdf-section-collection.ts +0 -187
  300. package/dist/ts/implementation/pages/pdf-section-page-collection.d.ts +0 -41
  301. package/dist/ts/implementation/pages/pdf-section-page-collection.ts +0 -61
  302. package/dist/ts/implementation/pages/pdf-section-templates.d.ts +0 -64
  303. package/dist/ts/implementation/pages/pdf-section-templates.ts +0 -96
  304. package/dist/ts/implementation/pages/pdf-section.d.ts +0 -327
  305. package/dist/ts/implementation/pages/pdf-section.ts +0 -644
  306. package/dist/ts/implementation/primitives/index.d.ts +0 -12
  307. package/dist/ts/implementation/primitives/index.ts +0 -12
  308. package/dist/ts/implementation/primitives/pdf-array.d.ts +0 -192
  309. package/dist/ts/implementation/primitives/pdf-array.ts +0 -386
  310. package/dist/ts/implementation/primitives/pdf-boolean.d.ts +0 -84
  311. package/dist/ts/implementation/primitives/pdf-boolean.ts +0 -119
  312. package/dist/ts/implementation/primitives/pdf-dictionary.d.ts +0 -362
  313. package/dist/ts/implementation/primitives/pdf-dictionary.ts +0 -513
  314. package/dist/ts/implementation/primitives/pdf-name.d.ts +0 -121
  315. package/dist/ts/implementation/primitives/pdf-name.ts +0 -218
  316. package/dist/ts/implementation/primitives/pdf-number.d.ts +0 -104
  317. package/dist/ts/implementation/primitives/pdf-number.ts +0 -165
  318. package/dist/ts/implementation/primitives/pdf-reference.d.ts +0 -223
  319. package/dist/ts/implementation/primitives/pdf-reference.ts +0 -430
  320. package/dist/ts/implementation/primitives/pdf-stream.d.ts +0 -161
  321. package/dist/ts/implementation/primitives/pdf-stream.ts +0 -306
  322. package/dist/ts/implementation/primitives/pdf-string.d.ts +0 -235
  323. package/dist/ts/implementation/primitives/pdf-string.ts +0 -397
  324. package/dist/ts/implementation/structured-elements/grid/index.d.ts +0 -4
  325. package/dist/ts/implementation/structured-elements/grid/index.ts +0 -10
  326. package/dist/ts/implementation/structured-elements/grid/layout/grid-layouter.d.ts +0 -597
  327. package/dist/ts/implementation/structured-elements/grid/layout/grid-layouter.ts +0 -2029
  328. package/dist/ts/implementation/structured-elements/grid/pdf-grid-cell.d.ts +0 -288
  329. package/dist/ts/implementation/structured-elements/grid/pdf-grid-cell.ts +0 -1194
  330. package/dist/ts/implementation/structured-elements/grid/pdf-grid-column.d.ts +0 -108
  331. package/dist/ts/implementation/structured-elements/grid/pdf-grid-column.ts +0 -206
  332. package/dist/ts/implementation/structured-elements/grid/pdf-grid-row.d.ts +0 -261
  333. package/dist/ts/implementation/structured-elements/grid/pdf-grid-row.ts +0 -470
  334. package/dist/ts/implementation/structured-elements/grid/pdf-grid.d.ts +0 -292
  335. package/dist/ts/implementation/structured-elements/grid/pdf-grid.ts +0 -853
  336. package/dist/ts/implementation/structured-elements/grid/styles/index.d.ts +0 -5
  337. package/dist/ts/implementation/structured-elements/grid/styles/index.ts +0 -5
  338. package/dist/ts/implementation/structured-elements/grid/styles/pdf-borders.d.ts +0 -146
  339. package/dist/ts/implementation/structured-elements/grid/styles/pdf-borders.ts +0 -240
  340. package/dist/ts/implementation/structured-elements/grid/styles/style.d.ts +0 -272
  341. package/dist/ts/implementation/structured-elements/grid/styles/style.ts +0 -424
  342. package/dist/ts/implementation/structured-elements/index.d.ts +0 -4
  343. package/dist/ts/implementation/structured-elements/index.ts +0 -10
  344. package/dist/ts/implementation/structured-elements/tables/light-tables/enum.d.ts +0 -16
  345. package/dist/ts/implementation/structured-elements/tables/light-tables/enum.ts +0 -16
  346. package/dist/ts/index.d.ts +0 -116
  347. package/dist/ts/index.ts +0 -116
  348. package/dist/ts/interfaces/i-pdf-cache.d.ts +0 -23
  349. package/dist/ts/interfaces/i-pdf-cache.ts +0 -23
  350. package/dist/ts/interfaces/i-pdf-changable.d.ts +0 -17
  351. package/dist/ts/interfaces/i-pdf-changable.ts +0 -17
  352. package/dist/ts/interfaces/i-pdf-clonable.d.ts +0 -12
  353. package/dist/ts/interfaces/i-pdf-clonable.ts +0 -12
  354. package/dist/ts/interfaces/i-pdf-primitives.d.ts +0 -45
  355. package/dist/ts/interfaces/i-pdf-primitives.ts +0 -45
  356. package/dist/ts/interfaces/i-pdf-true-type-font.d.ts +0 -18
  357. package/dist/ts/interfaces/i-pdf-true-type-font.ts +0 -48
  358. package/dist/ts/interfaces/i-pdf-wrapper.d.ts +0 -13
  359. package/dist/ts/interfaces/i-pdf-wrapper.ts +0 -13
  360. package/dist/ts/interfaces/i-pdf-writer.d.ts +0 -29
  361. package/dist/ts/interfaces/i-pdf-writer.ts +0 -29
  362. package/dist/ts/interfaces/index.d.ts +0 -10
  363. package/dist/ts/interfaces/index.ts +0 -10
@@ -1,1194 +0,0 @@
1
- /**
2
- * `PdfGridCell.ts` class for EJ2-PDF
3
- */
4
- import { PdfGridRow } from './pdf-grid-row';
5
- import { PdfGrid } from './pdf-grid';
6
- import { PdfGridCellStyle } from './styles/style';
7
- import { PdfStringLayouter, PdfStringLayoutResult } from './../../graphics/fonts/string-layouter';
8
- import { PdfDocument } from './../../document/pdf-document';
9
- import { PdfFont } from './../../graphics/fonts/pdf-font';
10
- import { PdfBrush } from './../../graphics/brushes/pdf-brush';
11
- import { PdfPen } from './../../graphics/pdf-pen';
12
- import { PdfStringFormat } from './../../graphics/fonts/pdf-string-format';
13
- import { RectangleF, PointF, SizeF } from './../../drawing/pdf-drawing';
14
- import { PdfGraphics } from './../../graphics/pdf-graphics';
15
- import { PdfDashStyle, PdfLineCap } from './../../graphics/enum';
16
- import { PdfBorderOverlapStyle } from './../tables/light-tables/enum';
17
- import { PdfSolidBrush } from './../../graphics/brushes/pdf-solid-brush';
18
- import { PdfColor } from './../../graphics/pdf-color';
19
- import { PdfImage } from './../../graphics/images/pdf-image';
20
- import { PdfBitmap } from './../../graphics/images/pdf-bitmap';
21
- import { PdfTextWebLink } from './../../annotations/pdf-text-web-link';
22
- import { PdfPage } from './../../pages/pdf-page';
23
- import { PdfLayoutType } from './../../graphics/figures/enum';
24
- import { PdfGridLayouter , PdfGridLayoutFormat } from './../../structured-elements/grid/layout/grid-layouter';
25
- import { PdfLayoutParams, PdfLayoutResult, PdfLayoutFormat } from '../../../implementation/graphics/figures/base/element-layouter';
26
- /**
27
- * `PdfGridCell` class represents the schema of a cell in a 'PdfGrid'.
28
- */
29
- export class PdfGridCell {
30
- //Fields
31
- _rowHeight: number;
32
- /**
33
- * The `row span`.
34
- * @private
35
- */
36
- private gridRowSpan : number;
37
- /**
38
- * The `column span`.
39
- * @private
40
- */
41
- private colSpan : number;
42
- /**
43
- * Specifies the current `row`.
44
- * @private
45
- */
46
- private gridRow : PdfGridRow;
47
- /**
48
- * The actual `value` of the cell.
49
- * @private
50
- */
51
- private objectValue : Object;
52
- /**
53
- * Current cell `style`.
54
- * @private
55
- */
56
- private cellStyle : PdfGridCellStyle;
57
- /**
58
- * `Width` of the cell.
59
- * @default 0
60
- * @private
61
- */
62
- private cellWidth : number = 0;
63
- /**
64
- * `Height` of the cell.
65
- * @default 0
66
- * @private
67
- */
68
- private cellHeight : number = 0;
69
- /**
70
- * `tempval`to stores current width .
71
- * @default 0
72
- * @private
73
- */
74
- private tempval : number = 0;
75
- private fontSpilt : boolean = false;
76
- /**
77
- * The `remaining string`.
78
- * @private
79
- */
80
- private remaining : string;
81
- /**
82
- * Specifies weather the `cell is drawn`.
83
- * @default true
84
- * @private
85
- */
86
- private finsh : boolean = true;
87
- /**
88
- * 'parent ' of the grid cell.
89
- * @private
90
- */
91
- private parent : PdfGridCell ;
92
- /**
93
- * `StringFormat` of the cell.
94
- * @private
95
- */
96
- private format : PdfStringFormat;
97
- /**
98
- * The `remaining height` of row span.
99
- * @default 0
100
- * @private
101
- */
102
- public rowSpanRemainingHeight : number = 0;
103
- private internalIsCellMergeContinue : boolean;
104
- private internalIsRowMergeContinue : boolean;
105
- private internalIsCellMergeStart : boolean;
106
- private internalIsRowMergeStart : boolean;
107
- public hasRowSpan : boolean = false;
108
- public hasColSpan : boolean = false;
109
- /**
110
- * the 'isFinish' is set to page finish
111
- */
112
- private isFinish : boolean = true;
113
- /**
114
- * The `present' to store the current cell.
115
- * @default false
116
- * @private
117
- */
118
- public present : boolean = false;
119
- /**
120
- * The `Count` of the page.
121
- * @private
122
- */
123
- public pageCount : number ;
124
- //constructor
125
- /**
126
- * Initializes a new instance of the `PdfGridCell` class.
127
- * @private
128
- */
129
- public constructor()
130
- /**
131
- * Initializes a new instance of the `PdfGridCell` class.
132
- * @private
133
- */
134
- public constructor(row : PdfGridRow)
135
- public constructor(row ?: PdfGridRow) {
136
- this.gridRowSpan = 1;
137
- this.colSpan = 1;
138
- if (typeof row !== 'undefined') {
139
- this.gridRow = row;
140
- }
141
- }
142
- //Properties
143
- public get isCellMergeContinue() : boolean {
144
- return this.internalIsCellMergeContinue;
145
- }
146
- public set isCellMergeContinue(value : boolean) {
147
- this.internalIsCellMergeContinue = value;
148
- }
149
- public get isRowMergeContinue() : boolean {
150
- return this.internalIsRowMergeContinue;
151
- }
152
- public set isRowMergeContinue(value : boolean) {
153
- this.internalIsRowMergeContinue = value;
154
- }
155
- public get isCellMergeStart() : boolean {
156
- return this.internalIsCellMergeStart;
157
- }
158
- public set isCellMergeStart(value : boolean) {
159
- this.internalIsCellMergeStart = value;
160
- }
161
- public get isRowMergeStart() : boolean {
162
- return this.internalIsRowMergeStart;
163
- }
164
- public set isRowMergeStart(value : boolean) {
165
- this.internalIsRowMergeStart = value;
166
- }
167
- /**
168
- * Gets or sets the `remaining string` after the row split between pages.
169
- * @private
170
- */
171
- public get remainingString() : string {
172
- return this.remaining;
173
- }
174
- public set remainingString(value : string) {
175
- this.remaining = value;
176
- }
177
- /**
178
- * Gets or sets the `FinishedDrawingCell` .
179
- * @private
180
- */
181
- public get FinishedDrawingCell() : boolean {
182
- return this.isFinish;
183
- }
184
- public set FinishedDrawingCell(value : boolean) {
185
- this.isFinish = value;
186
- }
187
- /**
188
- * Gets or sets the `string format`.
189
- * @private
190
- */
191
- public get stringFormat() : PdfStringFormat {
192
- if (this.format == null) {
193
- this.format = new PdfStringFormat();
194
- }
195
- return this.format;
196
- }
197
- public set stringFormat(value : PdfStringFormat) {
198
- this.format = value;
199
- }
200
- /**
201
- * Gets or sets the parent `row`.
202
- * @private
203
- */
204
- public get row() : PdfGridRow {
205
- return this.gridRow;
206
- }
207
- public set row(value : PdfGridRow) {
208
- this.gridRow = value;
209
- }
210
- /**
211
- * Gets or sets the `value` of the cell.
212
- * @private
213
- */
214
- public get value() : Object {
215
- return this.objectValue;
216
- }
217
- public set value(value : Object) {
218
- this.objectValue = value;
219
- if (this.objectValue instanceof PdfGrid) {
220
- this.row.grid.isSingleGrid = false;
221
- let grid : PdfGrid = this.objectValue as PdfGrid;
222
- grid.ParentCell = this;
223
- (this.objectValue as PdfGrid).isChildGrid = true;
224
- let rowCount : number = this.row.grid.rows.count;
225
- for (let i : number = 0; i < rowCount; i++) {
226
- let row : PdfGridRow = this.row.grid.rows.getRow(i);
227
- let colCount : number = row.cells.count;
228
- for (let j : number = 0; j < colCount; j++) {
229
- let cell : PdfGridCell = row.cells.getCell(j);
230
- cell.parent = this;
231
- }
232
- }
233
- }
234
- }
235
- /**
236
- * Gets or sets a value that indicates the total number of rows that cell `spans` within a PdfGrid.
237
- * @private
238
- */
239
- public get rowSpan() : number {
240
- return this.gridRowSpan;
241
- }
242
- public set rowSpan(value : number) {
243
- if (value < 1) {
244
- throw new Error('ArgumentException : Invalid span specified, must be greater than or equal to 1');
245
- } else {
246
- this.gridRowSpan = value;
247
- this.row.rowSpanExists = true;
248
- this.row.grid.hasRowSpanSpan = true;
249
- }
250
- }
251
- /**
252
- * Gets or sets the cell `style`.
253
- * @private
254
- */
255
- public get style() : PdfGridCellStyle {
256
- if (this.cellStyle == null) {
257
- this.cellStyle = new PdfGridCellStyle();
258
- }
259
- return this.cellStyle;
260
- }
261
- public set style(value : PdfGridCellStyle) {
262
- this.cellStyle = value;
263
- }
264
- /**
265
- * Gets the `height` of the PdfGrid cell.[Read-Only].
266
- * @private
267
- */
268
- public get height() : number {
269
- if (this.cellHeight === 0) {
270
- this.cellHeight = this.measureHeight();
271
- }
272
- return this.cellHeight;
273
- }
274
- public set height(value : number) {
275
- this.cellHeight = value;
276
- }
277
- /**
278
- * Gets or sets a value that indicates the total number of columns that cell `spans` within a PdfGrid.
279
- * @private
280
- */
281
- public get columnSpan() : number {
282
- return this.colSpan;
283
- }
284
- public set columnSpan(value : number) {
285
- if (value < 1) {
286
- throw Error('Invalid span specified, must be greater than or equal to 1');
287
- } else {
288
- this.colSpan = value;
289
- this.row.columnSpanExists = true;
290
- }
291
- }
292
- /**
293
- * Gets the `width` of the PdfGrid cell.[Read-Only].
294
- * @private
295
- */
296
- public get width() : number {
297
- if (this.cellWidth === 0 || this.row.grid.isComplete) {
298
- this.cellWidth = this.measureWidth();
299
- }
300
- return Math.round(this.cellWidth);
301
- }
302
- public set width(value : number) {
303
- this.cellWidth = value;
304
- }
305
- //Implementation
306
- /**
307
- * `Calculates the width`.
308
- * @private
309
- */
310
- private measureWidth() : number {
311
- // .. Calculate the cell text width.
312
- // .....Add border widths, cell spacings and paddings to the width.
313
- let width : number = 0;
314
- let layouter : PdfStringLayouter = new PdfStringLayouter();
315
- if (typeof this.objectValue === 'string') {
316
- /* tslint:disable */
317
- let slr : PdfStringLayoutResult = layouter.layout((this.objectValue as string), this.getTextFont(), this.stringFormat, new SizeF(Number.MAX_VALUE, Number.MAX_VALUE), false, new SizeF(0, 0));
318
- width += slr.actualSize.width;
319
- width += (this.style.borders.left.width + this.style.borders.right.width) * 2;
320
- } else if (this.objectValue instanceof PdfGrid) {
321
- width = (this.objectValue as PdfGrid).size.width;
322
- //width += this.objectValue.style.cellSpacing;
323
- } else if (this.objectValue instanceof PdfImage || this.objectValue instanceof PdfBitmap) {
324
- width += (this.objectValue as PdfImage).width;
325
- } else if (this.objectValue instanceof PdfTextWebLink) {
326
- let webLink : PdfTextWebLink = this.objectValue as PdfTextWebLink;
327
- let result : PdfStringLayoutResult = layouter.layout(webLink.text, webLink.font, webLink.stringFormat, new SizeF(0, 0), false, new SizeF(0, 0));
328
- /* tslint:enable */
329
- width += result.actualSize.width;
330
- width += (this.style.borders.left.width + this.style.borders.right.width) * 2;
331
- }
332
- if (!(this.objectValue instanceof PdfGrid)) {
333
- if (this.style.cellPadding != null) {
334
- width += (this.style.cellPadding.left + this.style.cellPadding.right);
335
- } else {
336
- width += (this.row.grid.style.cellPadding.left + this.row.grid.style.cellPadding.right);
337
- }
338
- } else {
339
- if (this.style.cellPadding != null || typeof this.style.cellPadding !== 'undefined') {
340
- if (typeof this.style.cellPadding.left !== 'undefined' && this.style.cellPadding.hasLeftPad) {
341
- width += this.style.cellPadding.left;
342
- }
343
- if (typeof this.style.cellPadding.right !== 'undefined' && this.style.cellPadding.hasRightPad) {
344
- width += this.style.cellPadding.right;
345
- }
346
- } else {
347
- if (typeof this.row.grid.style.cellPadding.left !== 'undefined' && this.row.grid.style.cellPadding.hasLeftPad) {
348
- width += this.row.grid.style.cellPadding.left;
349
- }
350
- if (typeof this.row.grid.style.cellPadding.right !== 'undefined' && this.row.grid.style.cellPadding.hasRightPad) {
351
- width += this.row.grid.style.cellPadding.right;
352
- }
353
- }
354
- }
355
- width += this.row.grid.style.cellSpacing;
356
- return width;
357
- }
358
- /**
359
- * Draw the `cell background`.
360
- * @private
361
- */
362
- public drawCellBackground(graphics : PdfGraphics, bounds : RectangleF) : void {
363
- let backgroundBrush : PdfBrush = this.getBackgroundBrush();
364
- //graphics.isTemplateGraphics = true;
365
- if (backgroundBrush != null) {
366
- graphics.save();
367
- graphics.drawRectangle(backgroundBrush, bounds.x, bounds.y, bounds.width, bounds.height);
368
- graphics.restore();
369
- }
370
- if (this.style.backgroundImage != null) {
371
- let image : PdfImage = this.getBackgroundImage();
372
- graphics.drawImage(this.style.backgroundImage, bounds.x, bounds.y, bounds.width, bounds.height);
373
- }
374
- }
375
- /**
376
- * `Adjusts the text layout area`.
377
- * @private
378
- */
379
- /* tslint:disable */
380
- private adjustContentLayoutArea(bounds : RectangleF) : RectangleF {
381
- //Add Padding value to its Cell Bounds
382
- let returnBounds : RectangleF = new RectangleF(bounds.x, bounds.y, bounds.width, bounds.height);
383
- if (!(this.objectValue instanceof PdfGrid))
384
- {
385
- if (typeof this.style.cellPadding === 'undefined' || this.style.cellPadding == null) {
386
- returnBounds.x += this.gridRow.grid.style.cellPadding.left + this.cellStyle.borders.left.width;
387
- returnBounds.y += this.gridRow.grid.style.cellPadding.top + this.cellStyle.borders.top.width;
388
- returnBounds.width -= (this.gridRow.grid.style.cellPadding.right + this.gridRow.grid.style.cellPadding.left);
389
- returnBounds.height -= (this.gridRow.grid.style.cellPadding.bottom + this.gridRow.grid.style.cellPadding.top);
390
- returnBounds.height -= (this.cellStyle.borders.top.width + this.cellStyle.borders.bottom.width);
391
- } else {
392
- returnBounds.x += this.style.cellPadding.left + this.cellStyle.borders.left.width;
393
- returnBounds.y += this.style.cellPadding.top + this.cellStyle.borders.top.width;
394
- returnBounds.width -= (this.style.cellPadding.right + this.style.cellPadding.left);
395
- returnBounds.width -= (this.cellStyle.borders.left.width + this.cellStyle.borders.right.width);
396
- returnBounds.height -= (this.style.cellPadding.bottom + this.style.cellPadding.top);
397
- returnBounds.height -= (this.cellStyle.borders.top.width + this.cellStyle.borders.bottom.width);
398
- if (this.rowSpan === 1) {
399
- returnBounds.width -= (this.style.borders.left.width);
400
- }
401
- }
402
- }
403
- else{
404
- if (this.style.cellPadding == null || typeof this.style.cellPadding === 'undefined')
405
- {
406
- if(typeof this.gridRow.grid.style.cellPadding.left !== 'undefined' && this.gridRow.grid.style.cellPadding.hasLeftPad){
407
- returnBounds.x += this.gridRow.grid.style.cellPadding.left + this.cellStyle.borders.left.width;
408
- returnBounds.width -= this.gridRow.grid.style.cellPadding.left;
409
- }
410
- if(typeof this.gridRow.grid.style.cellPadding.top !== 'undefined' && this.gridRow.grid.style.cellPadding.hasTopPad){
411
- returnBounds.y += this.gridRow.grid.style.cellPadding.top + this.cellStyle.borders.top.width;
412
- returnBounds.height -= this.gridRow.grid.style.cellPadding.top;
413
- }
414
- if(typeof this.gridRow.grid.style.cellPadding.right !== 'undefined' && this.gridRow.grid.style.cellPadding.hasRightPad){
415
- returnBounds.width -= this.gridRow.grid.style.cellPadding.right;
416
- }
417
- if(typeof this.gridRow.grid.style.cellPadding.bottom !== 'undefined' && this.gridRow.grid.style.cellPadding.hasBottomPad){
418
- returnBounds.height -= this.gridRow.grid.style.cellPadding.bottom;
419
- }
420
- }
421
- else
422
- {
423
- if(typeof this.style.cellPadding.left !== 'undefined' && this.style.cellPadding.hasLeftPad) {
424
- returnBounds.x += this.style.cellPadding.left + this.cellStyle.borders.left.width;
425
- returnBounds.width -= this.style.cellPadding.left;
426
- }
427
- if(typeof this.style.cellPadding.top !== 'undefined' && this.style.cellPadding.hasTopPad) {
428
- returnBounds.y += this.style.cellPadding.top + this.cellStyle.borders.top.width;
429
- returnBounds.height -= this.style.cellPadding.top;
430
- }
431
- if(typeof this.style.cellPadding.right !== 'undefined' && this.style.cellPadding.hasRightPad){
432
- returnBounds.width -= this.style.cellPadding.right;
433
- }
434
- if(typeof this.style.cellPadding.bottom !== 'undefined' && this.style.cellPadding.hasBottomPad){
435
- returnBounds.height -= this.style.cellPadding.bottom;
436
- }
437
- }
438
- returnBounds.width -= (this.cellStyle.borders.left.width + this.cellStyle.borders.right.width);
439
- returnBounds.height -= (this.cellStyle.borders.top.width + this.cellStyle.borders.bottom.width);
440
- }
441
- return returnBounds;
442
- }
443
- /**
444
- * `Draws` the specified graphics.
445
- * @private
446
- */
447
- public draw(graphics : PdfGraphics, bounds : RectangleF, cancelSubsequentSpans : boolean) : PdfStringLayoutResult {
448
- let isrowbreak : boolean = false;
449
- /*if (!this.row.grid.isSingleGrid)
450
- {
451
- //Check whether the Grid Span to Nextpage
452
- if ((this.remainingString != null) || (PdfGridLayouter.repeatRowIndex != -1))
453
- {
454
- this.DrawParentCells(graphics, bounds, true);
455
- }
456
- else if (this.row.grid.rows.count > 1)
457
- {
458
- for (let i : number = 0; i < this.row.grid.rows.count; i++)
459
- {
460
- if (this.row == this.row.grid.rows.getRow(i))
461
- {
462
- if (this.row.grid.rows.getRow(i).rowBreakHeight > 0)
463
- isrowbreak = true;
464
- if ((i > 0) && (isrowbreak))
465
- this.DrawParentCells(graphics, bounds, false);
466
- }
467
- }
468
- }
469
- } */
470
- let result : PdfStringLayoutResult = null;
471
- /*if (cancelSubsequentSpans)
472
- {
473
- //..Cancel all subsequent cell spans, if no space exists.
474
- let currentCellIndex : number = this.row.cells.indexOf(this);
475
- for (let i : number = currentCellIndex + 1; i <= currentCellIndex + this.colSpan; i++)
476
- {
477
- this.row.cells.getCell(i).isCellMergeContinue = false;
478
- this.row.cells.getCell(i).isRowMergeContinue = false;
479
- }
480
- this.colSpan = 1;
481
- }*/
482
- //..Skip cells which were already covered by spanmap.
483
- if (this.internalIsCellMergeContinue || this.internalIsRowMergeContinue) {
484
- if (this.internalIsCellMergeContinue && this.row.grid.style.allowHorizontalOverflow) {
485
- if ((this.row.rowOverflowIndex > 0 && (this.row.cells.indexOf(this) != this.row.rowOverflowIndex + 1)) || (this.row.rowOverflowIndex == 0 && this.internalIsCellMergeContinue)) {
486
- return result;
487
- }
488
- }
489
- else {
490
- return result;
491
- }
492
- }
493
- //Adjust bounds with Row and Column Spacing
494
- bounds = this.adjustOuterLayoutArea(bounds, graphics);
495
- this.drawCellBackground(graphics, bounds);
496
- let textPen : PdfPen = this.getTextPen();
497
- let textBrush : PdfBrush = this.getTextBrush();
498
- if (typeof textPen === 'undefined' && typeof textBrush === 'undefined') {
499
- textBrush = new PdfSolidBrush(new PdfColor(0, 0, 0));
500
- }
501
- let font : PdfFont = this.getTextFont();
502
- let strFormat : PdfStringFormat = this.getStringFormat();
503
- let innerLayoutArea : RectangleF = bounds;
504
- if (innerLayoutArea.height >= graphics.clientSize.height)
505
- {
506
- // If to break row to next page.
507
- if (this.row.grid.allowRowBreakAcrossPages)
508
- {
509
- innerLayoutArea.height -= innerLayoutArea.y;
510
- if (typeof this._rowHeight !== 'undefined' && this._rowHeight !== null && innerLayoutArea.height > this._rowHeight) {
511
- innerLayoutArea.height = this._rowHeight;
512
- }
513
- //bounds.height -= bounds.y;
514
- // if(this.row.grid.isChildGrid)
515
- // {
516
- // innerLayoutArea.height -= this.row.grid.ParentCell.row.grid.style.cellPadding.bottom;
517
- // }
518
- }
519
- // if user choose to cut the row whose height is more than page height.
520
- // else
521
- // {
522
- // innerLayoutArea.height = graphics.clientSize.height;
523
- // bounds.height = graphics.clientSize.height;
524
- // }
525
- }
526
- innerLayoutArea = this.adjustContentLayoutArea(innerLayoutArea);
527
- if (typeof this.objectValue === 'string' || typeof this.remaining === 'string') {
528
- let temp : string;
529
- let layoutRectangle : RectangleF;
530
- if (innerLayoutArea.height < font.height)
531
- layoutRectangle = new RectangleF(innerLayoutArea.x, innerLayoutArea.y, innerLayoutArea.width, font.height);
532
- else
533
- layoutRectangle = innerLayoutArea;
534
- if (innerLayoutArea.height < font.height && this.row.grid.isChildGrid && this.row.grid.ParentCell != null)
535
- {
536
- let height : number = layoutRectangle.height - this.row.grid.ParentCell.row.grid.style.cellPadding.bottom - this.row.grid.style.cellPadding.bottom;
537
- if(this.row.grid.splitChildRowIndex != -1){
538
- this.fontSpilt = true;
539
- this.row.rowFontSplit = true;
540
- }
541
- if (height > 0 && height < font.height)
542
- layoutRectangle.height = height;
543
- // else if (height + this.row.grid.style.cellPadding.bottom > 0 && height + this.row.grid.style.cellPadding.bottom < font.height)
544
- // layoutRectangle.height = height + this.row.grid.style.cellPadding.bottom;
545
- // else if (bounds.height < font.height)
546
- // layoutRectangle.height = bounds.height;
547
- // else if (bounds.height - this.row.grid.ParentCell.row.grid.style.cellPadding.bottom < font.height)
548
- // layoutRectangle.height = bounds.height - this.row.grid.ParentCell.row.grid.style.cellPadding.bottom;
549
- }
550
-
551
- if(this.gridRow.grid.style.cellSpacing != 0) {
552
- layoutRectangle.width -= this.gridRow.grid.style.cellSpacing;
553
- bounds.width -= this.gridRow.grid.style.cellSpacing;
554
- }
555
-
556
- if (this.isFinish) {
557
- // if (this.row.grid.splitChildRowIndex != -1 && !this.row.grid.isChildGrid && typeof this.remaining === 'undefined'){
558
- // this.remaining = '';
559
- // graphics.drawString(this.remaining, font, textPen, textBrush, layoutRectangle.x, layoutRectangle.y, layoutRectangle.width, layoutRectangle.height, strFormat);
560
- // } else {
561
- temp = this.remaining === '' ? this.remaining : (this.objectValue as string);
562
- graphics.drawString(temp, font, textPen, textBrush, layoutRectangle.x, layoutRectangle.y, layoutRectangle.width, layoutRectangle.height, strFormat);
563
- if (this.row.grid.splitChildRowIndex != -1 && !this.row.grid.isChildGrid && typeof this.remaining === 'undefined'){
564
- this.remaining = '';
565
- //graphics.drawString(this.remaining, font, textPen, textBrush, layoutRectangle.x, layoutRectangle.y, layoutRectangle.width, layoutRectangle.height, strFormat);
566
- }
567
- }
568
- else {
569
- if(typeof this.remaining == 'undefined' ||this.remaining === null){
570
- this.remaining = '';
571
- }
572
- if (this.row.repeatFlag) {
573
- graphics.drawString((this.remaining as string), font, textPen, textBrush, layoutRectangle.x, layoutRectangle.y, layoutRectangle.width, layoutRectangle.height, strFormat);
574
- }
575
- // else {
576
- // if(this.row.grid.ParentCell.row.repeatFlag) {
577
- // graphics.drawString((this.remaining as string), font, textPen, textBrush, layoutRectangle.x, layoutRectangle.y, layoutRectangle.width, layoutRectangle.height, strFormat);
578
- // } else {
579
- // layoutRectangle.height = this.row.height;
580
- // graphics.drawString((this.objectValue as string), font, textPen, textBrush, layoutRectangle.x, layoutRectangle.y, layoutRectangle.width, layoutRectangle.height, strFormat);
581
- // bounds.height = this.row.height;
582
-
583
- // }
584
-
585
- // }
586
- this.isFinish = true;
587
- //graphics.drawString((this.remaining as string), font, textPen, textBrush, layoutRectangle.x, layoutRectangle.y, layoutRectangle.width, layoutRectangle.height, strFormat);
588
- }
589
- result = graphics.stringLayoutResult;
590
- // if(this.row.grid.isChildGrid && this.row.rowBreakHeight > 0 && result !=null) {
591
- // bounds.height -= this.row.grid.ParentCell.row.grid.style.cellPadding.bottom;
592
- // }
593
- } else if (this.objectValue instanceof PdfGrid ) {
594
- let childGrid : PdfGrid = this.objectValue as PdfGrid;
595
- childGrid.isChildGrid = true;
596
- childGrid.ParentCell = this;
597
- let layoutRect : RectangleF;
598
- layoutRect = innerLayoutArea;
599
-
600
- if(this.gridRow.grid.style.cellSpacing != 0){
601
- bounds.width -= this.gridRow.grid.style.cellSpacing;
602
- }
603
- // layoutRect = bounds;
604
- // if (this.style.cellPadding != null){
605
- // layoutRect = bounds;
606
- // } else if((this.row.grid.style.cellPadding != null) && (childGrid.style.cellPadding.bottom === 0.5) && (childGrid.style.cellPadding.top === 0.5)
607
- // && (childGrid.style.cellPadding.left === 5.76) && (childGrid.style.cellPadding.right === 5.76)
608
- // && (this.gridRow.grid.style.cellSpacing === 0) && (childGrid.style.cellSpacing === 0)) {
609
- // layoutRect = innerLayoutArea;
610
- // }
611
- // if(this.objectValue.style.cellPadding != null && typeof this.objectValue.style.cellPadding !== 'undefined'){
612
- // layoutRect = bounds;
613
- // }
614
- let layouter : PdfGridLayouter= new PdfGridLayouter(childGrid);
615
- let format : PdfLayoutFormat = new PdfGridLayoutFormat();
616
- if (this.row.grid.LayoutFormat != null)
617
- format = this.row.grid.LayoutFormat;
618
- else
619
- format.layout = PdfLayoutType.Paginate;
620
-
621
- let param : PdfLayoutParams = new PdfLayoutParams();
622
- if (graphics.layer != null)
623
- {
624
- // Define layout parameters.
625
- param.page = graphics.page as PdfPage;
626
- param.bounds = layoutRect;
627
- param.format = format;
628
- //Set the span
629
- childGrid.setSpan();
630
- childGrid.checkSpan();
631
- // Draw the child grid.
632
- let childGridResult : PdfLayoutResult = layouter.Layouter(param);
633
-
634
- //let childGridResult : PdfLayoutResult = layouter.innerLayout(param);
635
- this.value = childGrid;
636
- if(this.row.grid.splitChildRowIndex !== -1){
637
- this.height = this.row.rowBreakHeightValue;
638
- }
639
- if (param.page != childGridResult.page) //&& (isWidthGreaterthanParent != true))
640
- {
641
- if (this.row.rowBreakHeightValue !== null && typeof this.row.rowBreakHeightValue !== 'undefined')
642
- childGridResult.bounds.height = this.row.rowBreakHeightValue;
643
- if(this.row.rowBreakHeight == 0)
644
- this.row.NestedGridLayoutResult = childGridResult;
645
- else
646
- this.row.rowBreakHeight = this.row.rowBreakHeightValue;
647
- //bounds.height = this.row.rowBreakHeight;
648
-
649
-
650
- //After drawing paginated nested grid, the bounds of the parent grid in start page should be corrected for borders.
651
- //bounds.height = graphics.clientSize.height - bounds.y;
652
-
653
- }
654
- }
655
-
656
- } else if (this.objectValue instanceof PdfImage || this.objectValue instanceof PdfBitmap) {
657
- let imageBounds : RectangleF;
658
- if ((this.objectValue as PdfImage).width <= innerLayoutArea.width) {
659
- imageBounds = new RectangleF(innerLayoutArea.x, innerLayoutArea.y, (this.objectValue as PdfImage).width, innerLayoutArea.height);
660
- } else {
661
- imageBounds = innerLayoutArea;
662
- }
663
- graphics.drawImage(this.objectValue as PdfImage, imageBounds.x, imageBounds.y, imageBounds.width, imageBounds.height);
664
- } else if (this.objectValue instanceof PdfTextWebLink) {
665
- (this.objectValue as PdfTextWebLink).draw(graphics.currentPage, innerLayoutArea);
666
- } else if (typeof this.objectValue === 'undefined') {
667
- this.objectValue = "";
668
- graphics.drawString(this.objectValue as string, font, textPen, textBrush, innerLayoutArea.x, innerLayoutArea.y,innerLayoutArea.width, innerLayoutArea.height,strFormat);
669
- if (this.style.cellPadding != null && this.style.cellPadding.bottom == 0 && this.style.cellPadding.left == 0 && this.style.cellPadding.right == 0 && this.style.cellPadding.top == 0) {
670
- bounds.width -= (this.style.borders.left.width + this.style.borders.right.width);
671
- }
672
- if (this.gridRow.grid.style.cellSpacing != 0) {
673
- bounds.width -= this.gridRow.grid.style.cellSpacing;
674
- }
675
- }
676
- if (this.style.borders != null) {
677
- if(!this.fontSpilt)
678
- this.drawCellBorders(graphics, bounds);
679
- else {
680
- if(this.row.grid.ParentCell.row.grid.splitChildRowIndex != -1){
681
- this.row.rowFontSplit = false;
682
- this.drawCellBorders(graphics, bounds);
683
- }
684
- }
685
- }
686
- return result;
687
- }
688
- /* tslint:enable */
689
- /**
690
- * Draws the `cell border` constructed by drawing lines.
691
- * @private
692
- */
693
- public drawCellBorders(graphics : PdfGraphics, bounds : RectangleF) : void {
694
- if (this.row.grid.style.borderOverlapStyle === PdfBorderOverlapStyle.Inside) {
695
- bounds.x += this.style.borders.left.width;
696
- bounds.y += this.style.borders.top.width;
697
- bounds.width -= this.style.borders.right.width;
698
- bounds.height -= this.style.borders.bottom.width;
699
- }
700
- let p1 : PointF = new PointF(bounds.x, bounds.y + bounds.height);
701
- let p2 : PointF = new PointF(bounds.x, bounds.y);
702
- let pen : PdfPen = this.cellStyle.borders.left;
703
- if (this.cellStyle.borders.left.dashStyle === PdfDashStyle.Solid) {
704
- pen.lineCap = PdfLineCap.Square;
705
- }
706
- // SetTransparency(ref graphics, pen);
707
- if (pen.width !== 0) {
708
- graphics.drawLine(pen, p1, p2);
709
- }
710
- p1 = new PointF(bounds.x + bounds.width, bounds.y);
711
- p2 = new PointF(bounds.x + bounds.width, bounds.y + bounds.height);
712
- pen = this.cellStyle.borders.right;
713
- if ((bounds.x + bounds.width) > (graphics.clientSize.width - (pen.width / 2))) {
714
- p1 = new PointF(graphics.clientSize.width - (pen.width / 2), bounds.y);
715
- p2 = new PointF(graphics.clientSize.width - (pen.width / 2), bounds.y + bounds.height);
716
- }
717
- if (this.cellStyle.borders.right.dashStyle === PdfDashStyle.Solid) {
718
- pen.lineCap = PdfLineCap.Square;
719
- }
720
- if (pen.width !== 0) {
721
- graphics.drawLine(pen, p1, p2);
722
- }
723
- p1 = new PointF(bounds.x, bounds.y);
724
- p2 = new PointF(bounds.x + bounds.width, bounds.y);
725
- pen = this.cellStyle.borders.top;
726
- if (this.cellStyle.borders.top.dashStyle === PdfDashStyle.Solid) {
727
- pen.lineCap = PdfLineCap.Square;
728
- }
729
- if (pen.width !== 0) {
730
- graphics.drawLine(pen, p1, p2);
731
- }
732
- p1 = new PointF(bounds.x + bounds.width, bounds.y + bounds.height);
733
- p2 = new PointF(bounds.x, bounds.y + bounds.height);
734
- pen = this.cellStyle.borders.bottom;
735
- if ((bounds.y + bounds.height) > (graphics.clientSize.height - (pen.width / 2))) {
736
- p1 = new PointF((bounds.x + bounds.width), (graphics.clientSize.height - (pen.width / 2)));
737
- p2 = new PointF(bounds.x, (graphics.clientSize.height - (pen.width / 2)));
738
- }
739
- if (this.cellStyle.borders.bottom.dashStyle === PdfDashStyle.Solid) {
740
- pen.lineCap = PdfLineCap.Square;
741
- }
742
- if (pen.width !== 0) {
743
- graphics.drawLine(pen, p1, p2);
744
- }
745
- }
746
- // private setTransparency(graphics : PdfGraphics, pen : PdfPen) : void {
747
- // let alpha : number = (pen.color.a / 255) as number;
748
- // graphics.save();
749
- // graphics.setTransparency(alpha);
750
- // }
751
- /**
752
- * `Adjusts the outer layout area`.
753
- * @private
754
- */
755
- /* tslint:disable */
756
- private adjustOuterLayoutArea(bounds : RectangleF, g : PdfGraphics) : RectangleF {
757
- let isHeader : boolean = false;
758
- let cellSpacing : number = this.row.grid.style.cellSpacing;
759
- if (cellSpacing > 0) {
760
- bounds = new RectangleF(bounds.x + cellSpacing, bounds.y + cellSpacing,
761
- bounds.width - cellSpacing, bounds.height - cellSpacing);
762
- }
763
- let currentColIndex : number = this.row.cells.indexOf(this);
764
- if (this.columnSpan > 1|| (this.row.rowOverflowIndex > 0 && (currentColIndex == this.row.rowOverflowIndex + 1) && this.isCellMergeContinue)) {
765
- let span : number = this.columnSpan;
766
- if (span == 1 && this.isCellMergeContinue) {
767
- for (let j : number = currentColIndex + 1; j < this.row.grid.columns.count; j++)
768
- {
769
- if (this.row.cells.getCell(j).isCellMergeContinue)
770
- span++;
771
- else
772
- break;
773
- }
774
- }
775
- let totalWidth : number = 0;
776
- for (let i : number = currentColIndex; i < currentColIndex + span; i++) {
777
- if (this.row.grid.style.allowHorizontalOverflow) {
778
- let width : number;
779
- let compWidth : number = this.row.grid.size.width < g.clientSize.width ? this.row.grid.size.width : g.clientSize.width;
780
- if(this.row.grid.size.width > g.clientSize.width) {
781
- width = bounds.x + totalWidth + this.row.grid.columns.getColumn(i).width;
782
- } else {
783
- width = totalWidth + this.row.grid.columns.getColumn(i).width;
784
- }
785
- if (width > compWidth) {
786
- break;
787
- }
788
- }
789
- totalWidth += this.row.grid.columns.getColumn(i).width;
790
- }
791
- totalWidth -= this.row.grid.style.cellSpacing;
792
- bounds.width = totalWidth;
793
- }
794
- if (this.rowSpan > 1 || this.row.rowSpanExists) {
795
- let span : number = this.rowSpan;
796
- let currentRowIndex : number = this.row.grid.rows.rowCollection.indexOf(this.row);
797
- if (currentRowIndex == -1) {
798
- currentRowIndex = this.row.grid.headers.indexOf(this.row);
799
- if (currentRowIndex != -1) {
800
- isHeader = true;
801
- }
802
- }
803
- // if (span == 1 && this.isCellMergeContinue) {
804
- // for (let j : number = currentRowIndex + 1; j < this.row.grid.rows.count; j++)
805
- // {
806
- // let flag : boolean = (isHeader ? this.row.grid.headers.getHeader(j).cells.getCell(currentColIndex).isCellMergeContinue : this.row.grid.rows.getRow(j).cells.getCell(currentColIndex).isCellMergeContinue);
807
- // if (flag)
808
- // span++;
809
- // else
810
- // break;
811
- // }
812
- // }
813
- let totalHeight : number = 0;
814
- let max : number = 0;
815
- for (let i : number = currentRowIndex; i < currentRowIndex + span; i++) {
816
- totalHeight += (isHeader ? this.row.grid.headers.getHeader(i).height : this.row.grid.rows.getRow(i).height);
817
- let row : PdfGridRow = this.row.grid.rows.getRow(i);
818
- let rowIndex : number = this.row.grid.rows.rowCollection.indexOf(row);
819
- /*if (this.rowSpan > 1)
820
- {
821
- for (let k : number = 0; k < this.row.cells.count; k++) {
822
- let cell : PdfGridCell = this.row.cells.getCell(k);
823
- if(cell.rowSpan>1)
824
- {
825
- let tempHeight : number =0;
826
-
827
- for (let j :number = i; j < i +cell.rowSpan; j++)
828
- {
829
- if (!this.row.grid.rows.getRow(j).isRowSpanRowHeightSet)
830
- this.row.grid.rows.getRow(j).isRowHeightSet = false;
831
- tempHeight += this.row.grid.rows.getRow(j).height;
832
- if (!this.row.grid.rows.getRow(j).isRowSpanRowHeightSet)
833
- this.row.grid.rows.getRow(j).isRowHeightSet = true;
834
- }
835
- //To check the Row spanned cell height is greater than the total spanned row height.
836
- if(cell.height>tempHeight)
837
- {
838
- if (max < (cell.height - tempHeight))
839
- {
840
- max = cell.height - tempHeight;
841
- if (this.rowSpanRemainingHeight != 0 && max > this.rowSpanRemainingHeight)
842
- {
843
- max += this.rowSpanRemainingHeight;
844
- }
845
- let index :number = row.cells.indexOf(cell);
846
- //set the m_rowspanRemainingHeight to last rowspanned row.
847
- this.row.grid.rows.getRow((rowIndex +cell.rowSpan) - 1).cells.getCell(index).rowSpanRemainingHeight = max;
848
- this.rowSpanRemainingHeight = this.row.grid.rows.getRow((rowIndex + cell.rowSpan) - 1).cells.getCell(index).rowSpanRemainingHeight;
849
- }
850
- }
851
- }
852
- }
853
- }
854
- if (!this.row.grid.rows.getRow(i).isRowSpanRowHeightSet)
855
- this.row.grid.rows.getRow(i).isRowHeightSet = true;*/
856
- }
857
- let cellIndex = this.row.cells.indexOf(this);
858
- totalHeight -= this.row.grid.style.cellSpacing;
859
- // if (this.row.cells.getCell(cellIndex).height > totalHeight && (!this.row.grid.rows.getRow((currentRowIndex + span) - 1).isRowHeightSet)) {
860
- // this.row.grid.rows.getRow((currentRowIndex + span) - 1).cells.getCell(cellIndex).rowSpanRemainingHeight = this.row.cells.getCell(cellIndex).height - totalHeight;
861
- // totalHeight = this.row.cells.getCell(cellIndex).height;
862
- // bounds.height = totalHeight;
863
- // } else {
864
- bounds.height = totalHeight;
865
- // }
866
- if (!this.row.rowMergeComplete) {
867
- bounds.height = totalHeight;
868
- }
869
- }
870
- return bounds;
871
- }
872
- /* tslint:enable */
873
- /**
874
- * Gets the `text font`.
875
- * @private
876
- */
877
- private getTextFont() : PdfFont {
878
- if (typeof this.style.font !== 'undefined' && this.style.font != null) {
879
- return this.style.font;
880
- } else if (typeof this.row.style.font !== 'undefined' && this.row.style.font != null) {
881
- return this.row.style.font;
882
- } else if (typeof this.row.grid.style.font !== 'undefined' && this.row.grid.style.font != null) {
883
- return this.row.grid.style.font;
884
- } else {
885
- return PdfDocument.defaultFont;
886
- }
887
- }
888
- /**
889
- * Gets the `text brush`.
890
- * @private
891
- */
892
- private getTextBrush() : PdfBrush {
893
- if (typeof this.style.textBrush !== 'undefined' && this.style.textBrush != null) {
894
- return this.style.textBrush;
895
- } else if (typeof this.row.style.textBrush !== 'undefined' && this.row.style.textBrush != null) {
896
- return this.row.style.textBrush;
897
- } else {
898
- return this.row.grid.style.textBrush;
899
- }
900
- }
901
- /**
902
- * Gets the `text pen`.
903
- * @private
904
- */
905
- private getTextPen() : PdfPen {
906
- if (typeof this.style.textPen !== 'undefined' && this.style.textPen != null) {
907
- return this.style.textPen;
908
- } else if (typeof this.row.style.textPen !== 'undefined' && this.row.style.textPen != null) {
909
- return this.row.style.textPen;
910
- } else {
911
- return this.row.grid.style.textPen;
912
- }
913
- }
914
- /**
915
- * Gets the `background brush`.
916
- * @private
917
- */
918
- private getBackgroundBrush() : PdfBrush {
919
- if (typeof this.style.backgroundBrush !== 'undefined' && this.style.backgroundBrush != null) {
920
- return this.style.backgroundBrush;
921
- } else if (typeof this.row.style.backgroundBrush !== 'undefined' && this.row.style.backgroundBrush != null) {
922
- return this.row.style.backgroundBrush;
923
- } else {
924
- return this.row.grid.style.backgroundBrush;
925
- }
926
- }
927
- /**
928
- * Gets the `background image`.
929
- * @private
930
- */
931
- private getBackgroundImage() : PdfImage {
932
- if (typeof this.style.backgroundImage !== 'undefined' && this.style.backgroundImage != null) {
933
- return this.style.backgroundImage;
934
- } else if (typeof this.row.style.backgroundImage !== 'undefined' && this.row.style.backgroundImage != null) {
935
- return this.row.style.backgroundImage;
936
- } else {
937
- return this.row.grid.style.backgroundImage;
938
- }
939
- }
940
- /**
941
- * Gets the current `StringFormat`.
942
- * @private
943
- */
944
- private getStringFormat() : PdfStringFormat {
945
- if (typeof this.style.stringFormat !== 'undefined' && this.style.stringFormat != null) {
946
- return this.style.stringFormat;
947
- } else {
948
- return this.stringFormat;
949
- }
950
- }
951
- /**
952
- * Calculates the `height`.
953
- * @private
954
- */
955
- public measureHeight() : number {
956
- // .. Calculate the cell text height.
957
- // .....Add border widths, cell spacings and paddings to the height.
958
- let width : number = this.calculateWidth();
959
- // //check whether the Current PdfGridCell has padding
960
- if (this.style.cellPadding == null || typeof this.style.cellPadding === 'undefined') {
961
- width -= (this.gridRow.grid.style.cellPadding.right + this.gridRow.grid.style.cellPadding.left);
962
- //width -= (this.style.borders.left.width + this.style.borders.right.width);
963
- } else {
964
- width -= (this.style.cellPadding.right + this.style.cellPadding.left);
965
- width -= (this.style.borders.left.width + this.style.borders.right.width);
966
- }
967
- let height : number = 0;
968
- let layouter : PdfStringLayouter = new PdfStringLayouter();
969
- if (typeof this.objectValue === 'string' || typeof this.remaining === 'string') {
970
- let currentValue : string = this.objectValue as string;
971
- /* tslint:disable */
972
- if (!this.isFinish)
973
- currentValue = !(this.remaining === null || this.remaining === '' ||
974
- typeof this.remaining === 'undefined') ? this.remaining : (this.objectValue as string);
975
- let slr : PdfStringLayoutResult = null;
976
- let cellIndex : number = this.row.cells.indexOf(this);
977
-
978
- if (this.gridRow.grid.style.cellSpacing != 0){
979
- width -= this.gridRow.grid.style.cellSpacing * 2;
980
- }
981
- if(!this.row.cells.getCell(cellIndex).hasColSpan && !this.row.cells.getCell(cellIndex).hasRowSpan) {
982
- if(this.gridRow.grid.isChildGrid) {
983
- if (width < 0) {
984
- this.tempval = width;
985
- if (this.style.cellPadding == null || typeof this.style.cellPadding === 'undefined') {
986
- this.tempval += (this.gridRow.grid.style.cellPadding.right + this.gridRow.grid.style.cellPadding.left);
987
- } else {
988
- this.tempval += (this.style.cellPadding.right + this.style.cellPadding.left);
989
- this.tempval += (this.style.borders.left.width + this.style.borders.right.width);
990
- }
991
- } else {
992
- this.tempval = width;
993
- }
994
- slr = layouter.layout(currentValue, this.getTextFont(), this.stringFormat, new SizeF(this.tempval, 0), false, new SizeF(0, 0));
995
- height += slr.actualSize.height;
996
- } else {
997
- slr = layouter.layout(currentValue, this.getTextFont(), this.stringFormat, new SizeF(width, 0), false, new SizeF(0, 0));
998
- height += slr.actualSize.height;
999
- }
1000
- }
1001
- /* tslint:enable */
1002
- height += (this.style.borders.top.width + this.style.borders.bottom.width) * 2;
1003
- } else if (this.objectValue instanceof PdfGrid) {
1004
- let cellIndex : number = this.row.cells.indexOf(this);
1005
- let internalWidth : number = 0;
1006
- if ((this.style.cellPadding != null || typeof this.style.cellPadding !== 'undefined' )) {
1007
- internalWidth = this.calculateWidth();
1008
- if (typeof this.style.cellPadding.left !== 'undefined' && this.style.cellPadding.hasLeftPad) {
1009
- internalWidth -= this.style.cellPadding.left;
1010
- }
1011
- if (typeof this.style.cellPadding.right !== 'undefined' && this.style.cellPadding.hasRightPad) {
1012
- internalWidth -= this.style.cellPadding.right;
1013
- }
1014
- } else if ((this.row.grid.style.cellPadding != null || typeof this.row.grid.style.cellPadding !== 'undefined')) {
1015
- internalWidth = this.calculateWidth();
1016
- if (typeof this.row.grid.style.cellPadding.left !== 'undefined' && this.row.grid.style.cellPadding.hasLeftPad) {
1017
- internalWidth -= this.row.grid.style.cellPadding.left;
1018
- }
1019
- if (typeof this.row.grid.style.cellPadding.right !== 'undefined' && this.row.grid.style.cellPadding.hasRightPad) {
1020
- internalWidth -= this.row.grid.style.cellPadding.right;
1021
- }
1022
- } else {
1023
- internalWidth = this.calculateWidth();
1024
- }
1025
- (this.objectValue as PdfGrid).tempWidth = internalWidth;
1026
- if (!this.row.cells.getCell(cellIndex).hasColSpan && !this.row.cells.getCell(cellIndex).hasRowSpan) {
1027
- height = (this.objectValue as PdfGrid).size.height;
1028
- } else {
1029
- height += (this.style.borders.top.width + this.style.borders.bottom.width) * 2;
1030
- }
1031
- if (this.gridRow.grid.style.cellSpacing !== 0 ) {
1032
- width -= this.gridRow.grid.style.cellSpacing * 2;
1033
- //height += (this.row.grid.style.cellPadding.top + this.row.grid.style.cellPadding.bottom);
1034
- }
1035
- if (this.style.cellPadding != null || typeof this.style.cellPadding !== 'undefined') {
1036
- if (typeof this.row.grid.style.cellPadding.top !== 'undefined' && this.row.grid.style.cellPadding.hasTopPad) {
1037
- height += this.row.grid.style.cellPadding.top;
1038
- }
1039
- if (this.row.grid.style.cellPadding.hasBottomPad && typeof this.row.grid.style.cellPadding.bottom !== 'undefined') {
1040
- height += this.row.grid.style.cellPadding.bottom;
1041
- }
1042
- }
1043
- height += this.objectValue.style.cellSpacing;
1044
- } else if (this.objectValue instanceof PdfImage || this.objectValue instanceof PdfBitmap) {
1045
- height += (this.objectValue as PdfImage).height;
1046
- } else if (this.objectValue instanceof PdfTextWebLink) {
1047
- let webLink : PdfTextWebLink = this.objectValue as PdfTextWebLink;
1048
- /* tslint:disable */
1049
- let slr : PdfStringLayoutResult = layouter.layout(webLink.text, webLink.font, webLink.stringFormat, new SizeF(width, 0), false, new SizeF(0, 0));
1050
- /* tslint:enable */
1051
- height += slr.actualSize.height;
1052
- height += (this.style.borders.top.width + this.style.borders.bottom.width) * 2;
1053
- } else if (typeof this.objectValue === 'undefined') {
1054
- if (this.style.cellPadding == null || typeof this.style.cellPadding === 'undefined') {
1055
- width -= (this.gridRow.grid.style.cellPadding.right + this.gridRow.grid.style.cellPadding.left);
1056
- } else {
1057
- width -= (this.style.cellPadding.right + this.style.cellPadding.left);
1058
- width -= (this.style.borders.left.width + this.style.borders.right.width);
1059
- }
1060
- height += (this.style.borders.top.width + this.style.borders.bottom.width) * 2;
1061
- }
1062
- //Add padding top and bottom value to height
1063
- if (!(this.objectValue instanceof PdfGrid)) {
1064
- if (this.style.cellPadding == null || typeof this.style.cellPadding === 'undefined') {
1065
- height += (this.row.grid.style.cellPadding.top + this.row.grid.style.cellPadding.bottom);
1066
- } else {
1067
- height += (this.style.cellPadding.top + this.style.cellPadding.bottom);
1068
- }
1069
- } else {
1070
- if (this.style.cellPadding == null || typeof this.style.cellPadding === 'undefined') {
1071
- if (typeof this.row.grid.style.cellPadding.top !== 'undefined' && this.row.grid.style.cellPadding.hasTopPad) {
1072
- height += this.row.grid.style.cellPadding.top;
1073
- }
1074
- if (typeof this.row.grid.style.cellPadding.bottom !== 'undefined' && this.row.grid.style.cellPadding.hasBottomPad) {
1075
- height += this.row.grid.style.cellPadding.bottom;
1076
- }
1077
- } else {
1078
- if (typeof this.style.cellPadding.top !== 'undefined' && this.style.cellPadding.hasTopPad) {
1079
- height += this.style.cellPadding.top;
1080
- }
1081
- if (typeof this.style.cellPadding.bottom !== 'undefined' && this.style.cellPadding.hasBottomPad) {
1082
- height += this.style.cellPadding.bottom;
1083
- }
1084
- }
1085
- }
1086
- height += this.row.grid.style.cellSpacing;
1087
- return height;
1088
- }
1089
- /**
1090
- * return the calculated `width` of the cell.
1091
- * @private
1092
- */
1093
- private calculateWidth() : number {
1094
- let cellIndex : number = this.row.cells.indexOf(this);
1095
- let rowindex : number = this.row.grid.rows.rowCollection.indexOf(this.row);
1096
- let columnSpan : number = this.columnSpan;
1097
- let width : number = 0;
1098
- if (columnSpan === 1) {
1099
- for (let i : number = 0; i < columnSpan; i++) {
1100
- width += this.row.grid.columns.getColumn(cellIndex + i).width;
1101
- }
1102
- } else if (columnSpan > 1) {
1103
- for (let i : number = 0; i < columnSpan; i++) {
1104
- width += this.row.grid.columns.getColumn(cellIndex + i).width;
1105
- if ( (i + 1) < columnSpan) {
1106
- this.row.cells.getCell(cellIndex + i + 1).hasColSpan = true;
1107
- }
1108
- }
1109
- }
1110
-
1111
- if (this.parent != null && this.parent.row.width > 0) {
1112
- if ((this.row.grid.isChildGrid) && this.parent != null && (this.row.width > this.parent.row.width)) {
1113
- width = 0;
1114
- for (let j : number = 0; j < this.parent.columnSpan; j++) {
1115
- width += this.parent.row.grid.columns.getColumn(j).width;
1116
- }
1117
- width = width / this.row.cells.count;
1118
- }
1119
- }
1120
- return width;
1121
- }
1122
- }
1123
- /**
1124
- * `PdfGridCellCollection` class provides access to an ordered,
1125
- * strongly typed collection of 'PdfGridCell' objects.
1126
- * @private
1127
- */
1128
- export class PdfGridCellCollection {
1129
- //Fields
1130
- /**
1131
- * @hidden
1132
- * @private
1133
- */
1134
- private gridRow : PdfGridRow;
1135
- /**
1136
- * @hidden
1137
- * @private
1138
- */
1139
- private cells : PdfGridCell[] = [];
1140
- //Constructor
1141
- /**
1142
- * Initializes a new instance of the `PdfGridCellCollection` class with the row.
1143
- * @private
1144
- */
1145
- public constructor(row : PdfGridRow) {
1146
- this.gridRow = row;
1147
- }
1148
- //Properties
1149
- /**
1150
- * Gets the current `cell`.
1151
- * @private
1152
- */
1153
- public getCell(index : number) : PdfGridCell {
1154
- if (index < 0 || index >= this.count) {
1155
- throw new Error('IndexOutOfRangeException');
1156
- }
1157
- return this.cells[index];
1158
- }
1159
- /**
1160
- * Gets the cells `count`.[Read-Only].
1161
- * @private
1162
- */
1163
- public get count() : number {
1164
- return this.cells.length;
1165
- }
1166
- //Implementation
1167
- /**
1168
- * `Adds` this instance.
1169
- * @private
1170
- */
1171
- public add() : PdfGridCell
1172
- /**
1173
- * `Adds` this instance.
1174
- * @private
1175
- */
1176
- public add(cell : PdfGridCell) : void
1177
- public add(cell ?: PdfGridCell) : PdfGridCell|void {
1178
- if (typeof cell === 'undefined') {
1179
- let tempcell : PdfGridCell = new PdfGridCell();
1180
- this.add(tempcell);
1181
- return cell;
1182
- } else {
1183
- cell.row = this.gridRow;
1184
- this.cells.push(cell);
1185
- }
1186
- }
1187
- /**
1188
- * Returns the `index of` a particular cell in the collection.
1189
- * @private
1190
- */
1191
- public indexOf(cell : PdfGridCell) : number {
1192
- return this.cells.indexOf(cell);
1193
- }
1194
- }