@syncfusion/ej2-pdf-export 30.2.4 → 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,606 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PdfStandardFontMetricsFactory.ts class for EJ2-PDF
|
|
3
|
+
*/
|
|
4
|
+
import { PdfFontStyle, PdfFontFamily } from './enum';
|
|
5
|
+
import { PdfFontMetrics, StandardWidthTable } from './pdf-font-metrics';
|
|
6
|
+
/**
|
|
7
|
+
* @private
|
|
8
|
+
* `Factory of the standard fonts metrics`.
|
|
9
|
+
*/
|
|
10
|
+
export class PdfStandardFontMetricsFactory {
|
|
11
|
+
/**
|
|
12
|
+
* `Multiplier` os subscript superscript.
|
|
13
|
+
* @private
|
|
14
|
+
*/
|
|
15
|
+
private static readonly subSuperScriptFactor : number = 1.52;
|
|
16
|
+
/**
|
|
17
|
+
* `Ascender` value for the font.
|
|
18
|
+
* @private
|
|
19
|
+
*/
|
|
20
|
+
private static readonly helveticaAscent : number = 931;
|
|
21
|
+
/**
|
|
22
|
+
* `Ascender` value for the font.
|
|
23
|
+
* @private
|
|
24
|
+
*/
|
|
25
|
+
private static readonly helveticaDescent : number = -225;
|
|
26
|
+
/**
|
|
27
|
+
* `Font type`.
|
|
28
|
+
* @private
|
|
29
|
+
*/
|
|
30
|
+
private static readonly helveticaName : string = 'Helvetica';
|
|
31
|
+
/**
|
|
32
|
+
* `Ascender` value for the font.
|
|
33
|
+
* @private
|
|
34
|
+
*/
|
|
35
|
+
private static readonly helveticaBoldAscent : number = 962;
|
|
36
|
+
/**
|
|
37
|
+
* `Ascender` value for the font.
|
|
38
|
+
* @private
|
|
39
|
+
*/
|
|
40
|
+
private static readonly helveticaBoldDescent : number = -228;
|
|
41
|
+
/**
|
|
42
|
+
* `Font type`.
|
|
43
|
+
* @private
|
|
44
|
+
*/
|
|
45
|
+
private static readonly helveticaBoldName : string = 'Helvetica-Bold';
|
|
46
|
+
/**
|
|
47
|
+
* `Ascender` value for the font.
|
|
48
|
+
* @private
|
|
49
|
+
*/
|
|
50
|
+
private static readonly helveticaItalicAscent : number = 931;
|
|
51
|
+
/**
|
|
52
|
+
* `Ascender` value for the font.
|
|
53
|
+
* @private
|
|
54
|
+
*/
|
|
55
|
+
private static readonly helveticaItalicDescent : number = -225;
|
|
56
|
+
/**
|
|
57
|
+
* `Font type`.
|
|
58
|
+
* @private
|
|
59
|
+
*/
|
|
60
|
+
private static readonly helveticaItalicName : string = 'Helvetica-Oblique';
|
|
61
|
+
/**
|
|
62
|
+
* `Ascender` value for the font.
|
|
63
|
+
* @private
|
|
64
|
+
*/
|
|
65
|
+
private static readonly helveticaBoldItalicAscent : number = 962;
|
|
66
|
+
/**
|
|
67
|
+
* `Ascender` value for the font.
|
|
68
|
+
* @private
|
|
69
|
+
*/
|
|
70
|
+
private static readonly helveticaBoldItalicDescent : number = -228;
|
|
71
|
+
/**
|
|
72
|
+
* `Font type`.
|
|
73
|
+
* @private
|
|
74
|
+
*/
|
|
75
|
+
private static readonly helveticaBoldItalicName : string = 'Helvetica-BoldOblique';
|
|
76
|
+
/**
|
|
77
|
+
* `Ascender` value for the font.
|
|
78
|
+
* @private
|
|
79
|
+
*/
|
|
80
|
+
private static readonly courierAscent : number = 805;
|
|
81
|
+
/**
|
|
82
|
+
* `Ascender` value for the font.
|
|
83
|
+
* @private
|
|
84
|
+
*/
|
|
85
|
+
private static readonly courierDescent : number = -250;
|
|
86
|
+
/**
|
|
87
|
+
* `Font type`.
|
|
88
|
+
* @private
|
|
89
|
+
*/
|
|
90
|
+
private static readonly courierName : string = 'Courier';
|
|
91
|
+
/**
|
|
92
|
+
* `Ascender` value for the font.
|
|
93
|
+
* @private
|
|
94
|
+
*/
|
|
95
|
+
private static readonly courierBoldAscent : number = 801;
|
|
96
|
+
/**
|
|
97
|
+
* `Ascender` value for the font.
|
|
98
|
+
* @private
|
|
99
|
+
*/
|
|
100
|
+
private static readonly courierBoldDescent : number = -250;
|
|
101
|
+
/**
|
|
102
|
+
* `Font type`.
|
|
103
|
+
* @private
|
|
104
|
+
*/
|
|
105
|
+
private static readonly courierBoldName : string = 'Courier-Bold';
|
|
106
|
+
/**
|
|
107
|
+
* `Ascender` value for the font.
|
|
108
|
+
* @private
|
|
109
|
+
*/
|
|
110
|
+
private static readonly courierItalicAscent : number = 805;
|
|
111
|
+
/**
|
|
112
|
+
* `Ascender` value for the font.
|
|
113
|
+
* @private
|
|
114
|
+
*/
|
|
115
|
+
private static readonly courierItalicDescent : number = -250;
|
|
116
|
+
/**
|
|
117
|
+
* `Font type`.
|
|
118
|
+
* @private
|
|
119
|
+
*/
|
|
120
|
+
private static readonly courierItalicName : string = 'Courier-Oblique';
|
|
121
|
+
/**
|
|
122
|
+
* `Ascender` value for the font.
|
|
123
|
+
* @private
|
|
124
|
+
*/
|
|
125
|
+
private static readonly courierBoldItalicAscent : number = 801;
|
|
126
|
+
/**
|
|
127
|
+
* `Ascender` value for the font.
|
|
128
|
+
* @private
|
|
129
|
+
*/
|
|
130
|
+
private static readonly courierBoldItalicDescent : number = -250;
|
|
131
|
+
/**
|
|
132
|
+
* `Font type`.
|
|
133
|
+
* @private
|
|
134
|
+
*/
|
|
135
|
+
private static readonly courierBoldItalicName : string = 'Courier-BoldOblique';
|
|
136
|
+
/**
|
|
137
|
+
* `Ascender` value for the font.
|
|
138
|
+
* @private
|
|
139
|
+
*/
|
|
140
|
+
private static readonly timesAscent : number = 898;
|
|
141
|
+
/**
|
|
142
|
+
* `Ascender` value for the font.
|
|
143
|
+
* @private
|
|
144
|
+
*/
|
|
145
|
+
private static readonly timesDescent : number = -218;
|
|
146
|
+
/**
|
|
147
|
+
* `Font type`.
|
|
148
|
+
* @private
|
|
149
|
+
*/
|
|
150
|
+
private static readonly timesName : string = 'Times-Roman';
|
|
151
|
+
/**
|
|
152
|
+
* `Ascender` value for the font.
|
|
153
|
+
* @private
|
|
154
|
+
*/
|
|
155
|
+
private static readonly timesBoldAscent : number = 935;
|
|
156
|
+
/**
|
|
157
|
+
* `Ascender` value for the font.
|
|
158
|
+
* @private
|
|
159
|
+
*/
|
|
160
|
+
private static readonly timesBoldDescent : number = -218;
|
|
161
|
+
/**
|
|
162
|
+
* `Font type`.
|
|
163
|
+
* @private
|
|
164
|
+
*/
|
|
165
|
+
private static readonly timesBoldName : string = 'Times-Bold';
|
|
166
|
+
/**
|
|
167
|
+
* `Ascender` value for the font.
|
|
168
|
+
* @private
|
|
169
|
+
*/
|
|
170
|
+
private static readonly timesItalicAscent : number = 883;
|
|
171
|
+
/**
|
|
172
|
+
* `Ascender` value for the font.
|
|
173
|
+
* @private
|
|
174
|
+
*/
|
|
175
|
+
private static readonly timesItalicDescent : number = -217;
|
|
176
|
+
/**
|
|
177
|
+
* `Font type`.
|
|
178
|
+
* @private
|
|
179
|
+
*/
|
|
180
|
+
private static readonly timesItalicName : string = 'Times-Italic';
|
|
181
|
+
/**
|
|
182
|
+
* `Ascender` value for the font.
|
|
183
|
+
* @private
|
|
184
|
+
*/
|
|
185
|
+
private static readonly timesBoldItalicAscent : number = 921;
|
|
186
|
+
/**
|
|
187
|
+
* `Ascender` value for the font.
|
|
188
|
+
* @private
|
|
189
|
+
*/
|
|
190
|
+
private static readonly timesBoldItalicDescent : number = -218;
|
|
191
|
+
/**
|
|
192
|
+
* `Font type`.
|
|
193
|
+
* @private
|
|
194
|
+
*/
|
|
195
|
+
private static readonly timesBoldItalicName : string = 'Times-BoldItalic';
|
|
196
|
+
/**
|
|
197
|
+
* `Ascender` value for the font.
|
|
198
|
+
* @private
|
|
199
|
+
*/
|
|
200
|
+
private static readonly symbolAscent : number = 1010;
|
|
201
|
+
/**
|
|
202
|
+
* `Ascender` value for the font.
|
|
203
|
+
* @private
|
|
204
|
+
*/
|
|
205
|
+
private static readonly symbolDescent : number = -293;
|
|
206
|
+
/**
|
|
207
|
+
* `Font type`.
|
|
208
|
+
* @private
|
|
209
|
+
*/
|
|
210
|
+
private static readonly symbolName : string = 'Symbol';
|
|
211
|
+
/**
|
|
212
|
+
* `Ascender` value for the font.
|
|
213
|
+
* @private
|
|
214
|
+
*/
|
|
215
|
+
private static readonly zapfDingbatsAscent : number = 820;
|
|
216
|
+
/**
|
|
217
|
+
* `Ascender` value for the font.
|
|
218
|
+
* @private
|
|
219
|
+
*/
|
|
220
|
+
private static readonly zapfDingbatsDescent : number = -143;
|
|
221
|
+
/**
|
|
222
|
+
* `Font type`.
|
|
223
|
+
* @private
|
|
224
|
+
*/
|
|
225
|
+
private static readonly zapfDingbatsName : string = 'ZapfDingbats';
|
|
226
|
+
/**
|
|
227
|
+
* `Arial` widths table.
|
|
228
|
+
* @private
|
|
229
|
+
*/
|
|
230
|
+
private static arialWidth : number[] =
|
|
231
|
+
[
|
|
232
|
+
278, 278, 355, 556, 556, 889, 667, 191, 333, 333, 389, 584, 278, 333,
|
|
233
|
+
278, 278, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 278, 278, 584, 584,
|
|
234
|
+
584, 556, 1015, 667, 667, 722, 722, 667, 611, 778, 722, 278, 500, 667, 556, 833,
|
|
235
|
+
722, 778, 667, 778, 722, 667, 611, 722, 667, 944, 667, 667, 611, 278, 278, 278,
|
|
236
|
+
469, 556, 333, 556, 556, 500, 556, 556, 278, 556, 556, 222, 222, 500, 222, 833,
|
|
237
|
+
556, 556, 556, 556, 333, 500, 278, 556, 500, 722, 500, 500, 500, 334, 260, 334,
|
|
238
|
+
584, 0, 556, 0, 222, 556, 333, 1000, 556, 556, 333, 1000, 667, 333, 1000, 0,
|
|
239
|
+
611, 0, 0, 222, 222, 333, 333, 350, 556, 1000, 333, 1000, 500, 333, 944, 0,
|
|
240
|
+
500, 667, 0, 333, 556, 556, 556, 556, 260, 556, 333, 737, 370, 556, 584, 0,
|
|
241
|
+
737, 333, 400, 584, 333, 333, 333, 556, 537, 278, 333, 333, 365, 556, 834, 834,
|
|
242
|
+
834, 611, 667, 667, 667, 667, 667, 667, 1000, 722, 667, 667, 667, 667, 278, 278,
|
|
243
|
+
278, 278, 722, 722, 778, 778, 778, 778, 778, 584, 778, 722, 722, 722, 722, 667,
|
|
244
|
+
667, 611, 556, 556, 556, 556, 556, 556, 889, 500, 556, 556, 556, 556, 278, 278,
|
|
245
|
+
278, 278, 556, 556, 556, 556, 556, 556, 556, 584, 611, 556, 556, 556, 556, 500,
|
|
246
|
+
556, 500
|
|
247
|
+
];
|
|
248
|
+
/**
|
|
249
|
+
* `Arial bold` widths table.
|
|
250
|
+
* @private
|
|
251
|
+
*/
|
|
252
|
+
private static arialBoldWidth : number[] =
|
|
253
|
+
[
|
|
254
|
+
278, 333, 474, 556, 556, 889, 722, 238, 333, 333, 389, 584, 278, 333,
|
|
255
|
+
278, 278, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 333, 333, 584, 584,
|
|
256
|
+
584, 611, 975, 722, 722, 722, 722, 667, 611, 778, 722, 278, 556, 722, 611, 833,
|
|
257
|
+
722, 778, 667, 778, 722, 667, 611, 722, 667, 944, 667, 667, 611, 333, 278, 333,
|
|
258
|
+
584, 556, 333, 556, 611, 556, 611, 556, 333, 611, 611, 278, 278, 556, 278, 889,
|
|
259
|
+
611, 611, 611, 611, 389, 556, 333, 611, 556, 778, 556, 556, 500, 389, 280, 389,
|
|
260
|
+
584, 0, 556, 0, 278, 556, 500, 1000, 556, 556, 333, 1000, 667, 333, 1000, 0,
|
|
261
|
+
611, 0, 0, 278, 278, 500, 500, 350, 556, 1000, 333, 1000, 556, 333, 944, 0,
|
|
262
|
+
500, 667, 0, 333, 556, 556, 556, 556, 280, 556, 333, 737, 370, 556, 584, 0,
|
|
263
|
+
737, 333, 400, 584, 333, 333, 333, 611, 556, 278, 333, 333, 365, 556, 834, 834,
|
|
264
|
+
834, 611, 722, 722, 722, 722, 722, 722, 1000, 722, 667, 667, 667, 667, 278, 278,
|
|
265
|
+
278, 278, 722, 722, 778, 778, 778, 778, 778, 584, 778, 722, 722, 722, 722, 667,
|
|
266
|
+
667, 611, 556, 556, 556, 556, 556, 556, 889, 556, 556, 556, 556, 556, 278, 278,
|
|
267
|
+
278, 278, 611, 611, 611, 611, 611, 611, 611, 584, 611, 611, 611, 611, 611, 556,
|
|
268
|
+
611, 556
|
|
269
|
+
];
|
|
270
|
+
/**
|
|
271
|
+
* `Fixed` widths table.
|
|
272
|
+
* @private
|
|
273
|
+
*/
|
|
274
|
+
private static fixedWidth : number[] =
|
|
275
|
+
[
|
|
276
|
+
600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
|
|
277
|
+
600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
|
|
278
|
+
600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
|
|
279
|
+
600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
|
|
280
|
+
600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
|
|
281
|
+
600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
|
|
282
|
+
600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
|
|
283
|
+
600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
|
|
284
|
+
600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
|
|
285
|
+
600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
|
|
286
|
+
600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
|
|
287
|
+
600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
|
|
288
|
+
600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
|
|
289
|
+
600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600
|
|
290
|
+
];
|
|
291
|
+
/**
|
|
292
|
+
* `Times` widths table.
|
|
293
|
+
* @private
|
|
294
|
+
*/
|
|
295
|
+
private static timesRomanWidth : number[] =
|
|
296
|
+
[
|
|
297
|
+
250, 333, 408, 500, 500, 833, 778, 180, 333, 333, 500, 564, 250, 333,
|
|
298
|
+
250, 278, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 278, 278, 564, 564,
|
|
299
|
+
564, 444, 921, 722, 667, 667, 722, 611, 556, 722, 722, 333, 389, 722, 611, 889,
|
|
300
|
+
722, 722, 556, 722, 667, 556, 611, 722, 722, 944, 722, 722, 611, 333, 278, 333,
|
|
301
|
+
469, 500, 333, 444, 500, 444, 500, 444, 333, 500, 500, 278, 278, 500, 278, 778,
|
|
302
|
+
500, 500, 500, 500, 333, 389, 278, 500, 500, 722, 500, 500, 444, 480, 200, 480,
|
|
303
|
+
541, 0, 500, 0, 333, 500, 444, 1000, 500, 500, 333, 1000, 556, 333, 889, 0,
|
|
304
|
+
611, 0, 0, 333, 333, 444, 444, 350, 500, 1000, 333, 980, 389, 333, 722, 0,
|
|
305
|
+
444, 722, 0, 333, 500, 500, 500, 500, 200, 500, 333, 760, 276, 500, 564, 0,
|
|
306
|
+
760, 333, 400, 564, 300, 300, 333, 500, 453, 250, 333, 300, 310, 500, 750, 750,
|
|
307
|
+
750, 444, 722, 722, 722, 722, 722, 722, 889, 667, 611, 611, 611, 611, 333, 333,
|
|
308
|
+
333, 333, 722, 722, 722, 722, 722, 722, 722, 564, 722, 722, 722, 722, 722, 722,
|
|
309
|
+
556, 500, 444, 444, 444, 444, 444, 444, 667, 444, 444, 444, 444, 444, 278, 278,
|
|
310
|
+
278, 278, 500, 500, 500, 500, 500, 500, 500, 564, 500, 500, 500, 500, 500, 500,
|
|
311
|
+
500, 500
|
|
312
|
+
];
|
|
313
|
+
/**
|
|
314
|
+
* `Times bold` widths table.
|
|
315
|
+
* @private
|
|
316
|
+
*/
|
|
317
|
+
private static timesRomanBoldWidth : number[] =
|
|
318
|
+
[
|
|
319
|
+
250, 333, 555, 500, 500, 1000, 833, 278, 333, 333, 500, 570, 250, 333,
|
|
320
|
+
250, 278, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 333, 333, 570, 570,
|
|
321
|
+
570, 500, 930, 722, 667, 722, 722, 667, 611, 778, 778, 389, 500, 778, 667, 944,
|
|
322
|
+
722, 778, 611, 778, 722, 556, 667, 722, 722, 1000, 722, 722, 667, 333, 278, 333,
|
|
323
|
+
581, 500, 333, 500, 556, 444, 556, 444, 333, 500, 556, 278, 333, 556, 278, 833,
|
|
324
|
+
556, 500, 556, 556, 444, 389, 333, 556, 500, 722, 500, 500, 444, 394, 220, 394,
|
|
325
|
+
520, 0, 500, 0, 333, 500, 500, 1000, 500, 500, 333, 1000, 556, 333, 1000, 0,
|
|
326
|
+
667, 0, 0, 333, 333, 500, 500, 350, 500, 1000, 333, 1000, 389, 333, 722, 0,
|
|
327
|
+
444, 722, 0, 333, 500, 500, 500, 500, 220, 500, 333, 747, 300, 500, 570, 0,
|
|
328
|
+
747, 333, 400, 570, 300, 300, 333, 556, 540, 250, 333, 300, 330, 500, 750, 750,
|
|
329
|
+
750, 500, 722, 722, 722, 722, 722, 722, 1000, 722, 667, 667, 667, 667, 389, 389,
|
|
330
|
+
389, 389, 722, 722, 778, 778, 778, 778, 778, 570, 778, 722, 722, 722, 722, 722,
|
|
331
|
+
611, 556, 500, 500, 500, 500, 500, 500, 722, 444, 444, 444, 444, 444, 278, 278,
|
|
332
|
+
278, 278, 500, 556, 500, 500, 500, 500, 500, 570, 500, 556, 556, 556, 556, 500,
|
|
333
|
+
556, 500
|
|
334
|
+
];
|
|
335
|
+
/**
|
|
336
|
+
* `Times italic` widths table.
|
|
337
|
+
* @private
|
|
338
|
+
*/
|
|
339
|
+
private static timesRomanItalicWidth : number[] =
|
|
340
|
+
[
|
|
341
|
+
250, 333, 420, 500, 500, 833, 778, 214, 333, 333, 500, 675, 250, 333,
|
|
342
|
+
250, 278, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 333, 333, 675, 675,
|
|
343
|
+
675, 500, 920, 611, 611, 667, 722, 611, 611, 722, 722, 333, 444, 667, 556, 833,
|
|
344
|
+
667, 722, 611, 722, 611, 500, 556, 722, 611, 833, 611, 556, 556, 389, 278, 389,
|
|
345
|
+
422, 500, 333, 500, 500, 444, 500, 444, 278, 500, 500, 278, 278, 444, 278, 722,
|
|
346
|
+
500, 500, 500, 500, 389, 389, 278, 500, 444, 667, 444, 444, 389, 400, 275, 400,
|
|
347
|
+
541, 0, 500, 0, 333, 500, 556, 889, 500, 500, 333, 1000, 500, 333, 944, 0,
|
|
348
|
+
556, 0, 0, 333, 333, 556, 556, 350, 500, 889, 333, 980, 389, 333, 667, 0,
|
|
349
|
+
389, 556, 0, 389, 500, 500, 500, 500, 275, 500, 333, 760, 276, 500, 675, 0,
|
|
350
|
+
760, 333, 400, 675, 300, 300, 333, 500, 523, 250, 333, 300, 310, 500, 750, 750,
|
|
351
|
+
750, 500, 611, 611, 611, 611, 611, 611, 889, 667, 611, 611, 611, 611, 333, 333,
|
|
352
|
+
333, 333, 722, 667, 722, 722, 722, 722, 722, 675, 722, 722, 722, 722, 722, 556,
|
|
353
|
+
611, 500, 500, 500, 500, 500, 500, 500, 667, 444, 444, 444, 444, 444, 278, 278,
|
|
354
|
+
278, 278, 500, 500, 500, 500, 500, 500, 500, 675, 500, 500, 500, 500, 500, 444,
|
|
355
|
+
500, 444
|
|
356
|
+
];
|
|
357
|
+
/**
|
|
358
|
+
* `Times bold italic` widths table.
|
|
359
|
+
* @private
|
|
360
|
+
*/
|
|
361
|
+
public static timesRomanBoldItalicWidths : number[] =
|
|
362
|
+
[
|
|
363
|
+
250, 389, 555, 500, 500, 833, 778, 278, 333, 333, 500, 570, 250, 333,
|
|
364
|
+
250, 278, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 333, 333, 570, 570,
|
|
365
|
+
570, 500, 832, 667, 667, 667, 722, 667, 667, 722, 778, 389, 500, 667, 611, 889,
|
|
366
|
+
722, 722, 611, 722, 667, 556, 611, 722, 667, 889, 667, 611, 611, 333, 278, 333,
|
|
367
|
+
570, 500, 333, 500, 500, 444, 500, 444, 333, 500, 556, 278, 278, 500, 278, 778,
|
|
368
|
+
556, 500, 500, 500, 389, 389, 278, 556, 444, 667, 500, 444, 389, 348, 220, 348,
|
|
369
|
+
570, 0, 500, 0, 333, 500, 500, 1000, 500, 500, 333, 1000, 556, 333, 944, 0,
|
|
370
|
+
611, 0, 0, 333, 333, 500, 500, 350, 500, 1000, 333, 1000, 389, 333, 722, 0,
|
|
371
|
+
389, 611, 0, 389, 500, 500, 500, 500, 220, 500, 333, 747, 266, 500, 606, 0,
|
|
372
|
+
747, 333, 400, 570, 300, 300, 333, 576, 500, 250, 333, 300, 300, 500, 750, 750,
|
|
373
|
+
750, 500, 667, 667, 667, 667, 667, 667, 944, 667, 667, 667, 667, 667, 389, 389,
|
|
374
|
+
389, 389, 722, 722, 722, 722, 722, 722, 722, 570, 722, 722, 722, 722, 722, 611,
|
|
375
|
+
611, 500, 500, 500, 500, 500, 500, 500, 722, 444, 444, 444, 444, 444, 278, 278,
|
|
376
|
+
278, 278, 500, 556, 500, 500, 500, 500, 500, 570, 500, 556, 556, 556, 556, 444,
|
|
377
|
+
500, 444
|
|
378
|
+
];
|
|
379
|
+
/**
|
|
380
|
+
* `Symbol` widths table.
|
|
381
|
+
* @private
|
|
382
|
+
*/
|
|
383
|
+
private static symbolWidth : number[] =
|
|
384
|
+
[
|
|
385
|
+
250, 333, 713, 500, 549, 833, 778, 439, 333, 333, 500, 549, 250, 549,
|
|
386
|
+
250, 278, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 278, 278,
|
|
387
|
+
549, 549, 549, 444, 549, 722, 667, 722, 612, 611, 763, 603, 722, 333,
|
|
388
|
+
631, 722, 686, 889, 722, 722, 768, 741, 556, 592, 611, 690, 439, 768,
|
|
389
|
+
645, 795, 611, 333, 863, 333, 658, 500, 500, 631, 549, 549, 494, 439,
|
|
390
|
+
521, 411, 603, 329, 603, 549, 549, 576, 521, 549, 549, 521, 549, 603,
|
|
391
|
+
439, 576, 713, 686, 493, 686, 494, 480, 200, 480, 549, 750, 620, 247,
|
|
392
|
+
549, 167, 713, 500, 753, 753, 753, 753, 1042, 987, 603, 987, 603, 400,
|
|
393
|
+
549, 411, 549, 549, 713, 494, 460, 549, 549, 549, 549, 1000, 603, 1000,
|
|
394
|
+
658, 823, 686, 795, 987, 768, 768, 823, 768, 768, 713, 713, 713, 713,
|
|
395
|
+
713, 713, 713, 768, 713, 790, 790, 890, 823, 549, 250, 713, 603, 603,
|
|
396
|
+
1042, 987, 603, 987, 603, 494, 329, 790, 790, 786, 713, 384, 384, 384,
|
|
397
|
+
384, 384, 384, 494, 494, 494, 494, 329, 274, 686, 686, 686, 384, 384,
|
|
398
|
+
384, 384, 384, 384, 494, 494, 494, -1
|
|
399
|
+
];
|
|
400
|
+
/**
|
|
401
|
+
* `Zip dingbats` widths table.
|
|
402
|
+
* @private
|
|
403
|
+
*/
|
|
404
|
+
private static zapfDingbatsWidth : number[] =
|
|
405
|
+
[
|
|
406
|
+
278, 974, 961, 974, 980, 719, 789, 790, 791, 690, 960, 939, 549, 855,
|
|
407
|
+
911, 933, 911, 945, 974, 755, 846, 762, 761, 571, 677, 763, 760, 759,
|
|
408
|
+
754, 494, 552, 537, 577, 692, 786, 788, 788, 790, 793, 794, 816, 823,
|
|
409
|
+
789, 841, 823, 833, 816, 831, 923, 744, 723, 749, 790, 792, 695, 776,
|
|
410
|
+
768, 792, 759, 707, 708, 682, 701, 826, 815, 789, 789, 707, 687, 696,
|
|
411
|
+
689, 786, 787, 713, 791, 785, 791, 873, 761, 762, 762, 759, 759, 892,
|
|
412
|
+
892, 788, 784, 438, 138, 277, 415, 392, 392, 668, 668, 390, 390, 317,
|
|
413
|
+
317, 276, 276, 509, 509, 410, 410, 234, 234, 334, 334, 732, 544, 544,
|
|
414
|
+
910, 667, 760, 760, 776, 595, 694, 626, 788, 788, 788, 788, 788, 788,
|
|
415
|
+
788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788,
|
|
416
|
+
788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788,
|
|
417
|
+
788, 788, 788, 788, 788, 788, 894, 838, 1016, 458, 748, 924, 748, 918,
|
|
418
|
+
927, 928, 928, 834, 873, 828, 924, 924, 917, 930, 931, 463, 883, 836,
|
|
419
|
+
836, 867, 867, 696, 696, 874, 874, 760, 946, 771, 865, 771, 888, 967,
|
|
420
|
+
888, 831, 873, 927, 970, 918
|
|
421
|
+
];
|
|
422
|
+
/**
|
|
423
|
+
* Returns `metrics` of the font.
|
|
424
|
+
* @private
|
|
425
|
+
*/
|
|
426
|
+
public static getMetrics(fontFamily : PdfFontFamily, fontStyle : PdfFontStyle, size : number) : PdfFontMetrics {
|
|
427
|
+
let metrics : PdfFontMetrics = null;
|
|
428
|
+
switch (fontFamily) {
|
|
429
|
+
case PdfFontFamily.Helvetica:
|
|
430
|
+
metrics = this.getHelveticaMetrics(fontFamily, fontStyle, size);
|
|
431
|
+
break;
|
|
432
|
+
|
|
433
|
+
case PdfFontFamily.Courier:
|
|
434
|
+
metrics = this.getCourierMetrics(fontFamily, fontStyle, size);
|
|
435
|
+
break;
|
|
436
|
+
|
|
437
|
+
case PdfFontFamily.TimesRoman:
|
|
438
|
+
metrics = this.getTimesMetrics(fontFamily, fontStyle, size);
|
|
439
|
+
break;
|
|
440
|
+
|
|
441
|
+
case PdfFontFamily.Symbol:
|
|
442
|
+
metrics = this.getSymbolMetrics(fontFamily, fontStyle, size);
|
|
443
|
+
break;
|
|
444
|
+
|
|
445
|
+
case PdfFontFamily.ZapfDingbats:
|
|
446
|
+
metrics = this.getZapfDingbatsMetrics(fontFamily, fontStyle, size);
|
|
447
|
+
break;
|
|
448
|
+
|
|
449
|
+
default:
|
|
450
|
+
metrics = this.getHelveticaMetrics(PdfFontFamily.Helvetica, fontStyle, size);
|
|
451
|
+
break;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
metrics.name = fontFamily.toString();
|
|
455
|
+
metrics.subScriptSizeFactor = this.subSuperScriptFactor;
|
|
456
|
+
metrics.superscriptSizeFactor = this.subSuperScriptFactor;
|
|
457
|
+
return metrics;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
// Implementation
|
|
461
|
+
/**
|
|
462
|
+
* Creates `Helvetica font metrics`.
|
|
463
|
+
* @private
|
|
464
|
+
*/
|
|
465
|
+
private static getHelveticaMetrics(fontFamily : PdfFontFamily, fontStyle : PdfFontStyle,
|
|
466
|
+
size : number) : PdfFontMetrics {
|
|
467
|
+
let metrics : PdfFontMetrics = new PdfFontMetrics();
|
|
468
|
+
if ((fontStyle & PdfFontStyle.Bold) > 0 && (fontStyle & PdfFontStyle.Italic) > 0) {
|
|
469
|
+
metrics.ascent = this.helveticaBoldItalicAscent;
|
|
470
|
+
metrics.descent = this.helveticaBoldItalicDescent;
|
|
471
|
+
metrics.postScriptName = this.helveticaBoldItalicName;
|
|
472
|
+
metrics.size = size;
|
|
473
|
+
metrics.widthTable = new StandardWidthTable(this.arialBoldWidth);
|
|
474
|
+
metrics.height = metrics.ascent - metrics.descent;
|
|
475
|
+
} else if ((fontStyle & PdfFontStyle.Bold) > 0) {
|
|
476
|
+
metrics.ascent = this.helveticaBoldAscent;
|
|
477
|
+
metrics.descent = this.helveticaBoldDescent;
|
|
478
|
+
metrics.postScriptName = this.helveticaBoldName;
|
|
479
|
+
metrics.size = size;
|
|
480
|
+
metrics.widthTable = new StandardWidthTable(this.arialBoldWidth);
|
|
481
|
+
metrics.height = metrics.ascent - metrics.descent;
|
|
482
|
+
} else if ((fontStyle & PdfFontStyle.Italic) > 0) {
|
|
483
|
+
metrics.ascent = this.helveticaItalicAscent;
|
|
484
|
+
metrics.descent = this.helveticaItalicDescent;
|
|
485
|
+
metrics.postScriptName = this.helveticaItalicName;
|
|
486
|
+
metrics.size = size;
|
|
487
|
+
metrics.widthTable = new StandardWidthTable(this.arialWidth);
|
|
488
|
+
metrics.height = metrics.ascent - metrics.descent;
|
|
489
|
+
} else {
|
|
490
|
+
metrics.ascent = this.helveticaAscent;
|
|
491
|
+
metrics.descent = this.helveticaDescent;
|
|
492
|
+
metrics.postScriptName = this.helveticaName;
|
|
493
|
+
metrics.size = size;
|
|
494
|
+
metrics.widthTable = new StandardWidthTable(this.arialWidth);
|
|
495
|
+
metrics.height = metrics.ascent - metrics.descent;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
return metrics;
|
|
499
|
+
}
|
|
500
|
+
/**
|
|
501
|
+
* Creates `Courier font metrics`.
|
|
502
|
+
* @private
|
|
503
|
+
*/
|
|
504
|
+
private static getCourierMetrics(fontFamily : PdfFontFamily, fontStyle : PdfFontStyle,
|
|
505
|
+
size : number) : PdfFontMetrics {
|
|
506
|
+
let metrics : PdfFontMetrics = new PdfFontMetrics();
|
|
507
|
+
if ((fontStyle & PdfFontStyle.Bold) > 0 && (fontStyle & PdfFontStyle.Italic) > 0) {
|
|
508
|
+
metrics.ascent = this.courierBoldItalicAscent;
|
|
509
|
+
metrics.descent = this.courierBoldItalicDescent;
|
|
510
|
+
metrics.postScriptName = this.courierBoldItalicName;
|
|
511
|
+
metrics.size = size;
|
|
512
|
+
metrics.widthTable = new StandardWidthTable(this.fixedWidth);
|
|
513
|
+
metrics.height = metrics.ascent - metrics.descent;
|
|
514
|
+
} else if ((fontStyle & PdfFontStyle.Bold) > 0) {
|
|
515
|
+
metrics.ascent = this.courierBoldAscent;
|
|
516
|
+
metrics.descent = this.courierBoldDescent;
|
|
517
|
+
metrics.postScriptName = this.courierBoldName;
|
|
518
|
+
metrics.size = size;
|
|
519
|
+
metrics.widthTable = new StandardWidthTable(this.fixedWidth);
|
|
520
|
+
metrics.height = metrics.ascent - metrics.descent;
|
|
521
|
+
} else if ((fontStyle & PdfFontStyle.Italic) > 0) {
|
|
522
|
+
metrics.ascent = this.courierItalicAscent;
|
|
523
|
+
metrics.descent = this.courierItalicDescent;
|
|
524
|
+
metrics.postScriptName = this.courierItalicName;
|
|
525
|
+
metrics.size = size;
|
|
526
|
+
metrics.widthTable = new StandardWidthTable(this.fixedWidth);
|
|
527
|
+
metrics.height = metrics.ascent - metrics.descent;
|
|
528
|
+
} else {
|
|
529
|
+
metrics.ascent = this.courierAscent;
|
|
530
|
+
metrics.descent = this.courierDescent;
|
|
531
|
+
metrics.postScriptName = this.courierName;
|
|
532
|
+
metrics.size = size;
|
|
533
|
+
metrics.widthTable = new StandardWidthTable(this.fixedWidth);
|
|
534
|
+
metrics.height = metrics.ascent - metrics.descent;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
return metrics;
|
|
538
|
+
}
|
|
539
|
+
/**
|
|
540
|
+
* Creates `Times font metrics`.
|
|
541
|
+
* @private
|
|
542
|
+
*/
|
|
543
|
+
private static getTimesMetrics(fontFamily : PdfFontFamily, fontStyle : PdfFontStyle, size : number) : PdfFontMetrics {
|
|
544
|
+
let metrics : PdfFontMetrics = new PdfFontMetrics();
|
|
545
|
+
if ((fontStyle & PdfFontStyle.Bold) > 0 && (fontStyle & PdfFontStyle.Italic) > 0) {
|
|
546
|
+
metrics.ascent = this.timesBoldItalicAscent;
|
|
547
|
+
metrics.descent = this.timesBoldItalicDescent;
|
|
548
|
+
metrics.postScriptName = this.timesBoldItalicName;
|
|
549
|
+
metrics.size = size;
|
|
550
|
+
metrics.widthTable = new StandardWidthTable(this.timesRomanBoldItalicWidths);
|
|
551
|
+
metrics.height = metrics.ascent - metrics.descent;
|
|
552
|
+
} else if ((fontStyle & PdfFontStyle.Bold) > 0) {
|
|
553
|
+
metrics.ascent = this.timesBoldAscent;
|
|
554
|
+
metrics.descent = this.timesBoldDescent;
|
|
555
|
+
metrics.postScriptName = this.timesBoldName;
|
|
556
|
+
metrics.size = size;
|
|
557
|
+
metrics.widthTable = new StandardWidthTable(this.timesRomanBoldWidth);
|
|
558
|
+
metrics.height = metrics.ascent - metrics.descent;
|
|
559
|
+
} else if ((fontStyle & PdfFontStyle.Italic) > 0) {
|
|
560
|
+
metrics.ascent = this.timesItalicAscent;
|
|
561
|
+
metrics.descent = this.timesItalicDescent;
|
|
562
|
+
metrics.postScriptName = this.timesItalicName;
|
|
563
|
+
metrics.size = size;
|
|
564
|
+
metrics.widthTable = new StandardWidthTable(this.timesRomanItalicWidth);
|
|
565
|
+
metrics.height = metrics.ascent - metrics.descent;
|
|
566
|
+
} else {
|
|
567
|
+
metrics.ascent = this.timesAscent;
|
|
568
|
+
metrics.descent = this.timesDescent;
|
|
569
|
+
metrics.postScriptName = this.timesName;
|
|
570
|
+
metrics.size = size;
|
|
571
|
+
metrics.widthTable = new StandardWidthTable(this.timesRomanWidth);
|
|
572
|
+
metrics.height = metrics.ascent - metrics.descent;
|
|
573
|
+
}
|
|
574
|
+
return metrics;
|
|
575
|
+
}
|
|
576
|
+
/**
|
|
577
|
+
* Creates `Symbol font metrics`.
|
|
578
|
+
* @private
|
|
579
|
+
*/
|
|
580
|
+
private static getSymbolMetrics(fontFamily : PdfFontFamily, fontStyle : PdfFontStyle,
|
|
581
|
+
size : number) : PdfFontMetrics {
|
|
582
|
+
let metrics : PdfFontMetrics = new PdfFontMetrics();
|
|
583
|
+
metrics.ascent = this.symbolAscent;
|
|
584
|
+
metrics.descent = this.symbolDescent;
|
|
585
|
+
metrics.postScriptName = this.symbolName;
|
|
586
|
+
metrics.size = size;
|
|
587
|
+
metrics.widthTable = new StandardWidthTable(this.symbolWidth);
|
|
588
|
+
metrics.height = metrics.ascent - metrics.descent;
|
|
589
|
+
return metrics;
|
|
590
|
+
}
|
|
591
|
+
/**
|
|
592
|
+
* Creates `ZapfDingbats font metrics`.
|
|
593
|
+
* @private
|
|
594
|
+
*/
|
|
595
|
+
private static getZapfDingbatsMetrics(fontFamily : PdfFontFamily, fontStyle : PdfFontStyle,
|
|
596
|
+
size : number) : PdfFontMetrics {
|
|
597
|
+
let metrics : PdfFontMetrics = new PdfFontMetrics();
|
|
598
|
+
metrics.ascent = this.zapfDingbatsAscent;
|
|
599
|
+
metrics.descent = this.zapfDingbatsDescent;
|
|
600
|
+
metrics.postScriptName = this.zapfDingbatsName;
|
|
601
|
+
metrics.size = size;
|
|
602
|
+
metrics.widthTable = new StandardWidthTable(this.zapfDingbatsWidth);
|
|
603
|
+
metrics.height = metrics.ascent - metrics.descent;
|
|
604
|
+
return metrics;
|
|
605
|
+
}
|
|
606
|
+
}
|