@syncfusion/ej2-pdf-export 30.1.42 → 31.1.17
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.
- package/dist/ej2-pdf-export.min.js +1 -1
- package/dist/ej2-pdf-export.umd.min.js +1 -1
- package/dist/global/ej2-pdf-export.min.js +1 -1
- package/dist/global/index.d.ts +1 -1
- package/dist/ts/implementation/actions/action.d.ts +50 -0
- package/dist/ts/implementation/actions/action.ts +76 -0
- package/dist/ts/implementation/actions/index.d.ts +6 -0
- package/dist/ts/implementation/actions/index.ts +6 -0
- package/dist/ts/implementation/actions/uri-action.d.ts +33 -0
- package/dist/ts/implementation/actions/uri-action.ts +52 -0
- package/dist/ts/implementation/annotations/action-link-annotation.d.ts +30 -0
- package/dist/ts/implementation/annotations/action-link-annotation.ts +43 -0
- package/dist/ts/implementation/annotations/annotation-collection.d.ts +77 -0
- package/dist/ts/implementation/annotations/annotation-collection.ts +159 -0
- package/dist/ts/implementation/annotations/annotation.d.ts +152 -0
- package/dist/ts/implementation/annotations/annotation.ts +241 -0
- package/dist/ts/implementation/annotations/document-link-annotation.d.ts +89 -0
- package/dist/ts/implementation/annotations/document-link-annotation.ts +118 -0
- package/dist/ts/implementation/annotations/index.d.ts +11 -0
- package/dist/ts/implementation/annotations/index.ts +11 -0
- package/dist/ts/implementation/annotations/link-annotation.d.ts +23 -0
- package/dist/ts/implementation/annotations/link-annotation.ts +32 -0
- package/dist/ts/implementation/annotations/pdf-text-web-link.d.ts +118 -0
- package/dist/ts/implementation/annotations/pdf-text-web-link.ts +268 -0
- package/dist/ts/implementation/annotations/uri-annotation.d.ts +48 -0
- package/dist/ts/implementation/annotations/uri-annotation.ts +86 -0
- package/dist/ts/implementation/collections/dictionary.d.ts +76 -0
- package/dist/ts/implementation/collections/dictionary.ts +150 -0
- package/dist/ts/implementation/collections/index.d.ts +7 -0
- package/dist/ts/implementation/collections/index.ts +7 -0
- package/dist/ts/implementation/collections/object-object-pair/dictionary.d.ts +62 -0
- package/dist/ts/implementation/collections/object-object-pair/dictionary.ts +125 -0
- package/dist/ts/implementation/collections/object-object-pair/index.d.ts +5 -0
- package/dist/ts/implementation/collections/object-object-pair/index.ts +5 -0
- package/dist/ts/implementation/collections/utils.d.ts +27 -0
- package/dist/ts/implementation/collections/utils.ts +38 -0
- package/dist/ts/implementation/document/automatic-fields/automatic-field-info-collection.d.ts +31 -0
- package/dist/ts/implementation/document/automatic-fields/automatic-field-info-collection.ts +39 -0
- package/dist/ts/implementation/document/automatic-fields/automatic-field-info.d.ts +67 -0
- package/dist/ts/implementation/document/automatic-fields/automatic-field-info.ts +108 -0
- package/dist/ts/implementation/document/automatic-fields/automatic-field.d.ts +41 -0
- package/dist/ts/implementation/document/automatic-fields/automatic-field.ts +127 -0
- package/dist/ts/implementation/document/automatic-fields/composite-field.d.ts +46 -0
- package/dist/ts/implementation/document/automatic-fields/composite-field.ts +76 -0
- package/dist/ts/implementation/document/automatic-fields/index.d.ts +11 -0
- package/dist/ts/implementation/document/automatic-fields/index.ts +11 -0
- package/dist/ts/implementation/document/automatic-fields/multiple-value-field.d.ts +18 -0
- package/dist/ts/implementation/document/automatic-fields/multiple-value-field.ts +37 -0
- package/dist/ts/implementation/document/automatic-fields/page-count-field.d.ts +44 -0
- package/dist/ts/implementation/document/automatic-fields/page-count-field.ts +75 -0
- package/dist/ts/implementation/document/automatic-fields/pdf-numbers-convertor.d.ts +53 -0
- package/dist/ts/implementation/document/automatic-fields/pdf-numbers-convertor.ts +157 -0
- package/dist/ts/implementation/document/automatic-fields/pdf-page-number-field.d.ts +51 -0
- package/dist/ts/implementation/document/automatic-fields/pdf-page-number-field.ts +82 -0
- package/dist/ts/implementation/document/automatic-fields/pdf-template-value-pair.d.ts +38 -0
- package/dist/ts/implementation/document/automatic-fields/pdf-template-value-pair.ts +60 -0
- package/dist/ts/implementation/document/automatic-fields/single-value-field.d.ts +15 -0
- package/dist/ts/implementation/document/automatic-fields/single-value-field.ts +48 -0
- package/dist/ts/implementation/document/index.d.ts +16 -0
- package/dist/ts/implementation/document/index.ts +16 -0
- package/dist/ts/implementation/document/pdf-catalog.d.ts +39 -0
- package/dist/ts/implementation/document/pdf-catalog.ts +65 -0
- package/dist/ts/implementation/document/pdf-document-base.d.ts +137 -0
- package/dist/ts/implementation/document/pdf-document-base.ts +187 -0
- package/dist/ts/implementation/document/pdf-document-template.d.ts +166 -0
- package/dist/ts/implementation/document/pdf-document-template.ts +310 -0
- package/dist/ts/implementation/document/pdf-document.d.ts +227 -0
- package/dist/ts/implementation/document/pdf-document.ts +361 -0
- package/dist/ts/implementation/document/pdf-viewer-preferences.d.ts +467 -0
- package/dist/ts/implementation/document/pdf-viewer-preferences.ts +578 -0
- package/dist/ts/implementation/drawing/index.d.ts +5 -0
- package/dist/ts/implementation/drawing/index.ts +5 -0
- package/dist/ts/implementation/drawing/pdf-drawing.d.ts +141 -0
- package/dist/ts/implementation/drawing/pdf-drawing.ts +218 -0
- package/dist/ts/implementation/general/enum.d.ts +21 -0
- package/dist/ts/implementation/general/enum.ts +21 -0
- package/dist/ts/implementation/general/functions/index.d.ts +6 -0
- package/dist/ts/implementation/general/functions/index.ts +6 -0
- package/dist/ts/implementation/general/functions/pdf-function.d.ts +44 -0
- package/dist/ts/implementation/general/functions/pdf-function.ts +66 -0
- package/dist/ts/implementation/general/functions/pdf-sampled-function.d.ts +25 -0
- package/dist/ts/implementation/general/functions/pdf-sampled-function.ts +63 -0
- package/dist/ts/implementation/general/index.d.ts +9 -0
- package/dist/ts/implementation/general/index.ts +9 -0
- package/dist/ts/implementation/general/pdf-cache-collection.d.ts +42 -0
- package/dist/ts/implementation/general/pdf-cache-collection.ts +97 -0
- package/dist/ts/implementation/general/pdf-collection.d.ts +26 -0
- package/dist/ts/implementation/general/pdf-collection.ts +41 -0
- package/dist/ts/implementation/general/pdf-destination.d.ts +103 -0
- package/dist/ts/implementation/general/pdf-destination.ts +170 -0
- package/dist/ts/implementation/graphics/brushes/enum.d.ts +236 -0
- package/dist/ts/implementation/graphics/brushes/enum.ts +237 -0
- package/dist/ts/implementation/graphics/brushes/index.d.ts +13 -0
- package/dist/ts/implementation/graphics/brushes/index.ts +13 -0
- package/dist/ts/implementation/graphics/brushes/pdf-blend.d.ts +105 -0
- package/dist/ts/implementation/graphics/brushes/pdf-blend.ts +294 -0
- package/dist/ts/implementation/graphics/brushes/pdf-brush.d.ts +51 -0
- package/dist/ts/implementation/graphics/brushes/pdf-brush.ts +63 -0
- package/dist/ts/implementation/graphics/brushes/pdf-brushes.d.ts +726 -0
- package/dist/ts/implementation/graphics/brushes/pdf-brushes.ts +2438 -0
- package/dist/ts/implementation/graphics/brushes/pdf-color-blend.d.ts +113 -0
- package/dist/ts/implementation/graphics/brushes/pdf-color-blend.ts +295 -0
- package/dist/ts/implementation/graphics/brushes/pdf-gradient-brush.d.ts +155 -0
- package/dist/ts/implementation/graphics/brushes/pdf-gradient-brush.ts +311 -0
- package/dist/ts/implementation/graphics/brushes/pdf-linear-gradient-brush.d.ts +147 -0
- package/dist/ts/implementation/graphics/brushes/pdf-linear-gradient-brush.ts +406 -0
- package/dist/ts/implementation/graphics/brushes/pdf-radial-gradient-brush.d.ts +122 -0
- package/dist/ts/implementation/graphics/brushes/pdf-radial-gradient-brush.ts +290 -0
- package/dist/ts/implementation/graphics/brushes/pdf-solid-brush.d.ts +77 -0
- package/dist/ts/implementation/graphics/brushes/pdf-solid-brush.ts +107 -0
- package/dist/ts/implementation/graphics/brushes/pdf-tiling-brush.d.ts +161 -0
- package/dist/ts/implementation/graphics/brushes/pdf-tiling-brush.ts +304 -0
- package/dist/ts/implementation/graphics/constants.d.ts +31 -0
- package/dist/ts/implementation/graphics/constants.ts +31 -0
- package/dist/ts/implementation/graphics/enum.d.ts +413 -0
- package/dist/ts/implementation/graphics/enum.ts +413 -0
- package/dist/ts/implementation/graphics/figures/arc.d.ts +87 -0
- package/dist/ts/implementation/graphics/figures/arc.ts +133 -0
- package/dist/ts/implementation/graphics/figures/base/draw-element.d.ts +30 -0
- package/dist/ts/implementation/graphics/figures/base/draw-element.ts +59 -0
- package/dist/ts/implementation/graphics/figures/base/element-layouter.d.ts +161 -0
- package/dist/ts/implementation/graphics/figures/base/element-layouter.ts +260 -0
- package/dist/ts/implementation/graphics/figures/base/fill-element.d.ts +46 -0
- package/dist/ts/implementation/graphics/figures/base/fill-element.ts +72 -0
- package/dist/ts/implementation/graphics/figures/base/graphics-element.d.ts +16 -0
- package/dist/ts/implementation/graphics/figures/base/graphics-element.ts +34 -0
- package/dist/ts/implementation/graphics/figures/base/index.d.ts +9 -0
- package/dist/ts/implementation/graphics/figures/base/index.ts +9 -0
- package/dist/ts/implementation/graphics/figures/base/pdf-shape-element.d.ts +40 -0
- package/dist/ts/implementation/graphics/figures/base/pdf-shape-element.ts +69 -0
- package/dist/ts/implementation/graphics/figures/base/shape-layouter.d.ts +131 -0
- package/dist/ts/implementation/graphics/figures/base/shape-layouter.ts +276 -0
- package/dist/ts/implementation/graphics/figures/base/text-layouter.d.ts +107 -0
- package/dist/ts/implementation/graphics/figures/base/text-layouter.ts +212 -0
- package/dist/ts/implementation/graphics/figures/ellipse-part.d.ts +48 -0
- package/dist/ts/implementation/graphics/figures/ellipse-part.ts +76 -0
- package/dist/ts/implementation/graphics/figures/enum.d.ts +79 -0
- package/dist/ts/implementation/graphics/figures/enum.ts +80 -0
- package/dist/ts/implementation/graphics/figures/index.d.ts +13 -0
- package/dist/ts/implementation/graphics/figures/index.ts +13 -0
- package/dist/ts/implementation/graphics/figures/layout-element.d.ts +73 -0
- package/dist/ts/implementation/graphics/figures/layout-element.ts +132 -0
- package/dist/ts/implementation/graphics/figures/path.d.ts +319 -0
- package/dist/ts/implementation/graphics/figures/path.ts +646 -0
- package/dist/ts/implementation/graphics/figures/pdf-template.d.ts +113 -0
- package/dist/ts/implementation/graphics/figures/pdf-template.ts +205 -0
- package/dist/ts/implementation/graphics/figures/rectangle-area.d.ts +64 -0
- package/dist/ts/implementation/graphics/figures/rectangle-area.ts +108 -0
- package/dist/ts/implementation/graphics/figures/text-element.d.ts +214 -0
- package/dist/ts/implementation/graphics/figures/text-element.ts +449 -0
- package/dist/ts/implementation/graphics/fonts/enum.d.ts +385 -0
- package/dist/ts/implementation/graphics/fonts/enum.ts +385 -0
- package/dist/ts/implementation/graphics/fonts/index.d.ts +16 -0
- package/dist/ts/implementation/graphics/fonts/index.ts +16 -0
- package/dist/ts/implementation/graphics/fonts/pdf-font-metrics.d.ts +164 -0
- package/dist/ts/implementation/graphics/fonts/pdf-font-metrics.ts +248 -0
- package/dist/ts/implementation/graphics/fonts/pdf-font.d.ts +187 -0
- package/dist/ts/implementation/graphics/fonts/pdf-font.ts +316 -0
- package/dist/ts/implementation/graphics/fonts/pdf-standard-font-metrics-factory.d.ts +301 -0
- package/dist/ts/implementation/graphics/fonts/pdf-standard-font-metrics-factory.ts +606 -0
- package/dist/ts/implementation/graphics/fonts/pdf-standard-font.d.ts +143 -0
- package/dist/ts/implementation/graphics/fonts/pdf-standard-font.ts +243 -0
- package/dist/ts/implementation/graphics/fonts/pdf-string-format.d.ts +321 -0
- package/dist/ts/implementation/graphics/fonts/pdf-string-format.ts +474 -0
- package/dist/ts/implementation/graphics/fonts/pdf-true-type-font.d.ts +49 -0
- package/dist/ts/implementation/graphics/fonts/pdf-true-type-font.ts +165 -0
- package/dist/ts/implementation/graphics/fonts/rtl/index.d.ts +6 -0
- package/dist/ts/implementation/graphics/fonts/rtl/index.ts +6 -0
- package/dist/ts/implementation/graphics/fonts/rtl/rtl-bidirectional.d.ts +62 -0
- package/dist/ts/implementation/graphics/fonts/rtl/rtl-bidirectional.ts +958 -0
- package/dist/ts/implementation/graphics/fonts/rtl/rtl-text-shape.d.ts +68 -0
- package/dist/ts/implementation/graphics/fonts/rtl/rtl-text-shape.ts +374 -0
- package/dist/ts/implementation/graphics/fonts/rtl-renderer.d.ts +23 -0
- package/dist/ts/implementation/graphics/fonts/rtl-renderer.ts +255 -0
- package/dist/ts/implementation/graphics/fonts/string-layouter.d.ts +254 -0
- package/dist/ts/implementation/graphics/fonts/string-layouter.ts +617 -0
- package/dist/ts/implementation/graphics/fonts/string-tokenizer.d.ts +109 -0
- package/dist/ts/implementation/graphics/fonts/string-tokenizer.ts +275 -0
- package/dist/ts/implementation/graphics/fonts/ttf-OS2-Table.d.ts +204 -0
- package/dist/ts/implementation/graphics/fonts/ttf-OS2-Table.ts +206 -0
- package/dist/ts/implementation/graphics/fonts/ttf-apple-cmap-sub-table.d.ts +17 -0
- package/dist/ts/implementation/graphics/fonts/ttf-apple-cmap-sub-table.ts +18 -0
- package/dist/ts/implementation/graphics/fonts/ttf-cmap-sub-table.d.ts +17 -0
- package/dist/ts/implementation/graphics/fonts/ttf-cmap-sub-table.ts +18 -0
- package/dist/ts/implementation/graphics/fonts/ttf-cmap-table.d.ts +13 -0
- package/dist/ts/implementation/graphics/fonts/ttf-cmap-table.ts +14 -0
- package/dist/ts/implementation/graphics/fonts/ttf-glyph-header.d.ts +25 -0
- package/dist/ts/implementation/graphics/fonts/ttf-glyph-header.ts +26 -0
- package/dist/ts/implementation/graphics/fonts/ttf-glyph-info.d.ts +25 -0
- package/dist/ts/implementation/graphics/fonts/ttf-glyph-info.ts +35 -0
- package/dist/ts/implementation/graphics/fonts/ttf-head-table.d.ts +94 -0
- package/dist/ts/implementation/graphics/fonts/ttf-head-table.ts +94 -0
- package/dist/ts/implementation/graphics/fonts/ttf-horizontal-header-table.d.ts +55 -0
- package/dist/ts/implementation/graphics/fonts/ttf-horizontal-header-table.ts +56 -0
- package/dist/ts/implementation/graphics/fonts/ttf-loca-table.d.ts +9 -0
- package/dist/ts/implementation/graphics/fonts/ttf-loca-table.ts +10 -0
- package/dist/ts/implementation/graphics/fonts/ttf-long-hor-metric.d.ts +13 -0
- package/dist/ts/implementation/graphics/fonts/ttf-long-hor-metric.ts +14 -0
- package/dist/ts/implementation/graphics/fonts/ttf-metrics.d.ts +101 -0
- package/dist/ts/implementation/graphics/fonts/ttf-metrics.ts +106 -0
- package/dist/ts/implementation/graphics/fonts/ttf-microsoft-cmap-sub-table.d.ts +57 -0
- package/dist/ts/implementation/graphics/fonts/ttf-microsoft-cmap-sub-table.ts +58 -0
- package/dist/ts/implementation/graphics/fonts/ttf-name-record.d.ts +33 -0
- package/dist/ts/implementation/graphics/fonts/ttf-name-record.ts +33 -0
- package/dist/ts/implementation/graphics/fonts/ttf-name-table.d.ts +22 -0
- package/dist/ts/implementation/graphics/fonts/ttf-name-table.ts +22 -0
- package/dist/ts/implementation/graphics/fonts/ttf-post-table.d.ts +41 -0
- package/dist/ts/implementation/graphics/fonts/ttf-post-table.ts +42 -0
- package/dist/ts/implementation/graphics/fonts/ttf-reader.d.ts +227 -0
- package/dist/ts/implementation/graphics/fonts/ttf-reader.ts +1267 -0
- package/dist/ts/implementation/graphics/fonts/ttf-table-info.d.ts +22 -0
- package/dist/ts/implementation/graphics/fonts/ttf-table-info.ts +26 -0
- package/dist/ts/implementation/graphics/fonts/ttf-trimmed-cmap-sub-table.d.ts +25 -0
- package/dist/ts/implementation/graphics/fonts/ttf-trimmed-cmap-sub-table.ts +26 -0
- package/dist/ts/implementation/graphics/fonts/unicode-true-type-font.d.ts +213 -0
- package/dist/ts/implementation/graphics/fonts/unicode-true-type-font.ts +592 -0
- package/dist/ts/implementation/graphics/images/byte-array.d.ts +74 -0
- package/dist/ts/implementation/graphics/images/byte-array.ts +137 -0
- package/dist/ts/implementation/graphics/images/image-decoder.d.ts +274 -0
- package/dist/ts/implementation/graphics/images/image-decoder.ts +439 -0
- package/dist/ts/implementation/graphics/images/index.d.ts +8 -0
- package/dist/ts/implementation/graphics/images/index.ts +8 -0
- package/dist/ts/implementation/graphics/images/pdf-bitmap.d.ts +90 -0
- package/dist/ts/implementation/graphics/images/pdf-bitmap.ts +110 -0
- package/dist/ts/implementation/graphics/images/pdf-image.d.ts +88 -0
- package/dist/ts/implementation/graphics/images/pdf-image.ts +132 -0
- package/dist/ts/implementation/graphics/index.d.ts +35 -0
- package/dist/ts/implementation/graphics/index.ts +46 -0
- package/dist/ts/implementation/graphics/pdf-color.d.ts +206 -0
- package/dist/ts/implementation/graphics/pdf-color.ts +484 -0
- package/dist/ts/implementation/graphics/pdf-graphics.d.ts +1210 -0
- package/dist/ts/implementation/graphics/pdf-graphics.ts +2556 -0
- package/dist/ts/implementation/graphics/pdf-margins.d.ts +82 -0
- package/dist/ts/implementation/graphics/pdf-margins.ts +124 -0
- package/dist/ts/implementation/graphics/pdf-pen.d.ts +237 -0
- package/dist/ts/implementation/graphics/pdf-pen.ts +370 -0
- package/dist/ts/implementation/graphics/pdf-resources.d.ts +122 -0
- package/dist/ts/implementation/graphics/pdf-resources.ts +300 -0
- package/dist/ts/implementation/graphics/pdf-transformation-matrix.d.ts +143 -0
- package/dist/ts/implementation/graphics/pdf-transformation-matrix.ts +246 -0
- package/dist/ts/implementation/graphics/pdf-transparency.d.ts +34 -0
- package/dist/ts/implementation/graphics/pdf-transparency.ts +93 -0
- package/dist/ts/implementation/graphics/unit-convertor.d.ts +72 -0
- package/dist/ts/implementation/graphics/unit-convertor.ts +96 -0
- package/dist/ts/implementation/index.d.ts +103 -0
- package/dist/ts/implementation/index.ts +103 -0
- package/dist/ts/implementation/input-output/big-endian-writer.d.ts +59 -0
- package/dist/ts/implementation/input-output/big-endian-writer.ts +121 -0
- package/dist/ts/implementation/input-output/cross-table.d.ts +21 -0
- package/dist/ts/implementation/input-output/cross-table.ts +21 -0
- package/dist/ts/implementation/input-output/enum.d.ts +16 -0
- package/dist/ts/implementation/input-output/enum.ts +16 -0
- package/dist/ts/implementation/input-output/index.d.ts +12 -0
- package/dist/ts/implementation/input-output/index.ts +12 -0
- package/dist/ts/implementation/input-output/pdf-cross-table.d.ts +259 -0
- package/dist/ts/implementation/input-output/pdf-cross-table.ts +536 -0
- package/dist/ts/implementation/input-output/pdf-dictionary-properties.d.ts +583 -0
- package/dist/ts/implementation/input-output/pdf-dictionary-properties.ts +586 -0
- package/dist/ts/implementation/input-output/pdf-main-object-collection.d.ts +120 -0
- package/dist/ts/implementation/input-output/pdf-main-object-collection.ts +194 -0
- package/dist/ts/implementation/input-output/pdf-operators.d.ts +361 -0
- package/dist/ts/implementation/input-output/pdf-operators.ts +363 -0
- package/dist/ts/implementation/input-output/pdf-stream-writer.d.ts +311 -0
- package/dist/ts/implementation/input-output/pdf-stream-writer.ts +681 -0
- package/dist/ts/implementation/input-output/pdf-writer.d.ts +122 -0
- package/dist/ts/implementation/input-output/pdf-writer.ts +164 -0
- package/dist/ts/implementation/pages/enum.d.ts +201 -0
- package/dist/ts/implementation/pages/enum.ts +201 -0
- package/dist/ts/implementation/pages/index.d.ts +17 -0
- package/dist/ts/implementation/pages/index.ts +17 -0
- package/dist/ts/implementation/pages/page-added-event-arguments.d.ts +30 -0
- package/dist/ts/implementation/pages/page-added-event-arguments.ts +39 -0
- package/dist/ts/implementation/pages/pdf-document-page-collection.d.ts +86 -0
- package/dist/ts/implementation/pages/pdf-document-page-collection.ts +180 -0
- package/dist/ts/implementation/pages/pdf-page-base.d.ts +121 -0
- package/dist/ts/implementation/pages/pdf-page-base.ts +181 -0
- package/dist/ts/implementation/pages/pdf-page-layer-collection.d.ts +99 -0
- package/dist/ts/implementation/pages/pdf-page-layer-collection.ts +348 -0
- package/dist/ts/implementation/pages/pdf-page-layer.d.ts +160 -0
- package/dist/ts/implementation/pages/pdf-page-layer.ts +271 -0
- package/dist/ts/implementation/pages/pdf-page-settings.d.ts +111 -0
- package/dist/ts/implementation/pages/pdf-page-settings.ts +192 -0
- package/dist/ts/implementation/pages/pdf-page-size.d.ts +159 -0
- package/dist/ts/implementation/pages/pdf-page-size.ts +162 -0
- package/dist/ts/implementation/pages/pdf-page-template-element.d.ts +240 -0
- package/dist/ts/implementation/pages/pdf-page-template-element.ts +663 -0
- package/dist/ts/implementation/pages/pdf-page.d.ts +153 -0
- package/dist/ts/implementation/pages/pdf-page.ts +235 -0
- package/dist/ts/implementation/pages/pdf-section-collection.d.ts +109 -0
- package/dist/ts/implementation/pages/pdf-section-collection.ts +187 -0
- package/dist/ts/implementation/pages/pdf-section-page-collection.d.ts +41 -0
- package/dist/ts/implementation/pages/pdf-section-page-collection.ts +61 -0
- package/dist/ts/implementation/pages/pdf-section-templates.d.ts +64 -0
- package/dist/ts/implementation/pages/pdf-section-templates.ts +96 -0
- package/dist/ts/implementation/pages/pdf-section.d.ts +327 -0
- package/dist/ts/implementation/pages/pdf-section.ts +644 -0
- package/dist/ts/implementation/primitives/index.d.ts +12 -0
- package/dist/ts/implementation/primitives/index.ts +12 -0
- package/dist/ts/implementation/primitives/pdf-array.d.ts +192 -0
- package/dist/ts/implementation/primitives/pdf-array.ts +386 -0
- package/dist/ts/implementation/primitives/pdf-boolean.d.ts +84 -0
- package/dist/ts/implementation/primitives/pdf-boolean.ts +119 -0
- package/dist/ts/implementation/primitives/pdf-dictionary.d.ts +362 -0
- package/dist/ts/implementation/primitives/pdf-dictionary.ts +513 -0
- package/dist/ts/implementation/primitives/pdf-name.d.ts +121 -0
- package/dist/ts/implementation/primitives/pdf-name.ts +218 -0
- package/dist/ts/implementation/primitives/pdf-number.d.ts +104 -0
- package/dist/ts/implementation/primitives/pdf-number.ts +165 -0
- package/dist/ts/implementation/primitives/pdf-reference.d.ts +223 -0
- package/dist/ts/implementation/primitives/pdf-reference.ts +430 -0
- package/dist/ts/implementation/primitives/pdf-stream.d.ts +161 -0
- package/dist/ts/implementation/primitives/pdf-stream.ts +306 -0
- package/dist/ts/implementation/primitives/pdf-string.d.ts +235 -0
- package/dist/ts/implementation/primitives/pdf-string.ts +397 -0
- package/dist/ts/implementation/structured-elements/grid/index.d.ts +4 -0
- package/dist/ts/implementation/structured-elements/grid/index.ts +10 -0
- package/dist/ts/implementation/structured-elements/grid/layout/grid-layouter.d.ts +597 -0
- package/dist/ts/implementation/structured-elements/grid/layout/grid-layouter.ts +2127 -0
- package/dist/ts/implementation/structured-elements/grid/pdf-grid-cell.d.ts +288 -0
- package/dist/ts/implementation/structured-elements/grid/pdf-grid-cell.ts +1225 -0
- package/dist/ts/implementation/structured-elements/grid/pdf-grid-column.d.ts +108 -0
- package/dist/ts/implementation/structured-elements/grid/pdf-grid-column.ts +206 -0
- package/dist/ts/implementation/structured-elements/grid/pdf-grid-row.d.ts +261 -0
- package/dist/ts/implementation/structured-elements/grid/pdf-grid-row.ts +470 -0
- package/dist/ts/implementation/structured-elements/grid/pdf-grid.d.ts +292 -0
- package/dist/ts/implementation/structured-elements/grid/pdf-grid.ts +853 -0
- package/dist/ts/implementation/structured-elements/grid/styles/index.d.ts +5 -0
- package/dist/ts/implementation/structured-elements/grid/styles/index.ts +5 -0
- package/dist/ts/implementation/structured-elements/grid/styles/pdf-borders.d.ts +146 -0
- package/dist/ts/implementation/structured-elements/grid/styles/pdf-borders.ts +238 -0
- package/dist/ts/implementation/structured-elements/grid/styles/style.d.ts +272 -0
- package/dist/ts/implementation/structured-elements/grid/styles/style.ts +423 -0
- package/dist/ts/implementation/structured-elements/index.d.ts +4 -0
- package/dist/ts/implementation/structured-elements/index.ts +10 -0
- package/dist/ts/implementation/structured-elements/tables/light-tables/enum.d.ts +16 -0
- package/dist/ts/implementation/structured-elements/tables/light-tables/enum.ts +16 -0
- package/dist/ts/index.d.ts +116 -0
- package/dist/ts/index.ts +116 -0
- package/dist/ts/interfaces/i-pdf-cache.d.ts +23 -0
- package/dist/ts/interfaces/i-pdf-cache.ts +23 -0
- package/dist/ts/interfaces/i-pdf-changable.d.ts +17 -0
- package/dist/ts/interfaces/i-pdf-changable.ts +17 -0
- package/dist/ts/interfaces/i-pdf-clonable.d.ts +12 -0
- package/dist/ts/interfaces/i-pdf-clonable.ts +12 -0
- package/dist/ts/interfaces/i-pdf-primitives.d.ts +45 -0
- package/dist/ts/interfaces/i-pdf-primitives.ts +45 -0
- package/dist/ts/interfaces/i-pdf-true-type-font.d.ts +18 -0
- package/dist/ts/interfaces/i-pdf-true-type-font.ts +48 -0
- package/dist/ts/interfaces/i-pdf-wrapper.d.ts +13 -0
- package/dist/ts/interfaces/i-pdf-wrapper.ts +13 -0
- package/dist/ts/interfaces/i-pdf-writer.d.ts +29 -0
- package/dist/ts/interfaces/i-pdf-writer.ts +29 -0
- package/dist/ts/interfaces/index.d.ts +10 -0
- package/dist/ts/interfaces/index.ts +10 -0
- package/package.json +45 -8
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export declare class ArabicShapeRenderer {
|
|
2
|
+
private readonly arabicCharTable;
|
|
3
|
+
private readonly alef;
|
|
4
|
+
private readonly alefHamza;
|
|
5
|
+
private readonly alefHamzaBelow;
|
|
6
|
+
private readonly alefMadda;
|
|
7
|
+
private readonly lam;
|
|
8
|
+
private readonly hamza;
|
|
9
|
+
private readonly zeroWidthJoiner;
|
|
10
|
+
private readonly hamzaAbove;
|
|
11
|
+
private readonly hamzaBelow;
|
|
12
|
+
private readonly wawHamza;
|
|
13
|
+
private readonly yehHamza;
|
|
14
|
+
private readonly waw;
|
|
15
|
+
private readonly alefMaksura;
|
|
16
|
+
private readonly yeh;
|
|
17
|
+
private readonly farsiYeh;
|
|
18
|
+
private readonly shadda;
|
|
19
|
+
private readonly madda;
|
|
20
|
+
private readonly lwa;
|
|
21
|
+
private readonly lwawh;
|
|
22
|
+
private readonly lwawhb;
|
|
23
|
+
private readonly lwawm;
|
|
24
|
+
private readonly bwhb;
|
|
25
|
+
private readonly fathatan;
|
|
26
|
+
private readonly superScriptalef;
|
|
27
|
+
private readonly vowel;
|
|
28
|
+
private arabicMapTable;
|
|
29
|
+
constructor();
|
|
30
|
+
private getCharacterShape;
|
|
31
|
+
shape(text: string, level: number): string;
|
|
32
|
+
private doShape;
|
|
33
|
+
private append;
|
|
34
|
+
private ligature;
|
|
35
|
+
private getShapeCount;
|
|
36
|
+
}
|
|
37
|
+
export declare class ArabicShape {
|
|
38
|
+
private shapeValue;
|
|
39
|
+
private shapeType;
|
|
40
|
+
private shapeVowel;
|
|
41
|
+
private shapeLigature;
|
|
42
|
+
private shapeShapes;
|
|
43
|
+
/**
|
|
44
|
+
* Gets or sets the values.
|
|
45
|
+
* @private
|
|
46
|
+
*/
|
|
47
|
+
Value: string;
|
|
48
|
+
/**
|
|
49
|
+
* Gets or sets the values.
|
|
50
|
+
* @private
|
|
51
|
+
*/
|
|
52
|
+
Type: string;
|
|
53
|
+
/**
|
|
54
|
+
* Gets or sets the values.
|
|
55
|
+
* @private
|
|
56
|
+
*/
|
|
57
|
+
vowel: string;
|
|
58
|
+
/**
|
|
59
|
+
* Gets or sets the values.
|
|
60
|
+
* @private
|
|
61
|
+
*/
|
|
62
|
+
Ligature: number;
|
|
63
|
+
/**
|
|
64
|
+
* Gets or sets the values.
|
|
65
|
+
* @private
|
|
66
|
+
*/
|
|
67
|
+
Shapes: number;
|
|
68
|
+
}
|
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ArabicShapeRenderer.ts class for EJ2-PDF
|
|
3
|
+
*/
|
|
4
|
+
import { Dictionary} from './../../../collections/dictionary';
|
|
5
|
+
export class ArabicShapeRenderer {
|
|
6
|
+
//#region Constants
|
|
7
|
+
private readonly arabicCharTable : string[][] = [['\u0621', '\uFE80'], ['\u0622', '\uFE81', '\uFE82'],
|
|
8
|
+
['\u0623', '\uFE83', '\uFE84'],
|
|
9
|
+
['\u0624', '\uFE85', '\uFE86'],
|
|
10
|
+
['\u0625', '\uFE87', '\uFE88'],
|
|
11
|
+
['\u0626', '\uFE89', '\uFE8A', '\uFE8B', '\uFE8C'],
|
|
12
|
+
['\u0627', '\uFE8D', '\uFE8E'],
|
|
13
|
+
['\u0628', '\uFE8F', '\uFE90', '\uFE91', '\uFE92'],
|
|
14
|
+
['\u0629', '\uFE93', '\uFE94'],
|
|
15
|
+
['\u062A', '\uFE95', '\uFE96', '\uFE97', '\uFE98'],
|
|
16
|
+
['\u062B', '\uFE99', '\uFE9A', '\uFE9B', '\uFE9C'],
|
|
17
|
+
['\u062C', '\uFE9D', '\uFE9E', '\uFE9F', '\uFEA0'],
|
|
18
|
+
['\u062D', '\uFEA1', '\uFEA2', '\uFEA3', '\uFEA4'],
|
|
19
|
+
['\u062E', '\uFEA5', '\uFEA6', '\uFEA7', '\uFEA8'],
|
|
20
|
+
['\u062F', '\uFEA9', '\uFEAA'],
|
|
21
|
+
['\u0630', '\uFEAB', '\uFEAC'],
|
|
22
|
+
['\u0631', '\uFEAD', '\uFEAE'],
|
|
23
|
+
['\u0632', '\uFEAF', '\uFEB0'],
|
|
24
|
+
['\u0633', '\uFEB1', '\uFEB2', '\uFEB3', '\uFEB4'],
|
|
25
|
+
['\u0634', '\uFEB5', '\uFEB6', '\uFEB7', '\uFEB8'],
|
|
26
|
+
['\u0635', '\uFEB9', '\uFEBA', '\uFEBB', '\uFEBC'],
|
|
27
|
+
['\u0636', '\uFEBD', '\uFEBE', '\uFEBF', '\uFEC0'],
|
|
28
|
+
['\u0637', '\uFEC1', '\uFEC2', '\uFEC3', '\uFEC4'],
|
|
29
|
+
['\u0638', '\uFEC5', '\uFEC6', '\uFEC7', '\uFEC8'],
|
|
30
|
+
['\u0639', '\uFEC9', '\uFECA', '\uFECB', '\uFECC'],
|
|
31
|
+
['\u063A', '\uFECD', '\uFECE', '\uFECF', '\uFED0'],
|
|
32
|
+
['\u0640', '\u0640', '\u0640', '\u0640', '\u0640'],
|
|
33
|
+
['\u0641', '\uFED1', '\uFED2', '\uFED3', '\uFED4'],
|
|
34
|
+
['\u0642', '\uFED5', '\uFED6', '\uFED7', '\uFED8'],
|
|
35
|
+
['\u0643', '\uFED9', '\uFEDA', '\uFEDB', '\uFEDC'],
|
|
36
|
+
['\u0644', '\uFEDD', '\uFEDE', '\uFEDF', '\uFEE0'],
|
|
37
|
+
['\u0645', '\uFEE1', '\uFEE2', '\uFEE3', '\uFEE4'],
|
|
38
|
+
['\u0646', '\uFEE5', '\uFEE6', '\uFEE7', '\uFEE8'],
|
|
39
|
+
['\u0647', '\uFEE9', '\uFEEA', '\uFEEB', '\uFEEC'],
|
|
40
|
+
['\u0648', '\uFEED', '\uFEEE'],
|
|
41
|
+
['\u0649', '\uFEEF', '\uFEF0', '\uFBE8', '\uFBE9'],
|
|
42
|
+
['\u064A', '\uFEF1', '\uFEF2', '\uFEF3', '\uFEF4'],
|
|
43
|
+
['\u0671', '\uFB50', '\uFB51'],
|
|
44
|
+
['\u0679', '\uFB66', '\uFB67', '\uFB68', '\uFB69'],
|
|
45
|
+
['\u067A', '\uFB5E', '\uFB5F', '\uFB60', '\uFB61'],
|
|
46
|
+
['\u067B', '\uFB52', '\uFB53', '\uFB54', '\uFB55'],
|
|
47
|
+
['\u067E', '\uFB56', '\uFB57', '\uFB58', '\uFB59'],
|
|
48
|
+
['\u067F', '\uFB62', '\uFB63', '\uFB64', '\uFB65'],
|
|
49
|
+
['\u0680', '\uFB5A', '\uFB5B', '\uFB5C', '\uFB5D'],
|
|
50
|
+
['\u0683', '\uFB76', '\uFB77', '\uFB78', '\uFB79'],
|
|
51
|
+
['\u0684', '\uFB72', '\uFB73', '\uFB74', '\uFB75'],
|
|
52
|
+
['\u0686', '\uFB7A', '\uFB7B', '\uFB7C', '\uFB7D'],
|
|
53
|
+
['\u0687', '\uFB7E', '\uFB7F', '\uFB80', '\uFB81'],
|
|
54
|
+
['\u0688', '\uFB88', '\uFB89'],
|
|
55
|
+
['\u068C', '\uFB84', '\uFB85'],
|
|
56
|
+
['\u068D', '\uFB82', '\uFB83'],
|
|
57
|
+
['\u068E', '\uFB86', '\uFB87'],
|
|
58
|
+
['\u0691', '\uFB8C', '\uFB8D'],
|
|
59
|
+
['\u0698', '\uFB8A', '\uFB8B'],
|
|
60
|
+
['\u06A4', '\uFB6A', '\uFB6B', '\uFB6C', '\uFB6D'],
|
|
61
|
+
['\u06A6', '\uFB6E', '\uFB6F', '\uFB70', '\uFB71'],
|
|
62
|
+
['\u06A9', '\uFB8E', '\uFB8F', '\uFB90', '\uFB91'],
|
|
63
|
+
['\u06AD', '\uFBD3', '\uFBD4', '\uFBD5', '\uFBD6'],
|
|
64
|
+
['\u06AF', '\uFB92', '\uFB93', '\uFB94', '\uFB95'],
|
|
65
|
+
['\u06B1', '\uFB9A', '\uFB9B', '\uFB9C', '\uFB9D'],
|
|
66
|
+
['\u06B3', '\uFB96', '\uFB97', '\uFB98', '\uFB99'],
|
|
67
|
+
['\u06BA', '\uFB9E', '\uFB9F'],
|
|
68
|
+
['\u06BB', '\uFBA0', '\uFBA1', '\uFBA2', '\uFBA3'],
|
|
69
|
+
['\u06BE', '\uFBAA', '\uFBAB', '\uFBAC', '\uFBAD'],
|
|
70
|
+
['\u06C0', '\uFBA4', '\uFBA5'],
|
|
71
|
+
['\u06C1', '\uFBA6', '\uFBA7', '\uFBA8', '\uFBA9'],
|
|
72
|
+
['\u06C5', '\uFBE0', '\uFBE1'],
|
|
73
|
+
['\u06C6', '\uFBD9', '\uFBDA'],
|
|
74
|
+
['\u06C7', '\uFBD7', '\uFBD8'],
|
|
75
|
+
['\u06C8', '\uFBDB', '\uFBDC'],
|
|
76
|
+
['\u06C9', '\uFBE2', '\uFBE3'],
|
|
77
|
+
['\u06CB', '\uFBDE', '\uFBDF'],
|
|
78
|
+
['\u06CC', '\uFBFC', '\uFBFD', '\uFBFE', '\uFBFF'],
|
|
79
|
+
['\u06D0', '\uFBE4', '\uFBE5', '\uFBE6', '\uFBE7'],
|
|
80
|
+
['\u06D2', '\uFBAE', '\uFBAF'],
|
|
81
|
+
['\u06D3', '\uFBB0', '\uFBB1']
|
|
82
|
+
];
|
|
83
|
+
private readonly alef : string = '\u0627';
|
|
84
|
+
private readonly alefHamza : string = '\u0623';
|
|
85
|
+
private readonly alefHamzaBelow : string = '\u0625';
|
|
86
|
+
private readonly alefMadda : string = '\u0622';
|
|
87
|
+
private readonly lam : string = '\u0644';
|
|
88
|
+
private readonly hamza : string = '\u0621';
|
|
89
|
+
private readonly zeroWidthJoiner : string = '\u200D';
|
|
90
|
+
private readonly hamzaAbove : string = '\u0654';
|
|
91
|
+
private readonly hamzaBelow : string = '\u0655';
|
|
92
|
+
private readonly wawHamza : string = '\u0624';
|
|
93
|
+
private readonly yehHamza : string = '\u0626';
|
|
94
|
+
private readonly waw : string = '\u0648';
|
|
95
|
+
private readonly alefMaksura : string = '\u0649';
|
|
96
|
+
private readonly yeh : string = '\u064A';
|
|
97
|
+
private readonly farsiYeh : string = '\u06CC';
|
|
98
|
+
private readonly shadda : string = '\u0651';
|
|
99
|
+
private readonly madda : string = '\u0653';
|
|
100
|
+
private readonly lwa : string = '\uFEFB';
|
|
101
|
+
private readonly lwawh : string = '\uFEF7';
|
|
102
|
+
private readonly lwawhb : string = '\uFEF9';
|
|
103
|
+
private readonly lwawm : string = '\uFEF5';
|
|
104
|
+
private readonly bwhb : string = '\u06D3';
|
|
105
|
+
private readonly fathatan : string = '\u064B';
|
|
106
|
+
private readonly superScriptalef : string = '\u0670';
|
|
107
|
+
private readonly vowel : number = 0x1;
|
|
108
|
+
// #endregion
|
|
109
|
+
//#region Fields
|
|
110
|
+
private arabicMapTable : Dictionary<string, string[]> = new Dictionary<string, string[]>();
|
|
111
|
+
//#endregion
|
|
112
|
+
//#region Constructor
|
|
113
|
+
public constructor() {
|
|
114
|
+
for (let i : number = 0; i < this.arabicCharTable.length; i++) {
|
|
115
|
+
this.arabicMapTable.setValue(this.arabicCharTable[i][0], this.arabicCharTable[i]);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
//#endregion
|
|
119
|
+
//#region implementation
|
|
120
|
+
private getCharacterShape( input : string, index : number) : string {
|
|
121
|
+
if ((input >= this.hamza) && (input <= this.bwhb)) {
|
|
122
|
+
let value : string[] = [];
|
|
123
|
+
if (this.arabicMapTable.getValue(input)) {
|
|
124
|
+
value = this.arabicMapTable.getValue(input);
|
|
125
|
+
return value[index + 1];
|
|
126
|
+
}
|
|
127
|
+
} else if (input >= this.lwawm && input <= this.lwa) {
|
|
128
|
+
return (input) as string;
|
|
129
|
+
}
|
|
130
|
+
return input;
|
|
131
|
+
}
|
|
132
|
+
public shape( text : string, level : number) : string {
|
|
133
|
+
let builder : string = '';
|
|
134
|
+
let str2 : string = '';
|
|
135
|
+
for (let i : number = 0; i < text.length; i++) {
|
|
136
|
+
let c : string = text[i];
|
|
137
|
+
if (c >= '' && c <= 'ۿ') {
|
|
138
|
+
//if(c>= 0x0600.toString() && c<= 0x06FF.toString()) {
|
|
139
|
+
str2 = str2 + c;
|
|
140
|
+
} else {
|
|
141
|
+
if (str2.length > 0) {
|
|
142
|
+
let st : string = this.doShape(str2.toString(), 0);
|
|
143
|
+
builder = builder + st;
|
|
144
|
+
str2 = '';
|
|
145
|
+
}
|
|
146
|
+
builder = builder + c;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
if (str2.length > 0) {
|
|
150
|
+
let st : string = this.doShape(str2.toString(), 0);
|
|
151
|
+
builder = builder + st;
|
|
152
|
+
}
|
|
153
|
+
return builder.toString();
|
|
154
|
+
}
|
|
155
|
+
private doShape(input : string, level: number) : string {
|
|
156
|
+
let str : string = '';
|
|
157
|
+
let ligature : number = 0;
|
|
158
|
+
let len : number = 0;
|
|
159
|
+
let i : number = 0;
|
|
160
|
+
let next : string = '';
|
|
161
|
+
let previous : ArabicShape = new ArabicShape();
|
|
162
|
+
let present : ArabicShape = new ArabicShape();
|
|
163
|
+
while (i < input.length) {
|
|
164
|
+
next = input[i++];
|
|
165
|
+
ligature = this.ligature(next, present);
|
|
166
|
+
if (ligature === 0) {
|
|
167
|
+
let shapeCount : number = this.getShapeCount(next);
|
|
168
|
+
len = (shapeCount === 1) ? 0 : 2;
|
|
169
|
+
if (previous.Shapes > 2) {
|
|
170
|
+
len += 1;
|
|
171
|
+
}
|
|
172
|
+
len = len % (present.Shapes);
|
|
173
|
+
present.Value = this.getCharacterShape(present.Value, len);
|
|
174
|
+
str = this.append(str, previous, level);
|
|
175
|
+
previous = present;
|
|
176
|
+
present = new ArabicShape();
|
|
177
|
+
present.Value = next;
|
|
178
|
+
present.Shapes = shapeCount;
|
|
179
|
+
present.Ligature++;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
len = (previous.Shapes > 2) ? 1 : 0;
|
|
183
|
+
len = len % (present.Shapes);
|
|
184
|
+
present.Value = this.getCharacterShape(present.Value, len);
|
|
185
|
+
str = this.append(str, previous, level);
|
|
186
|
+
str = this.append(str, present, level);
|
|
187
|
+
return str.toString();
|
|
188
|
+
}
|
|
189
|
+
private append( builder : string, shape : ArabicShape, level : number) : string {
|
|
190
|
+
if (shape.Value !== '') {
|
|
191
|
+
builder = builder + shape.Value;
|
|
192
|
+
shape.Ligature -= 1;
|
|
193
|
+
if (shape.Type !== '') {
|
|
194
|
+
if ((level & this.vowel) === 0) {
|
|
195
|
+
builder = builder + shape.Type;
|
|
196
|
+
shape.Ligature -= 1;
|
|
197
|
+
} else {
|
|
198
|
+
shape.Ligature -= 1;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
if (shape.vowel !== '') {
|
|
202
|
+
if ((level & this.vowel) === 0) {
|
|
203
|
+
builder = builder + shape.vowel;
|
|
204
|
+
shape.Ligature -= 1;
|
|
205
|
+
} else {
|
|
206
|
+
shape.Ligature -= 1;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
return builder;
|
|
211
|
+
}
|
|
212
|
+
private ligature(value : string, shape : ArabicShape): number {
|
|
213
|
+
if (shape.Value !== '') {
|
|
214
|
+
let result : number = 0;
|
|
215
|
+
if ((value >= this.fathatan && value <= this.hamzaBelow) || value === this.superScriptalef) {
|
|
216
|
+
result = 1;
|
|
217
|
+
if ((shape.vowel !== '') && (value !== this.shadda)) {
|
|
218
|
+
result = 2;
|
|
219
|
+
}
|
|
220
|
+
if (value === this.shadda) {
|
|
221
|
+
if (shape.Type == null) {
|
|
222
|
+
shape.Type = this.shadda;
|
|
223
|
+
} else {
|
|
224
|
+
return 0;
|
|
225
|
+
}
|
|
226
|
+
} else if (value === this.hamzaBelow) {
|
|
227
|
+
if (shape.Value === this.alef) {
|
|
228
|
+
shape.Value = this.alefHamzaBelow;
|
|
229
|
+
result = 2;
|
|
230
|
+
} else if (value === this.lwa) {
|
|
231
|
+
shape.Value = this.lwawhb;
|
|
232
|
+
result = 2;
|
|
233
|
+
} else {
|
|
234
|
+
shape.Type = this.hamzaBelow;
|
|
235
|
+
}
|
|
236
|
+
} else if (value === this.hamzaAbove) {
|
|
237
|
+
if (shape.Value === this.alef) {
|
|
238
|
+
shape.Value = this.alefHamza;
|
|
239
|
+
result = 2;
|
|
240
|
+
} else if (shape.Value === this.lwa) {
|
|
241
|
+
shape.Value = this.lwawh;
|
|
242
|
+
result = 2;
|
|
243
|
+
} else if (shape.Value === this.waw) {
|
|
244
|
+
shape.Value = this.wawHamza;
|
|
245
|
+
result = 2;
|
|
246
|
+
} else if (shape.Value === this.yeh || shape.Value === this.alefMaksura || shape.Value === this.farsiYeh) {
|
|
247
|
+
shape.Value = this.yehHamza;
|
|
248
|
+
result = 2;
|
|
249
|
+
} else {
|
|
250
|
+
shape.Type = this.hamzaAbove;
|
|
251
|
+
}
|
|
252
|
+
} else if (value === this.madda) {
|
|
253
|
+
if (shape.Value === this.alef) {
|
|
254
|
+
shape.Value = this.alefMadda;
|
|
255
|
+
result = 2;
|
|
256
|
+
}
|
|
257
|
+
} else {
|
|
258
|
+
shape.vowel = value;
|
|
259
|
+
}
|
|
260
|
+
if (result === 1) {
|
|
261
|
+
shape.Ligature++;
|
|
262
|
+
}
|
|
263
|
+
return result;
|
|
264
|
+
}
|
|
265
|
+
if (shape.vowel !== '') {
|
|
266
|
+
return 0;
|
|
267
|
+
}
|
|
268
|
+
if (shape.Value === this.lam) {
|
|
269
|
+
if (value === this.alef) {
|
|
270
|
+
shape.Value = this.lwa;
|
|
271
|
+
shape.Shapes = 2;
|
|
272
|
+
result = 3;
|
|
273
|
+
} else if (value === this.alefHamza) {
|
|
274
|
+
shape.Value = this.lwawh;
|
|
275
|
+
shape.Shapes = 2;
|
|
276
|
+
result = 3;
|
|
277
|
+
} else if (value === this.alefHamzaBelow) {
|
|
278
|
+
shape.Value = this.lwawhb;
|
|
279
|
+
shape.Shapes = 2;
|
|
280
|
+
result = 3;
|
|
281
|
+
} else if (value === this.alefMadda) {
|
|
282
|
+
shape.Value = this.lwawm;
|
|
283
|
+
shape.Shapes = 2;
|
|
284
|
+
result = 3;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
// else if (shape.Value === '') {
|
|
288
|
+
// shape.Value = value;
|
|
289
|
+
// shape.Shapes = this.getShapeCount(value);
|
|
290
|
+
// result = 1;
|
|
291
|
+
// }
|
|
292
|
+
return result;
|
|
293
|
+
} else {
|
|
294
|
+
return 0;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
private getShapeCount(shape : string): number {
|
|
298
|
+
if ((shape >= this.hamza) && (shape <= this.bwhb) && !((shape >= this.fathatan && shape <= this.hamzaBelow)
|
|
299
|
+
|| shape === this.superScriptalef)) {
|
|
300
|
+
let c : string[] = [];
|
|
301
|
+
if (this.arabicMapTable.getValue(shape)) {
|
|
302
|
+
c = this.arabicMapTable.getValue(shape);
|
|
303
|
+
return c.length - 1;
|
|
304
|
+
}
|
|
305
|
+
} else if (shape === this.zeroWidthJoiner) {
|
|
306
|
+
return 4;
|
|
307
|
+
}
|
|
308
|
+
return 1;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
//#endregion
|
|
312
|
+
//#region Internals
|
|
313
|
+
export class ArabicShape {
|
|
314
|
+
//#region Fields
|
|
315
|
+
private shapeValue : string = '';
|
|
316
|
+
private shapeType : string = '';
|
|
317
|
+
private shapeVowel : string = '';
|
|
318
|
+
private shapeLigature : number = 0;
|
|
319
|
+
private shapeShapes : number = 1;
|
|
320
|
+
//#endregion
|
|
321
|
+
//#region Properties
|
|
322
|
+
/**
|
|
323
|
+
* Gets or sets the values.
|
|
324
|
+
* @private
|
|
325
|
+
*/
|
|
326
|
+
public get Value() : string {
|
|
327
|
+
return this.shapeValue;
|
|
328
|
+
}
|
|
329
|
+
public set Value(value : string) {
|
|
330
|
+
this.shapeValue = value;
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Gets or sets the values.
|
|
334
|
+
* @private
|
|
335
|
+
*/
|
|
336
|
+
public get Type() : string {
|
|
337
|
+
return this.shapeType;
|
|
338
|
+
}
|
|
339
|
+
public set Type(value : string) {
|
|
340
|
+
this.shapeType = value;
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* Gets or sets the values.
|
|
344
|
+
* @private
|
|
345
|
+
*/
|
|
346
|
+
public get vowel() : string {
|
|
347
|
+
return this.shapeVowel;
|
|
348
|
+
}
|
|
349
|
+
public set vowel(value : string) {
|
|
350
|
+
this.shapeVowel = value;
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* Gets or sets the values.
|
|
354
|
+
* @private
|
|
355
|
+
*/
|
|
356
|
+
public get Ligature() : number {
|
|
357
|
+
return this.shapeLigature;
|
|
358
|
+
}
|
|
359
|
+
public set Ligature(value : number) {
|
|
360
|
+
this.shapeLigature = value;
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* Gets or sets the values.
|
|
364
|
+
* @private
|
|
365
|
+
*/
|
|
366
|
+
public get Shapes() : number {
|
|
367
|
+
return this.shapeShapes;
|
|
368
|
+
}
|
|
369
|
+
public set Shapes(value : number) {
|
|
370
|
+
this.shapeShapes = value;
|
|
371
|
+
}
|
|
372
|
+
//#endregion
|
|
373
|
+
}
|
|
374
|
+
//#endregion
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RTL-Renderer.ts class for EJ2-PDF
|
|
3
|
+
*/
|
|
4
|
+
import { PdfStringFormat } from './pdf-string-format';
|
|
5
|
+
import { PdfTrueTypeFont } from './pdf-true-type-font';
|
|
6
|
+
/**
|
|
7
|
+
* `Metrics` of the font.
|
|
8
|
+
* @private
|
|
9
|
+
*/
|
|
10
|
+
export declare class RtlRenderer {
|
|
11
|
+
private readonly openBracket;
|
|
12
|
+
private readonly closeBracket;
|
|
13
|
+
layout(line: string, font: PdfTrueTypeFont, rtl: boolean, wordSpace: boolean, format: PdfStringFormat): string[];
|
|
14
|
+
splitLayout(line: string, font: PdfTrueTypeFont, rtl: boolean, wordSpace: boolean, format: PdfStringFormat): string[];
|
|
15
|
+
getGlyphIndex(line: string, font: PdfTrueTypeFont, rtl: boolean, /*out*/ glyphs: Uint16Array, custom?: boolean | null): {
|
|
16
|
+
success: boolean;
|
|
17
|
+
glyphs: Uint16Array;
|
|
18
|
+
};
|
|
19
|
+
customLayout(line: string, rtl: boolean, format: PdfStringFormat): string;
|
|
20
|
+
customLayout(line: string, rtl: boolean, format: PdfStringFormat, font: PdfTrueTypeFont, wordSpace: boolean): string[];
|
|
21
|
+
addChars(font: PdfTrueTypeFont, glyphs: string): string;
|
|
22
|
+
customSplitLayout(line: string, font: PdfTrueTypeFont, rtl: boolean, wordSpace: boolean, format: PdfStringFormat): string[];
|
|
23
|
+
}
|