@syncfusion/ej2-pdf-export 30.1.37 → 30.1.38

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 (367) hide show
  1. package/.eslintrc.json +2 -0
  2. package/dist/ej2-pdf-export.min.js +2 -2
  3. package/dist/ej2-pdf-export.umd.min.js +2 -2
  4. package/dist/ej2-pdf-export.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-pdf-export.es2015.js +54 -8
  6. package/dist/es6/ej2-pdf-export.es2015.js.map +1 -1
  7. package/dist/es6/ej2-pdf-export.es5.js +54 -8
  8. package/dist/es6/ej2-pdf-export.es5.js.map +1 -1
  9. package/dist/global/ej2-pdf-export.min.js +2 -2
  10. package/dist/global/ej2-pdf-export.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +8 -44
  13. package/src/implementation/graphics/fonts/ttf-reader.d.ts +2 -0
  14. package/src/implementation/graphics/fonts/ttf-reader.js +14 -1
  15. package/src/implementation/graphics/fonts/unicode-true-type-font.js +25 -7
  16. package/src/implementation/input-output/pdf-dictionary-properties.d.ts +15 -0
  17. package/src/implementation/input-output/pdf-dictionary-properties.js +15 -0
  18. package/dist/ts/implementation/actions/action.d.ts +0 -50
  19. package/dist/ts/implementation/actions/action.ts +0 -76
  20. package/dist/ts/implementation/actions/index.d.ts +0 -6
  21. package/dist/ts/implementation/actions/index.ts +0 -6
  22. package/dist/ts/implementation/actions/uri-action.d.ts +0 -33
  23. package/dist/ts/implementation/actions/uri-action.ts +0 -52
  24. package/dist/ts/implementation/annotations/action-link-annotation.d.ts +0 -30
  25. package/dist/ts/implementation/annotations/action-link-annotation.ts +0 -43
  26. package/dist/ts/implementation/annotations/annotation-collection.d.ts +0 -77
  27. package/dist/ts/implementation/annotations/annotation-collection.ts +0 -159
  28. package/dist/ts/implementation/annotations/annotation.d.ts +0 -152
  29. package/dist/ts/implementation/annotations/annotation.ts +0 -241
  30. package/dist/ts/implementation/annotations/document-link-annotation.d.ts +0 -89
  31. package/dist/ts/implementation/annotations/document-link-annotation.ts +0 -118
  32. package/dist/ts/implementation/annotations/index.d.ts +0 -11
  33. package/dist/ts/implementation/annotations/index.ts +0 -11
  34. package/dist/ts/implementation/annotations/link-annotation.d.ts +0 -23
  35. package/dist/ts/implementation/annotations/link-annotation.ts +0 -32
  36. package/dist/ts/implementation/annotations/pdf-text-web-link.d.ts +0 -118
  37. package/dist/ts/implementation/annotations/pdf-text-web-link.ts +0 -268
  38. package/dist/ts/implementation/annotations/uri-annotation.d.ts +0 -48
  39. package/dist/ts/implementation/annotations/uri-annotation.ts +0 -86
  40. package/dist/ts/implementation/collections/dictionary.d.ts +0 -76
  41. package/dist/ts/implementation/collections/dictionary.ts +0 -150
  42. package/dist/ts/implementation/collections/index.d.ts +0 -7
  43. package/dist/ts/implementation/collections/index.ts +0 -7
  44. package/dist/ts/implementation/collections/object-object-pair/dictionary.d.ts +0 -62
  45. package/dist/ts/implementation/collections/object-object-pair/dictionary.ts +0 -125
  46. package/dist/ts/implementation/collections/object-object-pair/index.d.ts +0 -5
  47. package/dist/ts/implementation/collections/object-object-pair/index.ts +0 -5
  48. package/dist/ts/implementation/collections/utils.d.ts +0 -27
  49. package/dist/ts/implementation/collections/utils.ts +0 -38
  50. package/dist/ts/implementation/document/automatic-fields/automatic-field-info-collection.d.ts +0 -31
  51. package/dist/ts/implementation/document/automatic-fields/automatic-field-info-collection.ts +0 -39
  52. package/dist/ts/implementation/document/automatic-fields/automatic-field-info.d.ts +0 -67
  53. package/dist/ts/implementation/document/automatic-fields/automatic-field-info.ts +0 -108
  54. package/dist/ts/implementation/document/automatic-fields/automatic-field.d.ts +0 -41
  55. package/dist/ts/implementation/document/automatic-fields/automatic-field.ts +0 -127
  56. package/dist/ts/implementation/document/automatic-fields/composite-field.d.ts +0 -46
  57. package/dist/ts/implementation/document/automatic-fields/composite-field.ts +0 -76
  58. package/dist/ts/implementation/document/automatic-fields/index.d.ts +0 -11
  59. package/dist/ts/implementation/document/automatic-fields/index.ts +0 -11
  60. package/dist/ts/implementation/document/automatic-fields/multiple-value-field.d.ts +0 -18
  61. package/dist/ts/implementation/document/automatic-fields/multiple-value-field.ts +0 -37
  62. package/dist/ts/implementation/document/automatic-fields/page-count-field.d.ts +0 -44
  63. package/dist/ts/implementation/document/automatic-fields/page-count-field.ts +0 -75
  64. package/dist/ts/implementation/document/automatic-fields/pdf-numbers-convertor.d.ts +0 -53
  65. package/dist/ts/implementation/document/automatic-fields/pdf-numbers-convertor.ts +0 -157
  66. package/dist/ts/implementation/document/automatic-fields/pdf-page-number-field.d.ts +0 -51
  67. package/dist/ts/implementation/document/automatic-fields/pdf-page-number-field.ts +0 -82
  68. package/dist/ts/implementation/document/automatic-fields/pdf-template-value-pair.d.ts +0 -38
  69. package/dist/ts/implementation/document/automatic-fields/pdf-template-value-pair.ts +0 -60
  70. package/dist/ts/implementation/document/automatic-fields/single-value-field.d.ts +0 -15
  71. package/dist/ts/implementation/document/automatic-fields/single-value-field.ts +0 -48
  72. package/dist/ts/implementation/document/index.d.ts +0 -16
  73. package/dist/ts/implementation/document/index.ts +0 -16
  74. package/dist/ts/implementation/document/pdf-catalog.d.ts +0 -39
  75. package/dist/ts/implementation/document/pdf-catalog.ts +0 -65
  76. package/dist/ts/implementation/document/pdf-document-base.d.ts +0 -137
  77. package/dist/ts/implementation/document/pdf-document-base.ts +0 -187
  78. package/dist/ts/implementation/document/pdf-document-template.d.ts +0 -166
  79. package/dist/ts/implementation/document/pdf-document-template.ts +0 -310
  80. package/dist/ts/implementation/document/pdf-document.d.ts +0 -227
  81. package/dist/ts/implementation/document/pdf-document.ts +0 -361
  82. package/dist/ts/implementation/document/pdf-viewer-preferences.d.ts +0 -467
  83. package/dist/ts/implementation/document/pdf-viewer-preferences.ts +0 -578
  84. package/dist/ts/implementation/drawing/index.d.ts +0 -5
  85. package/dist/ts/implementation/drawing/index.ts +0 -5
  86. package/dist/ts/implementation/drawing/pdf-drawing.d.ts +0 -141
  87. package/dist/ts/implementation/drawing/pdf-drawing.ts +0 -218
  88. package/dist/ts/implementation/general/enum.d.ts +0 -21
  89. package/dist/ts/implementation/general/enum.ts +0 -21
  90. package/dist/ts/implementation/general/functions/index.d.ts +0 -6
  91. package/dist/ts/implementation/general/functions/index.ts +0 -6
  92. package/dist/ts/implementation/general/functions/pdf-function.d.ts +0 -44
  93. package/dist/ts/implementation/general/functions/pdf-function.ts +0 -66
  94. package/dist/ts/implementation/general/functions/pdf-sampled-function.d.ts +0 -25
  95. package/dist/ts/implementation/general/functions/pdf-sampled-function.ts +0 -63
  96. package/dist/ts/implementation/general/index.d.ts +0 -9
  97. package/dist/ts/implementation/general/index.ts +0 -9
  98. package/dist/ts/implementation/general/pdf-cache-collection.d.ts +0 -42
  99. package/dist/ts/implementation/general/pdf-cache-collection.ts +0 -97
  100. package/dist/ts/implementation/general/pdf-collection.d.ts +0 -26
  101. package/dist/ts/implementation/general/pdf-collection.ts +0 -41
  102. package/dist/ts/implementation/general/pdf-destination.d.ts +0 -103
  103. package/dist/ts/implementation/general/pdf-destination.ts +0 -170
  104. package/dist/ts/implementation/graphics/brushes/enum.d.ts +0 -236
  105. package/dist/ts/implementation/graphics/brushes/enum.ts +0 -237
  106. package/dist/ts/implementation/graphics/brushes/index.d.ts +0 -13
  107. package/dist/ts/implementation/graphics/brushes/index.ts +0 -13
  108. package/dist/ts/implementation/graphics/brushes/pdf-blend.d.ts +0 -105
  109. package/dist/ts/implementation/graphics/brushes/pdf-blend.ts +0 -294
  110. package/dist/ts/implementation/graphics/brushes/pdf-brush.d.ts +0 -51
  111. package/dist/ts/implementation/graphics/brushes/pdf-brush.ts +0 -63
  112. package/dist/ts/implementation/graphics/brushes/pdf-brushes.d.ts +0 -726
  113. package/dist/ts/implementation/graphics/brushes/pdf-brushes.ts +0 -2438
  114. package/dist/ts/implementation/graphics/brushes/pdf-color-blend.d.ts +0 -113
  115. package/dist/ts/implementation/graphics/brushes/pdf-color-blend.ts +0 -295
  116. package/dist/ts/implementation/graphics/brushes/pdf-gradient-brush.d.ts +0 -155
  117. package/dist/ts/implementation/graphics/brushes/pdf-gradient-brush.ts +0 -311
  118. package/dist/ts/implementation/graphics/brushes/pdf-linear-gradient-brush.d.ts +0 -147
  119. package/dist/ts/implementation/graphics/brushes/pdf-linear-gradient-brush.ts +0 -406
  120. package/dist/ts/implementation/graphics/brushes/pdf-radial-gradient-brush.d.ts +0 -122
  121. package/dist/ts/implementation/graphics/brushes/pdf-radial-gradient-brush.ts +0 -290
  122. package/dist/ts/implementation/graphics/brushes/pdf-solid-brush.d.ts +0 -77
  123. package/dist/ts/implementation/graphics/brushes/pdf-solid-brush.ts +0 -107
  124. package/dist/ts/implementation/graphics/brushes/pdf-tiling-brush.d.ts +0 -161
  125. package/dist/ts/implementation/graphics/brushes/pdf-tiling-brush.ts +0 -304
  126. package/dist/ts/implementation/graphics/constants.d.ts +0 -31
  127. package/dist/ts/implementation/graphics/constants.ts +0 -31
  128. package/dist/ts/implementation/graphics/enum.d.ts +0 -413
  129. package/dist/ts/implementation/graphics/enum.ts +0 -413
  130. package/dist/ts/implementation/graphics/figures/arc.d.ts +0 -87
  131. package/dist/ts/implementation/graphics/figures/arc.ts +0 -133
  132. package/dist/ts/implementation/graphics/figures/base/draw-element.d.ts +0 -30
  133. package/dist/ts/implementation/graphics/figures/base/draw-element.ts +0 -59
  134. package/dist/ts/implementation/graphics/figures/base/element-layouter.d.ts +0 -161
  135. package/dist/ts/implementation/graphics/figures/base/element-layouter.ts +0 -260
  136. package/dist/ts/implementation/graphics/figures/base/fill-element.d.ts +0 -46
  137. package/dist/ts/implementation/graphics/figures/base/fill-element.ts +0 -72
  138. package/dist/ts/implementation/graphics/figures/base/graphics-element.d.ts +0 -16
  139. package/dist/ts/implementation/graphics/figures/base/graphics-element.ts +0 -34
  140. package/dist/ts/implementation/graphics/figures/base/index.d.ts +0 -9
  141. package/dist/ts/implementation/graphics/figures/base/index.ts +0 -9
  142. package/dist/ts/implementation/graphics/figures/base/pdf-shape-element.d.ts +0 -40
  143. package/dist/ts/implementation/graphics/figures/base/pdf-shape-element.ts +0 -69
  144. package/dist/ts/implementation/graphics/figures/base/shape-layouter.d.ts +0 -131
  145. package/dist/ts/implementation/graphics/figures/base/shape-layouter.ts +0 -276
  146. package/dist/ts/implementation/graphics/figures/base/text-layouter.d.ts +0 -107
  147. package/dist/ts/implementation/graphics/figures/base/text-layouter.ts +0 -212
  148. package/dist/ts/implementation/graphics/figures/ellipse-part.d.ts +0 -48
  149. package/dist/ts/implementation/graphics/figures/ellipse-part.ts +0 -76
  150. package/dist/ts/implementation/graphics/figures/enum.d.ts +0 -79
  151. package/dist/ts/implementation/graphics/figures/enum.ts +0 -80
  152. package/dist/ts/implementation/graphics/figures/index.d.ts +0 -13
  153. package/dist/ts/implementation/graphics/figures/index.ts +0 -13
  154. package/dist/ts/implementation/graphics/figures/layout-element.d.ts +0 -73
  155. package/dist/ts/implementation/graphics/figures/layout-element.ts +0 -132
  156. package/dist/ts/implementation/graphics/figures/path.d.ts +0 -319
  157. package/dist/ts/implementation/graphics/figures/path.ts +0 -646
  158. package/dist/ts/implementation/graphics/figures/pdf-template.d.ts +0 -113
  159. package/dist/ts/implementation/graphics/figures/pdf-template.ts +0 -205
  160. package/dist/ts/implementation/graphics/figures/rectangle-area.d.ts +0 -64
  161. package/dist/ts/implementation/graphics/figures/rectangle-area.ts +0 -108
  162. package/dist/ts/implementation/graphics/figures/text-element.d.ts +0 -214
  163. package/dist/ts/implementation/graphics/figures/text-element.ts +0 -449
  164. package/dist/ts/implementation/graphics/fonts/enum.d.ts +0 -385
  165. package/dist/ts/implementation/graphics/fonts/enum.ts +0 -385
  166. package/dist/ts/implementation/graphics/fonts/index.d.ts +0 -16
  167. package/dist/ts/implementation/graphics/fonts/index.ts +0 -16
  168. package/dist/ts/implementation/graphics/fonts/pdf-font-metrics.d.ts +0 -164
  169. package/dist/ts/implementation/graphics/fonts/pdf-font-metrics.ts +0 -248
  170. package/dist/ts/implementation/graphics/fonts/pdf-font.d.ts +0 -187
  171. package/dist/ts/implementation/graphics/fonts/pdf-font.ts +0 -316
  172. package/dist/ts/implementation/graphics/fonts/pdf-standard-font-metrics-factory.d.ts +0 -301
  173. package/dist/ts/implementation/graphics/fonts/pdf-standard-font-metrics-factory.ts +0 -606
  174. package/dist/ts/implementation/graphics/fonts/pdf-standard-font.d.ts +0 -143
  175. package/dist/ts/implementation/graphics/fonts/pdf-standard-font.ts +0 -243
  176. package/dist/ts/implementation/graphics/fonts/pdf-string-format.d.ts +0 -321
  177. package/dist/ts/implementation/graphics/fonts/pdf-string-format.ts +0 -474
  178. package/dist/ts/implementation/graphics/fonts/pdf-true-type-font.d.ts +0 -49
  179. package/dist/ts/implementation/graphics/fonts/pdf-true-type-font.ts +0 -165
  180. package/dist/ts/implementation/graphics/fonts/rtl/index.d.ts +0 -6
  181. package/dist/ts/implementation/graphics/fonts/rtl/index.ts +0 -6
  182. package/dist/ts/implementation/graphics/fonts/rtl/rtl-bidirectional.d.ts +0 -62
  183. package/dist/ts/implementation/graphics/fonts/rtl/rtl-bidirectional.ts +0 -958
  184. package/dist/ts/implementation/graphics/fonts/rtl/rtl-text-shape.d.ts +0 -68
  185. package/dist/ts/implementation/graphics/fonts/rtl/rtl-text-shape.ts +0 -374
  186. package/dist/ts/implementation/graphics/fonts/rtl-renderer.d.ts +0 -23
  187. package/dist/ts/implementation/graphics/fonts/rtl-renderer.ts +0 -255
  188. package/dist/ts/implementation/graphics/fonts/string-layouter.d.ts +0 -254
  189. package/dist/ts/implementation/graphics/fonts/string-layouter.ts +0 -617
  190. package/dist/ts/implementation/graphics/fonts/string-tokenizer.d.ts +0 -109
  191. package/dist/ts/implementation/graphics/fonts/string-tokenizer.ts +0 -275
  192. package/dist/ts/implementation/graphics/fonts/ttf-OS2-Table.d.ts +0 -204
  193. package/dist/ts/implementation/graphics/fonts/ttf-OS2-Table.ts +0 -206
  194. package/dist/ts/implementation/graphics/fonts/ttf-apple-cmap-sub-table.d.ts +0 -17
  195. package/dist/ts/implementation/graphics/fonts/ttf-apple-cmap-sub-table.ts +0 -18
  196. package/dist/ts/implementation/graphics/fonts/ttf-cmap-sub-table.d.ts +0 -17
  197. package/dist/ts/implementation/graphics/fonts/ttf-cmap-sub-table.ts +0 -18
  198. package/dist/ts/implementation/graphics/fonts/ttf-cmap-table.d.ts +0 -13
  199. package/dist/ts/implementation/graphics/fonts/ttf-cmap-table.ts +0 -14
  200. package/dist/ts/implementation/graphics/fonts/ttf-glyph-header.d.ts +0 -25
  201. package/dist/ts/implementation/graphics/fonts/ttf-glyph-header.ts +0 -26
  202. package/dist/ts/implementation/graphics/fonts/ttf-glyph-info.d.ts +0 -25
  203. package/dist/ts/implementation/graphics/fonts/ttf-glyph-info.ts +0 -35
  204. package/dist/ts/implementation/graphics/fonts/ttf-head-table.d.ts +0 -94
  205. package/dist/ts/implementation/graphics/fonts/ttf-head-table.ts +0 -94
  206. package/dist/ts/implementation/graphics/fonts/ttf-horizontal-header-table.d.ts +0 -55
  207. package/dist/ts/implementation/graphics/fonts/ttf-horizontal-header-table.ts +0 -56
  208. package/dist/ts/implementation/graphics/fonts/ttf-loca-table.d.ts +0 -9
  209. package/dist/ts/implementation/graphics/fonts/ttf-loca-table.ts +0 -10
  210. package/dist/ts/implementation/graphics/fonts/ttf-long-hor-metric.d.ts +0 -13
  211. package/dist/ts/implementation/graphics/fonts/ttf-long-hor-metric.ts +0 -14
  212. package/dist/ts/implementation/graphics/fonts/ttf-metrics.d.ts +0 -101
  213. package/dist/ts/implementation/graphics/fonts/ttf-metrics.ts +0 -106
  214. package/dist/ts/implementation/graphics/fonts/ttf-microsoft-cmap-sub-table.d.ts +0 -57
  215. package/dist/ts/implementation/graphics/fonts/ttf-microsoft-cmap-sub-table.ts +0 -58
  216. package/dist/ts/implementation/graphics/fonts/ttf-name-record.d.ts +0 -33
  217. package/dist/ts/implementation/graphics/fonts/ttf-name-record.ts +0 -33
  218. package/dist/ts/implementation/graphics/fonts/ttf-name-table.d.ts +0 -22
  219. package/dist/ts/implementation/graphics/fonts/ttf-name-table.ts +0 -22
  220. package/dist/ts/implementation/graphics/fonts/ttf-post-table.d.ts +0 -41
  221. package/dist/ts/implementation/graphics/fonts/ttf-post-table.ts +0 -42
  222. package/dist/ts/implementation/graphics/fonts/ttf-reader.d.ts +0 -225
  223. package/dist/ts/implementation/graphics/fonts/ttf-reader.ts +0 -1254
  224. package/dist/ts/implementation/graphics/fonts/ttf-table-info.d.ts +0 -22
  225. package/dist/ts/implementation/graphics/fonts/ttf-table-info.ts +0 -26
  226. package/dist/ts/implementation/graphics/fonts/ttf-trimmed-cmap-sub-table.d.ts +0 -25
  227. package/dist/ts/implementation/graphics/fonts/ttf-trimmed-cmap-sub-table.ts +0 -26
  228. package/dist/ts/implementation/graphics/fonts/unicode-true-type-font.d.ts +0 -213
  229. package/dist/ts/implementation/graphics/fonts/unicode-true-type-font.ts +0 -577
  230. package/dist/ts/implementation/graphics/images/byte-array.d.ts +0 -74
  231. package/dist/ts/implementation/graphics/images/byte-array.ts +0 -137
  232. package/dist/ts/implementation/graphics/images/image-decoder.d.ts +0 -274
  233. package/dist/ts/implementation/graphics/images/image-decoder.ts +0 -439
  234. package/dist/ts/implementation/graphics/images/index.d.ts +0 -8
  235. package/dist/ts/implementation/graphics/images/index.ts +0 -8
  236. package/dist/ts/implementation/graphics/images/pdf-bitmap.d.ts +0 -90
  237. package/dist/ts/implementation/graphics/images/pdf-bitmap.ts +0 -110
  238. package/dist/ts/implementation/graphics/images/pdf-image.d.ts +0 -88
  239. package/dist/ts/implementation/graphics/images/pdf-image.ts +0 -132
  240. package/dist/ts/implementation/graphics/index.d.ts +0 -35
  241. package/dist/ts/implementation/graphics/index.ts +0 -46
  242. package/dist/ts/implementation/graphics/pdf-color.d.ts +0 -206
  243. package/dist/ts/implementation/graphics/pdf-color.ts +0 -484
  244. package/dist/ts/implementation/graphics/pdf-graphics.d.ts +0 -1210
  245. package/dist/ts/implementation/graphics/pdf-graphics.ts +0 -2556
  246. package/dist/ts/implementation/graphics/pdf-margins.d.ts +0 -82
  247. package/dist/ts/implementation/graphics/pdf-margins.ts +0 -124
  248. package/dist/ts/implementation/graphics/pdf-pen.d.ts +0 -237
  249. package/dist/ts/implementation/graphics/pdf-pen.ts +0 -370
  250. package/dist/ts/implementation/graphics/pdf-resources.d.ts +0 -122
  251. package/dist/ts/implementation/graphics/pdf-resources.ts +0 -300
  252. package/dist/ts/implementation/graphics/pdf-transformation-matrix.d.ts +0 -143
  253. package/dist/ts/implementation/graphics/pdf-transformation-matrix.ts +0 -246
  254. package/dist/ts/implementation/graphics/pdf-transparency.d.ts +0 -34
  255. package/dist/ts/implementation/graphics/pdf-transparency.ts +0 -93
  256. package/dist/ts/implementation/graphics/unit-convertor.d.ts +0 -72
  257. package/dist/ts/implementation/graphics/unit-convertor.ts +0 -96
  258. package/dist/ts/implementation/index.d.ts +0 -103
  259. package/dist/ts/implementation/index.ts +0 -103
  260. package/dist/ts/implementation/input-output/big-endian-writer.d.ts +0 -59
  261. package/dist/ts/implementation/input-output/big-endian-writer.ts +0 -121
  262. package/dist/ts/implementation/input-output/cross-table.d.ts +0 -21
  263. package/dist/ts/implementation/input-output/cross-table.ts +0 -21
  264. package/dist/ts/implementation/input-output/enum.d.ts +0 -16
  265. package/dist/ts/implementation/input-output/enum.ts +0 -16
  266. package/dist/ts/implementation/input-output/index.d.ts +0 -12
  267. package/dist/ts/implementation/input-output/index.ts +0 -12
  268. package/dist/ts/implementation/input-output/pdf-cross-table.d.ts +0 -259
  269. package/dist/ts/implementation/input-output/pdf-cross-table.ts +0 -536
  270. package/dist/ts/implementation/input-output/pdf-dictionary-properties.d.ts +0 -568
  271. package/dist/ts/implementation/input-output/pdf-dictionary-properties.ts +0 -571
  272. package/dist/ts/implementation/input-output/pdf-main-object-collection.d.ts +0 -120
  273. package/dist/ts/implementation/input-output/pdf-main-object-collection.ts +0 -194
  274. package/dist/ts/implementation/input-output/pdf-operators.d.ts +0 -361
  275. package/dist/ts/implementation/input-output/pdf-operators.ts +0 -363
  276. package/dist/ts/implementation/input-output/pdf-stream-writer.d.ts +0 -311
  277. package/dist/ts/implementation/input-output/pdf-stream-writer.ts +0 -681
  278. package/dist/ts/implementation/input-output/pdf-writer.d.ts +0 -122
  279. package/dist/ts/implementation/input-output/pdf-writer.ts +0 -164
  280. package/dist/ts/implementation/pages/enum.d.ts +0 -201
  281. package/dist/ts/implementation/pages/enum.ts +0 -201
  282. package/dist/ts/implementation/pages/index.d.ts +0 -17
  283. package/dist/ts/implementation/pages/index.ts +0 -17
  284. package/dist/ts/implementation/pages/page-added-event-arguments.d.ts +0 -30
  285. package/dist/ts/implementation/pages/page-added-event-arguments.ts +0 -39
  286. package/dist/ts/implementation/pages/pdf-document-page-collection.d.ts +0 -86
  287. package/dist/ts/implementation/pages/pdf-document-page-collection.ts +0 -180
  288. package/dist/ts/implementation/pages/pdf-page-base.d.ts +0 -121
  289. package/dist/ts/implementation/pages/pdf-page-base.ts +0 -181
  290. package/dist/ts/implementation/pages/pdf-page-layer-collection.d.ts +0 -99
  291. package/dist/ts/implementation/pages/pdf-page-layer-collection.ts +0 -348
  292. package/dist/ts/implementation/pages/pdf-page-layer.d.ts +0 -160
  293. package/dist/ts/implementation/pages/pdf-page-layer.ts +0 -271
  294. package/dist/ts/implementation/pages/pdf-page-settings.d.ts +0 -111
  295. package/dist/ts/implementation/pages/pdf-page-settings.ts +0 -192
  296. package/dist/ts/implementation/pages/pdf-page-size.d.ts +0 -159
  297. package/dist/ts/implementation/pages/pdf-page-size.ts +0 -162
  298. package/dist/ts/implementation/pages/pdf-page-template-element.d.ts +0 -240
  299. package/dist/ts/implementation/pages/pdf-page-template-element.ts +0 -663
  300. package/dist/ts/implementation/pages/pdf-page.d.ts +0 -153
  301. package/dist/ts/implementation/pages/pdf-page.ts +0 -235
  302. package/dist/ts/implementation/pages/pdf-section-collection.d.ts +0 -109
  303. package/dist/ts/implementation/pages/pdf-section-collection.ts +0 -187
  304. package/dist/ts/implementation/pages/pdf-section-page-collection.d.ts +0 -41
  305. package/dist/ts/implementation/pages/pdf-section-page-collection.ts +0 -61
  306. package/dist/ts/implementation/pages/pdf-section-templates.d.ts +0 -64
  307. package/dist/ts/implementation/pages/pdf-section-templates.ts +0 -96
  308. package/dist/ts/implementation/pages/pdf-section.d.ts +0 -327
  309. package/dist/ts/implementation/pages/pdf-section.ts +0 -644
  310. package/dist/ts/implementation/primitives/index.d.ts +0 -12
  311. package/dist/ts/implementation/primitives/index.ts +0 -12
  312. package/dist/ts/implementation/primitives/pdf-array.d.ts +0 -192
  313. package/dist/ts/implementation/primitives/pdf-array.ts +0 -386
  314. package/dist/ts/implementation/primitives/pdf-boolean.d.ts +0 -84
  315. package/dist/ts/implementation/primitives/pdf-boolean.ts +0 -119
  316. package/dist/ts/implementation/primitives/pdf-dictionary.d.ts +0 -362
  317. package/dist/ts/implementation/primitives/pdf-dictionary.ts +0 -513
  318. package/dist/ts/implementation/primitives/pdf-name.d.ts +0 -121
  319. package/dist/ts/implementation/primitives/pdf-name.ts +0 -218
  320. package/dist/ts/implementation/primitives/pdf-number.d.ts +0 -104
  321. package/dist/ts/implementation/primitives/pdf-number.ts +0 -165
  322. package/dist/ts/implementation/primitives/pdf-reference.d.ts +0 -223
  323. package/dist/ts/implementation/primitives/pdf-reference.ts +0 -430
  324. package/dist/ts/implementation/primitives/pdf-stream.d.ts +0 -161
  325. package/dist/ts/implementation/primitives/pdf-stream.ts +0 -306
  326. package/dist/ts/implementation/primitives/pdf-string.d.ts +0 -235
  327. package/dist/ts/implementation/primitives/pdf-string.ts +0 -397
  328. package/dist/ts/implementation/structured-elements/grid/index.d.ts +0 -4
  329. package/dist/ts/implementation/structured-elements/grid/index.ts +0 -10
  330. package/dist/ts/implementation/structured-elements/grid/layout/grid-layouter.d.ts +0 -597
  331. package/dist/ts/implementation/structured-elements/grid/layout/grid-layouter.ts +0 -2127
  332. package/dist/ts/implementation/structured-elements/grid/pdf-grid-cell.d.ts +0 -288
  333. package/dist/ts/implementation/structured-elements/grid/pdf-grid-cell.ts +0 -1225
  334. package/dist/ts/implementation/structured-elements/grid/pdf-grid-column.d.ts +0 -108
  335. package/dist/ts/implementation/structured-elements/grid/pdf-grid-column.ts +0 -206
  336. package/dist/ts/implementation/structured-elements/grid/pdf-grid-row.d.ts +0 -261
  337. package/dist/ts/implementation/structured-elements/grid/pdf-grid-row.ts +0 -470
  338. package/dist/ts/implementation/structured-elements/grid/pdf-grid.d.ts +0 -292
  339. package/dist/ts/implementation/structured-elements/grid/pdf-grid.ts +0 -853
  340. package/dist/ts/implementation/structured-elements/grid/styles/index.d.ts +0 -5
  341. package/dist/ts/implementation/structured-elements/grid/styles/index.ts +0 -5
  342. package/dist/ts/implementation/structured-elements/grid/styles/pdf-borders.d.ts +0 -146
  343. package/dist/ts/implementation/structured-elements/grid/styles/pdf-borders.ts +0 -238
  344. package/dist/ts/implementation/structured-elements/grid/styles/style.d.ts +0 -272
  345. package/dist/ts/implementation/structured-elements/grid/styles/style.ts +0 -423
  346. package/dist/ts/implementation/structured-elements/index.d.ts +0 -4
  347. package/dist/ts/implementation/structured-elements/index.ts +0 -10
  348. package/dist/ts/implementation/structured-elements/tables/light-tables/enum.d.ts +0 -16
  349. package/dist/ts/implementation/structured-elements/tables/light-tables/enum.ts +0 -16
  350. package/dist/ts/index.d.ts +0 -116
  351. package/dist/ts/index.ts +0 -116
  352. package/dist/ts/interfaces/i-pdf-cache.d.ts +0 -23
  353. package/dist/ts/interfaces/i-pdf-cache.ts +0 -23
  354. package/dist/ts/interfaces/i-pdf-changable.d.ts +0 -17
  355. package/dist/ts/interfaces/i-pdf-changable.ts +0 -17
  356. package/dist/ts/interfaces/i-pdf-clonable.d.ts +0 -12
  357. package/dist/ts/interfaces/i-pdf-clonable.ts +0 -12
  358. package/dist/ts/interfaces/i-pdf-primitives.d.ts +0 -45
  359. package/dist/ts/interfaces/i-pdf-primitives.ts +0 -45
  360. package/dist/ts/interfaces/i-pdf-true-type-font.d.ts +0 -18
  361. package/dist/ts/interfaces/i-pdf-true-type-font.ts +0 -48
  362. package/dist/ts/interfaces/i-pdf-wrapper.d.ts +0 -13
  363. package/dist/ts/interfaces/i-pdf-wrapper.ts +0 -13
  364. package/dist/ts/interfaces/i-pdf-writer.d.ts +0 -29
  365. package/dist/ts/interfaces/i-pdf-writer.ts +0 -29
  366. package/dist/ts/interfaces/index.d.ts +0 -10
  367. package/dist/ts/interfaces/index.ts +0 -10
@@ -1,853 +0,0 @@
1
- /**
2
- * PdfGrid.ts class for EJ2-PDF
3
- */
4
- import { PdfGridColumnCollection } from './pdf-grid-column';
5
- import { PdfGridRow } from './pdf-grid-row';
6
- import { PdfGridCell } from './pdf-grid-cell';
7
- import { PdfGridRowCollection, PdfGridHeaderCollection } from './pdf-grid-row';
8
- import { RectangleF, SizeF, PointF } from './../../drawing/pdf-drawing';
9
- import { PdfPage } from './../../pages/pdf-page';
10
- import { PdfLayoutElement } from './../../graphics/figures/layout-element';
11
- import { PdfLayoutResult, PdfLayoutParams, PdfLayoutFormat } from './../../graphics/figures/base/element-layouter';
12
- import { PdfGridStyle , PdfGridCellStyle} from './styles/style';
13
- import { PdfBorders} from './styles/pdf-borders';
14
- import { PdfGraphics } from './../../graphics/pdf-graphics';
15
- import { PdfGridLayouter, PdfGridLayoutResult } from './../../structured-elements/grid/layout/grid-layouter';
16
- import { PdfGridBeginCellDrawEventArgs, PdfGridEndCellDrawEventArgs} from '../../structured-elements/grid/layout/grid-layouter';
17
- export class PdfGrid extends PdfLayoutElement {
18
- //Fields
19
- /**
20
- * @hidden
21
- * @private
22
- */
23
- private gridColumns : PdfGridColumnCollection;
24
- /**
25
- * @hidden
26
- * @private
27
- */
28
- private gridRows : PdfGridRowCollection;
29
- /**
30
- * @hidden
31
- * @private
32
- */
33
- private gridHeaders : PdfGridHeaderCollection;
34
- /**
35
- * @hidden
36
- * @private
37
- */
38
- private gridInitialWidth : number ;
39
- /**
40
- * @hidden
41
- * @private
42
- */
43
- public isComplete : boolean;
44
- /**
45
- * @hidden
46
- * @private
47
- */
48
- private gridSize : SizeF = new SizeF(0, 0);
49
- /**
50
- * @hidden
51
- * @private
52
- */
53
- private layoutFormat : PdfLayoutFormat;
54
- /**
55
- * @hidden
56
- * @private
57
- */
58
- _gridLocation : RectangleF;
59
- /**
60
- * @hidden
61
- * @private
62
- */
63
- private gridStyle : PdfGridStyle;
64
- /**
65
- * @hidden
66
- * @private
67
- */
68
- private ispageWidth : boolean;
69
- /**
70
- * Check weather it is `child grid or not`.
71
- * @private
72
- */
73
- private ischildGrid : boolean;
74
- /**
75
- * Check the child grid is ' split or not'
76
- */
77
- public isGridSplit : boolean = false;
78
- /**
79
- * @hidden
80
- * @private
81
- */
82
- public rowLayoutBoundsWidth : number;
83
- /**
84
- * @hidden
85
- * @private
86
- */
87
- public isRearranged : boolean = false;
88
- /**
89
- * @hidden
90
- * @private
91
- */
92
- private bRepeatHeader : boolean;
93
- /**
94
- * @hidden
95
- * @private
96
- */
97
- private pageBounds : RectangleF = new RectangleF();
98
-
99
- //GridLayouter-Fields
100
- /**
101
- * @hidden
102
- * @private
103
- */
104
- private currentPage : PdfPage;
105
- /**
106
- * @hidden
107
- * @private
108
- */
109
- private currentPageBounds : SizeF;
110
- /**
111
- * @hidden
112
- * @private
113
- */
114
- private currentBounds : RectangleF;
115
- /**
116
- * @hidden
117
- * @private
118
- */
119
- private currentGraphics : PdfGraphics;
120
- /**
121
- * @hidden
122
- * @private
123
- */
124
- public listOfNavigatePages : number[] = [];
125
- /**
126
- * @hidden
127
- * @private
128
- */
129
- private startLocation : PointF;
130
- /**
131
- * @hidden
132
- * @private
133
- */
134
- public parentCellIndex : number = 0 ;
135
- public tempWidth : number = 0;
136
- /**
137
- * @hidden
138
- * @private
139
- */
140
- private breakRow : boolean = true;
141
- public splitChildRowIndex : number = -1;
142
- private rowBreakPageHeightCellIndex : number;
143
- //Events
144
- /**
145
- * The event raised on `starting cell drawing`.
146
- * @event
147
- * @private
148
- */
149
- public beginCellDraw : Function;
150
- /**
151
- * The event raised on `ending cell drawing`.
152
- * @event
153
- * @private
154
- */
155
- public endCellDraw : Function;
156
- /**
157
- * The event raised on `begin cell lay outing`.
158
- * @event
159
- * @private
160
- */
161
- //public beginPageLayout : Function;
162
- /**
163
- * The event raised on `end cell lay outing`.
164
- * @event
165
- * @private
166
- */
167
- //public endPageLayout : Function;
168
- public hasRowSpanSpan : boolean = false;
169
- public hasColumnSpan : boolean = false;
170
- public isSingleGrid : boolean = true;
171
- private parentCell : PdfGridCell;
172
- //constructor
173
- /**
174
- * Initialize a new instance for `PdfGrid` class.
175
- * @private
176
- */
177
- public constructor() {
178
- super();
179
- }
180
- //Properties
181
- /**
182
- * Gets a value indicating whether the `start cell layout event` should be raised.
183
- * @private
184
- */
185
- public get raiseBeginCellDraw() : boolean {
186
- return (typeof this.beginCellDraw !== 'undefined' && typeof this.beginCellDraw !== null);
187
- }
188
- /**
189
- * Gets a value indicating whether the `end cell layout event` should be raised.
190
- * @private
191
- */
192
- public get raiseEndCellDraw() : boolean {
193
- return (typeof this.endCellDraw !== 'undefined' && typeof this.endCellDraw !== null);
194
- }
195
- /**
196
- * Gets or sets a value indicating whether to `repeat header`.
197
- * @private
198
- */
199
- public get repeatHeader() : boolean {
200
- if (this.bRepeatHeader == null || typeof this.bRepeatHeader === 'undefined') {
201
- this.bRepeatHeader = false;
202
- }
203
- return this.bRepeatHeader;
204
- }
205
- public set repeatHeader(value : boolean) {
206
- this.bRepeatHeader = value;
207
- }
208
- /**
209
- * Gets or sets a value indicating whether to split or cut rows that `overflow a page`.
210
- * @private
211
- */
212
- public get allowRowBreakAcrossPages() : boolean {
213
- return this.breakRow;
214
- }
215
- public set allowRowBreakAcrossPages(value : boolean) {
216
- this.breakRow = value;
217
- }
218
- /**
219
- * Gets the `column` collection of the PdfGrid.[Read-Only]
220
- * @private
221
- */
222
- public get columns() : PdfGridColumnCollection {
223
- if (this.gridColumns == null || typeof this.gridColumns === 'undefined') {
224
- this.gridColumns = new PdfGridColumnCollection(this);
225
- }
226
- return this.gridColumns;
227
- }
228
- /**
229
- * Gets the `row` collection from the PdfGrid.[Read-Only]
230
- * @private
231
- */
232
- public get rows() : PdfGridRowCollection {
233
- if (this.gridRows == null) {
234
- this.gridRows = new PdfGridRowCollection(this);
235
- }
236
- return (this.gridRows as PdfGridRowCollection);
237
- }
238
- /**
239
- * Gets the `headers` collection from the PdfGrid.[Read-Only]
240
- * @private
241
- */
242
- public get headers() : PdfGridHeaderCollection {
243
- if (this.gridHeaders == null || typeof this.gridHeaders === 'undefined') {
244
- this.gridHeaders = new PdfGridHeaderCollection(this);
245
- }
246
- return this.gridHeaders;
247
- }
248
- /**
249
- * Indicating `initial width` of the page.
250
- * @private
251
- */
252
- public get initialWidth() : number {
253
- return this.gridInitialWidth;
254
- }
255
- public set initialWidth(value : number) {
256
- this.gridInitialWidth = value;
257
- }
258
- /**
259
- * Gets or sets the `grid style`.
260
- * @private
261
- */
262
- public get style() : PdfGridStyle {
263
- if (this.gridStyle == null) {
264
- this.gridStyle = new PdfGridStyle();
265
- }
266
- return this.gridStyle;
267
- }
268
- public set style(value : PdfGridStyle) {
269
- if (this.gridStyle == null) {
270
- this.gridStyle = value;
271
- }
272
- }
273
- /**
274
- * Gets a value indicating whether the grid column width is considered to be `page width`.
275
- * @private
276
- */
277
- public get isPageWidth() : boolean {
278
- return this.ispageWidth;
279
- }
280
- public set isPageWidth(value : boolean) {
281
- this.ispageWidth = value;
282
- }
283
- /**
284
- * Gets or set if grid `is nested grid`.
285
- * @private
286
- */
287
- public get isChildGrid() : boolean {
288
- return this.ischildGrid;
289
- }
290
- public set isChildGrid(value : boolean) {
291
- this.ischildGrid = value;
292
- }
293
- /**
294
- * Gets or set if grid ' is split or not'
295
- * @public
296
- */
297
- // public get isGridSplit() : boolean {
298
- // return this.isgridSplit;
299
- // }
300
- // public set isGridSplit(value : boolean) {
301
- // this.isgridSplit = value;
302
- // }public get isGridSplit() : boolean {
303
- // return this.isgridSplit;
304
- // }
305
- // public set isGridSplit(value : boolean) {
306
- // this.isgridSplit = value;
307
- // }
308
- /**
309
- * Gets the `size`.
310
- * @private
311
- */
312
- public get size() : SizeF {
313
- if ((this.gridSize.width === 0 || typeof this.gridSize.width === 'undefined') && this.gridSize.height === 0) {
314
- this.gridSize = this.measure();
315
- }
316
- return this.gridSize;
317
- // } else {
318
- // return this.gridSize;
319
- // }
320
- }
321
- public set size(value : SizeF) {
322
- this.gridSize = value;
323
- }
324
- public get ParentCell() : PdfGridCell{
325
- return this.parentCell;
326
- }
327
- public set ParentCell(value : PdfGridCell) {
328
- this.parentCell = value;
329
- }
330
-
331
- public get LayoutFormat() : PdfLayoutFormat {
332
- return this.layoutFormat;
333
- }
334
- //Implementation
335
- /**
336
- * `Draws` the element on the page with the specified page and 'PointF' class
337
- * @private
338
- */
339
- public draw(page : PdfPage, location : PointF) : PdfLayoutResult
340
- /**
341
- * `Draws` the element on the page with the specified page and pair of coordinates
342
- * @private
343
- */
344
- public draw(page : PdfPage, x : number, y : number) : PdfLayoutResult
345
- /**
346
- * `Draws` the element on the page with the specified page and 'RectangleF' class
347
- * @private
348
- */
349
- public draw(page : PdfPage, layoutRectangle : RectangleF) : PdfLayoutResult
350
- /**
351
- * `Draws` the element on the page with the specified page, 'PointF' class and layout format
352
- * @private
353
- */
354
- public draw(page : PdfPage, location : PointF, format : PdfLayoutFormat) : PdfLayoutResult
355
- /**
356
- * `Draws` the element on the page with the specified page, pair of coordinates and layout format
357
- * @private
358
- */
359
- public draw(page : PdfPage, x : number, y : number, format : PdfLayoutFormat) : PdfLayoutResult
360
- /**
361
- * `Draws` the element on the page.
362
- * @private
363
- */
364
- public draw(page : PdfPage, layoutRectangle : RectangleF, embedFonts : boolean) : PdfLayoutResult
365
- /**
366
- * `Draws` the element on the page with the specified page, 'RectangleF' class and layout format
367
- * @private
368
- */
369
- public draw(page : PdfPage, layoutRectangle : RectangleF, format : PdfLayoutFormat) : PdfLayoutResult
370
- public draw(arg1 : PdfPage, arg2 : RectangleF|PointF|number, arg3 ?: PdfLayoutFormat|number|boolean,
371
- arg4 ?: PdfLayoutFormat) : PdfLayoutResult {
372
- if (arg2 instanceof PointF && typeof (arg2 as RectangleF).width === 'undefined' && typeof arg3 === 'undefined') {
373
- return this.drawHelper(arg1, arg2.x, arg2.y);
374
- } else if (typeof arg2 === 'number' && typeof arg3 === 'number' && typeof arg4 === 'undefined') {
375
- return this.drawHelper(arg1, arg2, arg3, null);
376
- } else if (arg2 instanceof RectangleF && typeof (arg2 as RectangleF).width !== 'undefined' && typeof arg3 === 'undefined') {
377
- return this.drawHelper(arg1, arg2, null);
378
- } else if (arg2 instanceof PointF && typeof (arg2 as RectangleF).width === 'undefined' && arg3 instanceof PdfLayoutFormat) {
379
- return this.drawHelper(arg1, arg2.x, arg2.y, arg3);
380
- } else if (typeof arg2 === 'number' && typeof arg3 === 'number' && (arg4 instanceof PdfLayoutFormat || arg4 == null)) {
381
- let width : number = (arg1.graphics.clientSize.width - arg2);
382
- let layoutRectangle : RectangleF = new RectangleF(arg2, arg3, width, 0);
383
- return this.drawHelper(arg1, layoutRectangle, arg4);
384
- } else if (arg2 instanceof RectangleF && typeof (arg2 as RectangleF).width !== 'undefined' && typeof arg3 === 'boolean') {
385
- return this.drawHelper(arg1, arg2, null);
386
- } else {
387
- return this.drawHelper(arg1, (arg2 as RectangleF), arg3 as PdfLayoutFormat);
388
- }
389
- }
390
- /**
391
- * `measures` this instance.
392
- * @private
393
- */
394
- private measure() : SizeF {
395
- let height : number = 0;
396
- let width : number = this.columns.width;
397
- for (let i : number = 0; i < this.headers.count; i++) {
398
- let row : PdfGridRow = this.headers.getHeader(i);
399
- height += row.height;
400
- }
401
- for (let i : number = 0; i < this.rows.count; i++) {
402
- let row : PdfGridRow = this.rows.getRow(i);
403
- height += row.height;
404
- }
405
- return new SizeF(width, height);
406
- }
407
-
408
- public onBeginCellDraw(args : PdfGridBeginCellDrawEventArgs ): void {
409
- if (this.raiseBeginCellDraw) {
410
- this.beginCellDraw(this, args);
411
- }
412
- }
413
- public onEndCellDraw(args : PdfGridEndCellDrawEventArgs ): void {
414
- if (this.raiseEndCellDraw) {
415
- this.endCellDraw(this, args);
416
- }
417
- }
418
- /**
419
- * `Layouts` the specified graphics.
420
- * @private
421
- */
422
- protected layout(param : PdfLayoutParams) : PdfLayoutResult {
423
- let width: number = param.bounds.width;
424
- let height: number = param.bounds.height;
425
- let hasChanged: boolean = false;
426
- if (typeof param.bounds.width === 'undefined' || param.bounds.width === 0) {
427
- width = param.page.getClientSize().width - param.bounds.x;
428
- hasChanged = true;
429
- }
430
- if (typeof param.bounds.height === 'undefined' || param.bounds.height === 0) {
431
- height = param.page.getClientSize().height - param.bounds.y;
432
- hasChanged = true;
433
- }
434
- if (hasChanged) {
435
- param.bounds = new RectangleF(param.bounds.x, param.bounds.y, width, height);
436
- }
437
- if (this.rows.count !== 0) {
438
- let currentRow : PdfGridCellStyle = this.rows.getRow(0).cells.getCell(0).style;
439
- if (currentRow.borders != null && (( currentRow.borders.left != null && currentRow.borders.left.width !== 1) ||
440
- (currentRow.borders.top != null && currentRow.borders.top.width !== 1))) {
441
- let x : number = currentRow.borders.left.width / 2;
442
- let y : number = currentRow.borders.top.width / 2;
443
- if (param.bounds.x === PdfBorders.default.right.width / 2 && param.bounds.y === PdfBorders.default.right.width / 2) {
444
- let newBound : RectangleF = new RectangleF(x, y, this.gridSize.width, this.gridSize.height);
445
- param.bounds = newBound;
446
- }
447
- }
448
- }
449
- this.setSpan();
450
- this.checkSpan();
451
- this.layoutFormat = param.format;
452
- this._gridLocation = param.bounds;
453
- let layouter : PdfGridLayouter = new PdfGridLayouter(this);
454
- let result : PdfGridLayoutResult = (layouter.Layouter(param)) as PdfGridLayoutResult;
455
-
456
- return result;
457
- }
458
- public setSpan() : void {
459
- let colSpan : number = 1;
460
- let rowSpan : number = 1;
461
- let currentCellIndex : number = 0;
462
- let currentRowIndex : number = 0;
463
- let maxSpan : number = 0;
464
- let rowCount : number = this.headers.count;
465
- for (let i : number = 0; i < rowCount; i++) {
466
- let row : PdfGridRow = this.headers.getHeader(i);
467
- maxSpan = 0;
468
- let colCount : number = row.cells.count;
469
- for (let j : number = 0; j < colCount; j++) {
470
- let cell : PdfGridCell = row.cells.getCell(j);
471
- maxSpan = Math.max(maxSpan, cell.rowSpan);
472
- //Skip setting span map for already coverted rows/columns.
473
- if (!cell.isCellMergeContinue && !cell.isRowMergeContinue && (cell.columnSpan > 1 || cell.rowSpan > 1)) {
474
- if (cell.columnSpan + j > row.cells.count) {
475
- throw new Error('Invalid span specified at row ' + j.toString() + ' column ' + i.toString());
476
- }
477
- if (cell.rowSpan + i > this.headers.count) {
478
- throw new Error('Invalid span specified at Header ' + j.toString() + ' column ' + i.toString());
479
- }
480
- // if (this.rows.count !== 0 && cell.rowSpan + i > this.rows.count) {
481
- // throw new Error('Invalid span specified at row ' + j.toString() + ' column ' + i.toString());
482
- // }
483
- if (cell.columnSpan > 1 && cell.rowSpan > 1) {
484
- colSpan = cell.columnSpan;
485
- rowSpan = cell.rowSpan;
486
- currentCellIndex = j;
487
- currentRowIndex = i;
488
- cell.isCellMergeStart = true;
489
- cell.isRowMergeStart = true;
490
- //Set Column merges for first row
491
- while (colSpan > 1) {
492
- currentCellIndex++;
493
- row.cells.getCell(currentCellIndex).isCellMergeContinue = true;
494
- row.cells.getCell(currentCellIndex).isRowMergeContinue = true;
495
- row.cells.getCell(currentCellIndex).rowSpan = rowSpan;
496
- colSpan--;
497
- }
498
- currentCellIndex = j;
499
- colSpan = cell.columnSpan;
500
- //Set Row Merges and column merges foreach subsequent rows.
501
- while (rowSpan > 1) {
502
- currentRowIndex++;
503
- this.headers.getHeader(currentRowIndex).cells.getCell(j).isRowMergeContinue = true;
504
- this.headers.getHeader(currentRowIndex).cells.getCell(currentCellIndex).isRowMergeContinue = true;
505
- rowSpan--;
506
- while (colSpan > 1) {
507
- currentCellIndex++;
508
- this.headers.getHeader(currentRowIndex).cells.getCell(currentCellIndex).isCellMergeContinue = true;
509
- this.headers.getHeader(currentRowIndex).cells.getCell(currentCellIndex).isRowMergeContinue = true;
510
- colSpan--;
511
- }
512
- colSpan = cell.columnSpan;
513
- currentCellIndex = j;
514
- }
515
- } else if (cell.columnSpan > 1 && cell.rowSpan === 1) {
516
- colSpan = cell.columnSpan;
517
- currentCellIndex = j;
518
- cell.isCellMergeStart = true;
519
- //Set Column merges.
520
- while (colSpan > 1) {
521
- currentCellIndex++;
522
- row.cells.getCell(currentCellIndex).isCellMergeContinue = true;
523
- colSpan--;
524
- }
525
- } else if (cell.columnSpan === 1 && cell.rowSpan > 1) {
526
- rowSpan = cell.rowSpan;
527
- currentRowIndex = i;
528
- //Set row Merges.
529
- while (rowSpan > 1) {
530
- currentRowIndex++;
531
- this.headers.getHeader(currentRowIndex).cells.getCell(j).isRowMergeContinue = true;
532
- rowSpan--;
533
- }
534
- }
535
- }
536
- }
537
- row.maximumRowSpan = maxSpan;
538
- }
539
- }
540
- public checkSpan() : void {
541
- let cellcolSpan : number;
542
- let cellrowSpan : number = 1;
543
- let cellmaxSpan : number = 0;
544
- let currentCellIndex : number;
545
- let currentRowIndex : number = 0;
546
- cellcolSpan = cellrowSpan = 1;
547
- currentCellIndex = currentRowIndex = 0;
548
- if (this.hasRowSpanSpan || this.hasColumnSpan) {
549
- let rowCount : number = this.rows.count;
550
- for (let i : number = 0; i < rowCount; i++) {
551
- let row : PdfGridRow = this.rows.getRow(i);
552
- cellmaxSpan = 0;
553
- let colCount : number = row.cells.count;
554
- for (let j : number = 0; j < colCount; j++) {
555
- let cell : PdfGridCell = row.cells.getCell(j);
556
- cellmaxSpan = Math.max(cellmaxSpan, cell.rowSpan);
557
- //Skip setting span map for already coverted rows/columns.
558
- if (!cell.isCellMergeContinue && !cell.isRowMergeContinue
559
- && (cell.columnSpan > 1 || cell.rowSpan > 1)) {
560
- if (cell.columnSpan + j > row.cells.count) {
561
- throw new Error('Invalid span specified at row ' + j.toString() + ' column ' + i.toString());
562
- }
563
- if (cell.rowSpan + i > this.rows.count) {
564
- throw new Error('Invalid span specified at row ' + j.toString() + ' column ' + i.toString());
565
- }
566
- if (cell.columnSpan > 1 && cell.rowSpan > 1) {
567
- cellcolSpan = cell.columnSpan;
568
- cellrowSpan = cell.rowSpan;
569
-
570
- currentCellIndex = j;
571
- currentRowIndex = i;
572
-
573
- cell.isCellMergeStart = true;
574
- cell.isRowMergeStart = true;
575
-
576
- //Set Column merges for first row
577
- while (cellcolSpan > 1) {
578
- currentCellIndex++;
579
- row.cells.getCell(currentCellIndex).isCellMergeContinue = true;
580
- row.cells.getCell(currentCellIndex).isRowMergeContinue = true;
581
- cellcolSpan--;
582
- }
583
- currentCellIndex = j;
584
- cellcolSpan = cell.columnSpan;
585
-
586
- //Set Row Merges and column merges foreach subsequent rows.
587
- while (cellrowSpan > 1) {
588
- currentRowIndex++;
589
- this.rows.getRow(currentRowIndex).cells.getCell(j).isRowMergeContinue = true;
590
- this.rows.getRow(currentRowIndex).cells.getCell(currentCellIndex).isRowMergeContinue = true;
591
- cellrowSpan--;
592
-
593
- while (cellcolSpan > 1) {
594
- currentCellIndex++;
595
- this.rows.getRow(currentRowIndex).cells.getCell(currentCellIndex).isCellMergeContinue = true;
596
- this.rows.getRow(currentRowIndex).cells.getCell(currentCellIndex).isRowMergeContinue = true;
597
- cellcolSpan--;
598
- }
599
- cellcolSpan = cell.columnSpan;
600
- currentCellIndex = j;
601
- }
602
- } else if (cell.columnSpan > 1 && cell.rowSpan === 1) {
603
- cellcolSpan = cell.columnSpan;
604
- currentCellIndex = j;
605
- cell.isCellMergeStart = true;
606
-
607
- //Set Column merges.
608
- while (cellcolSpan > 1) {
609
- currentCellIndex++;
610
- row.cells.getCell(currentCellIndex).isCellMergeContinue = true;
611
- cellcolSpan--;
612
- }
613
- } else if (cell.columnSpan === 1 && cell.rowSpan > 1) {
614
- cellrowSpan = cell.rowSpan;
615
- currentRowIndex = i;
616
-
617
- //Set row Merges.
618
- while (cellrowSpan > 1) {
619
- currentRowIndex++;
620
- this.rows.getRow(currentRowIndex).cells.getCell(j).isRowMergeContinue = true;
621
- cellrowSpan--;
622
- }
623
- }
624
- }
625
- }
626
- row.maximumRowSpan = cellmaxSpan;
627
- }
628
- }
629
- }
630
- /* tslint:disable */
631
- /**
632
- * Calculates the `width` of the columns.
633
- * @private
634
- */
635
- public measureColumnsWidth() : void
636
- /**
637
- * Calculates the `width` of the columns.
638
- * @private
639
- */
640
- public measureColumnsWidth(bounds : RectangleF) : void
641
- public measureColumnsWidth(bounds ?: RectangleF) : void {
642
- if (typeof bounds !== 'undefined') {
643
- this.isPageWidth = false;
644
- let widths : number[] = this.columns.getDefaultWidths(bounds.width - bounds.x);
645
- //let tempWidth : number = this.columns.getColumn(0).width;
646
- for (let i : number = 0, count : number = this.columns.count; i < count; i++) {
647
- // if (this.columns.getColumn(i).width < 0)
648
- // this.columns.getColumn(i).columnWidth = widths[i];
649
- // else if (this.columns.getColumn(i).width > 0 && !this.columns.getColumn(i).isCustomWidth && widths[i]>0 && this.isComplete)
650
- this.columns.getColumn(i).columnWidth = widths[i];
651
- this.tempWidth = widths[i];
652
- }
653
- if (this.ParentCell != null && this.style.allowHorizontalOverflow == false && this.ParentCell.row.grid.style.allowHorizontalOverflow == false)
654
- {
655
- let padding : number = 0;
656
- let columnWidth : number = 0;
657
- let columnCount : number = this.columns.count;
658
- let childGridColumnWidth : number = 0;
659
- if (this.ParentCell.style.cellPadding != null || typeof this.ParentCell.style.cellPadding !== 'undefined') {
660
- if(typeof this.ParentCell.style.cellPadding.left != 'undefined' && this.ParentCell.style.cellPadding.hasLeftPad){
661
- padding += this.ParentCell.style.cellPadding.left;
662
- }
663
- if(typeof this.ParentCell.style.cellPadding.right != 'undefined' && this.ParentCell.style.cellPadding.hasRightPad){
664
- padding += this.ParentCell.style.cellPadding.right;
665
- }
666
-
667
- }
668
- for (let i : number = 0; i < this.ParentCell.columnSpan; i++)
669
- {
670
- columnWidth += this.ParentCell.row.grid.columns.getColumn(this.parentCellIndex + i).width;
671
- }
672
- for (let j : number = 0; j < this.columns.count; j++)
673
- {
674
- if (this.gridColumns.getColumn(j).width > 0 && this.gridColumns.getColumn(j).isCustomWidth)
675
- {
676
- columnWidth -= this.gridColumns.getColumn(j).width;
677
- columnCount--;
678
- }
679
- }
680
- if((this.ParentCell.row.grid.style.cellPadding != null || typeof this.ParentCell.row.grid.style.cellPadding != 'undefined'))
681
- {
682
- if(typeof this.ParentCell.row.grid.style.cellPadding.top != 'undefined' && this.ParentCell.row.grid.style.cellPadding.hasTopPad){
683
- padding += this.ParentCell.row.grid.style.cellPadding.top;
684
- }
685
- if(typeof this.ParentCell.row.grid.style.cellPadding.bottom != 'undefined' && this.ParentCell.row.grid.style.cellPadding.hasBottomPad){
686
- padding += this.ParentCell.row.grid.style.cellPadding.bottom;
687
- }
688
- }
689
- if (this.ParentCell.row.grid.style.cellSpacing != 0){
690
- columnWidth -= this.ParentCell.row.grid.style.cellSpacing * 2;
691
- }
692
- if (columnWidth > padding)
693
- {
694
- childGridColumnWidth = (columnWidth - padding) / columnCount;
695
- this.tempWidth=childGridColumnWidth;
696
- if (this.ParentCell != null )
697
- {
698
- for (let j : number = 0; j < this.columns.count; j++)
699
- {
700
- if (!this.columns.getColumn(j).isCustomWidth)
701
- this.columns.getColumn(j).columnWidth = childGridColumnWidth;
702
- }
703
- }
704
- }
705
- }
706
- // if (this.ParentCell != null && this.ParentCell.row.width > 0)
707
- // {
708
- // if (this.isChildGrid && this.gridSize.width > this.ParentCell.row.width)
709
- // {
710
- // widths = this.columns.getDefaultWidths(bounds.width);
711
- // for (let i : number = 0; i < this.columns.count; i++)
712
- // {
713
- // this.columns.getColumn(i).width = widths[i];
714
- // }
715
- // }
716
- // }
717
- } else {
718
- let widths : number[] = [this.columns.count];
719
- for(let n : number = 0; n < this.columns.count;n++)
720
- {
721
- widths[n] = 0;
722
- }
723
- let cellWidth : number = 0;
724
- let cellWidths : number = 0;
725
- if((typeof this.isChildGrid === 'undefined' && typeof this._gridLocation !== 'undefined' ) || (this.isChildGrid === null && typeof this._gridLocation !== 'undefined')){
726
- this.initialWidth = this._gridLocation.width;
727
- }
728
- if (this.headers.count > 0) {
729
- let colCount : number = this.headers.getHeader(0).cells.count;
730
- let rowCount : number = this.headers.count;
731
- for (let i : number = 0; i < colCount; i++) {
732
- cellWidth = 0;
733
- for (let j : number = 0; j < rowCount; j++) {
734
- let rowWidth : number = Math.min(this.initialWidth, this.headers.getHeader(j).cells.getCell(i).width);
735
- cellWidth = Math.max(cellWidth, rowWidth);
736
- }
737
- widths[i] = cellWidth;
738
- }
739
- }
740
- // else {
741
- // let colCount : number = this.rows.getRow(0).cells.count;
742
- // let rowCount : number = this.rows.count;
743
- // for (let i : number = 0; i < colCount; i++) {
744
- // cellWidth = 0;
745
- // for (let j : number = 0; j < rowCount; j++) {
746
- // let rowWidth : number = Math.min(this.initialWidth, this.rows.getRow(j).cells.getCell(i).width);
747
- // cellWidth = Math.max(cellWidth, rowWidth);
748
- // }
749
- // widths[i] = cellWidth;
750
- // }
751
- // }
752
- cellWidth = 0;
753
- for (let i : number = 0, colCount : number = this.columns.count; i < colCount; i++) {
754
- for (let j : number = 0, rowCount : number = this.rows.count; j < rowCount; j++) {
755
- if ((this.rows.getRow(j).cells.getCell(i).columnSpan == 1 && !this.rows.getRow(j).cells.getCell(i).isCellMergeContinue) || (this.rows.getRow(j).cells.getCell(i).value as PdfGrid) != null ) {
756
- if ((this.rows.getRow(j).cells.getCell(i).value as PdfGrid) != null && !this.rows.getRow(j).grid.style.allowHorizontalOverflow) {
757
- let value : number = this.rows.getRow(j).grid.style.cellPadding.right +
758
- this.rows.getRow(j).grid.style.cellPadding.left
759
- + this.rows.getRow(j).cells.getCell(i).style.borders.left.width / 2 ;
760
- // if (this.initialWidth != 0 )
761
- // (this.rows.getRow(j).cells.getCell(i).value as PdfGrid).initialWidth = this.initialWidth - value;
762
- }
763
- let rowWidth : number = 0;
764
- rowWidth = this.initialWidth > 0.0 ? Math.min(this.initialWidth, this.rows.getRow(j).cells.getCell(i).width) : this.rows.getRow(j).cells.getCell(i).width;
765
- // let internalWidth : number = this.rows.getRow(j).cells.getCell(i).width;
766
- // internalWidth += this.rows.getRow(j).cells.getCell(i).style.borders.left.width;
767
- // internalWidth += this.rows.getRow(j).cells.getCell(i).style.borders.right.width;
768
- // let internalHeight : number = this.rows.getRow(j).cells.getCell(i).height;
769
- // internalHeight += (this.rows.getRow(j).cells.getCell(i).style.borders.top.width);
770
- // internalHeight += (this.rows.getRow(j).cells.getCell(i).style.borders.bottom.width);
771
- // let isCorrectWidth : boolean = (internalWidth + this.gridLocation.x) > this.currentGraphics.clientSize.width;
772
- // let isCorrectHeight : boolean = (internalHeight + this.gridLocation.y) > this.currentGraphics.clientSize.height;
773
- // if (isCorrectWidth || isCorrectHeight) {
774
- // throw Error('Image size exceeds client size of the page. Can not insert this image');
775
- // }
776
- // rowWidth = Math.min(this.initialWidth, this.rows.getRow(j).cells.getCell(i).width);
777
- cellWidth = Math.max(widths[i], Math.max(cellWidth, rowWidth));
778
- cellWidth = Math.max(this.columns.getColumn(i).width, cellWidth);
779
- }
780
- }
781
- if(this.rows.count != 0)
782
- widths[i] = cellWidth;
783
- cellWidth = 0;
784
- }
785
- for (let i : number = 0, RowCount = this.rows.count; i < RowCount; i++)
786
- {
787
- for (let j : number = 0, ColCount = this.columns.count; j < ColCount; j++)
788
- {
789
- if (this.rows.getRow(i).cells.getCell(j).columnSpan > 1)
790
- {
791
- let total : number = widths[j];
792
- for (let k : number = 1; k < this.rows.getRow(i).cells.getCell(j).columnSpan; k++)
793
- {
794
- total += widths[j + k];
795
- }
796
- // if (this.rows.getRow(i).cells.getCell(j).width > total)
797
- // {
798
- // let extendedWidth : number = this.rows.getRow(i).cells.getCell(j).width - total;
799
- // extendedWidth = extendedWidth / this.rows.getRow(i).cells.getCell(j).columnSpan;
800
-
801
- // for (let k : number = j; k < j + this.rows.getRow(i).cells.getCell(j).columnSpan; k++)
802
- // widths[k] += extendedWidth;
803
- // }
804
- }
805
- }
806
- }
807
- // if (this.isChildGrid && this.initialWidth != 0)
808
- // {
809
- // widths = this.columns.getDefaultWidths(this.initialWidth);
810
- // }
811
- for (let i : number = 0, count : number = this.columns.count; i < count; i++) {
812
- if (this.columns.getColumn(i).width <= 0)
813
- this.columns.getColumn(i).columnWidth = widths[i];
814
- else if (this.columns.getColumn(i).width > 0 && !this.columns.getColumn(i).isCustomWidth)
815
- this.columns.getColumn(i).columnWidth = widths[i];
816
- }
817
- let padding : number = 0;
818
- let colWidth : number = 0;
819
- let colCount : number = this.columns.count;
820
- let childGridColWidth : number = 0;
821
- colWidth = this.tempWidth;
822
- for (let j : number = 0; j < this.columns.count; j++)
823
- {
824
- if (this.gridColumns.getColumn(j).width > 0 && this.gridColumns.getColumn(j).isCustomWidth)
825
- {
826
- colWidth -= this.gridColumns.getColumn(j).width;
827
- colCount--;
828
- }
829
- }
830
- // if (this.style.cellSpacing != 0){
831
- // colWidth -= this.style.cellSpacing * 2;
832
- // }
833
- if (colWidth > 0) {
834
- if (this.ParentCell.row.grid.style.cellSpacing != 0){
835
- colWidth -= this.ParentCell.row.grid.style.cellSpacing * 2;
836
- }
837
- }
838
- if (colWidth > padding)
839
- {
840
- childGridColWidth = (colWidth) / colCount;
841
- if (this.ParentCell != null)
842
- {
843
- for (let j : number = 0; j < this.columns.count; j++)
844
- {
845
- if (!this.columns.getColumn(j).isCustomWidth)
846
- this.columns.getColumn(j).columnWidth = childGridColWidth;
847
- }
848
- }
849
- }
850
- }
851
- }
852
-
853
- }