@syncfusion/ej2-pdf 1.0.23 → 23.1.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +260 -0
- package/.gitleaksignore +1 -0
- package/CHANGELOG.md +17 -0
- package/README.md +17 -0
- package/dist/ej2-pdf.umd.min.js +4 -14
- package/dist/ej2-pdf.umd.min.js.map +1 -11
- package/dist/es6/ej2-pdf.es2015.js +48245 -0
- package/dist/es6/ej2-pdf.es2015.js.map +1 -0
- package/dist/es6/ej2-pdf.es5.js +50124 -0
- package/dist/es6/ej2-pdf.es5.js.map +1 -0
- package/dist/global/ej2-pdf.min.js +11 -0
- package/dist/global/ej2-pdf.min.js.map +1 -0
- package/dist/global/index.d.ts +14 -0
- package/index.js +4 -8
- package/license +10 -3
- package/package.json +58 -16
- package/pdf.d.ts +4 -0
- package/pdf.js +4 -0
- package/src/global.js +1 -0
- package/src/index.d.ts +45 -98
- package/src/index.js +45 -96
- package/src/pdf/core/annotations/annotation-collection.d.ts +289 -0
- package/src/pdf/core/annotations/annotation-collection.js +744 -0
- package/src/pdf/core/annotations/annotation.d.ts +5845 -0
- package/src/pdf/core/annotations/annotation.js +14195 -0
- package/src/pdf/core/annotations/index.d.ts +4 -0
- package/src/pdf/core/annotations/index.js +4 -0
- package/src/pdf/core/annotations/pdf-appearance.d.ts +102 -0
- package/src/pdf/core/annotations/pdf-appearance.js +124 -0
- package/src/pdf/core/annotations/pdf-paddings.d.ts +8 -0
- package/src/pdf/core/annotations/pdf-paddings.js +22 -0
- package/src/pdf/core/base-stream.d.ts +86 -0
- package/src/pdf/core/base-stream.js +332 -0
- package/src/pdf/core/content-parser.d.ts +38 -0
- package/src/pdf/core/content-parser.js +359 -0
- package/src/pdf/core/decode-stream.d.ts +21 -0
- package/src/pdf/core/decode-stream.js +120 -0
- package/src/pdf/core/decrypt-stream.d.ts +11 -0
- package/src/pdf/core/decrypt-stream.js +53 -0
- package/src/pdf/core/enumerator.d.ts +1668 -0
- package/src/pdf/core/enumerator.js +1717 -0
- package/src/pdf/core/flate-stream.d.ts +13 -0
- package/src/pdf/core/flate-stream.js +329 -0
- package/src/pdf/core/fonts/index.d.ts +7 -0
- package/{dist/es6/implementation/graphics → src/pdf/core}/fonts/index.js +3 -4
- package/src/pdf/core/fonts/pdf-font-metrics.d.ts +66 -0
- package/src/pdf/core/fonts/pdf-font-metrics.js +192 -0
- package/src/pdf/core/fonts/pdf-standard-font.d.ts +1023 -0
- package/src/pdf/core/fonts/pdf-standard-font.js +1682 -0
- package/src/pdf/core/fonts/pdf-string-format.d.ts +236 -0
- package/src/pdf/core/fonts/pdf-string-format.js +213 -0
- package/src/pdf/core/fonts/string-layouter.d.ts +68 -0
- package/src/pdf/core/fonts/string-layouter.js +437 -0
- package/src/pdf/core/fonts/ttf-reader.d.ts +167 -0
- package/src/pdf/core/fonts/ttf-reader.js +1150 -0
- package/src/pdf/core/fonts/ttf-table.d.ts +132 -0
- package/src/pdf/core/fonts/ttf-table.js +74 -0
- package/src/pdf/core/fonts/unicode-true-type-font.d.ts +50 -0
- package/src/pdf/core/fonts/unicode-true-type-font.js +289 -0
- package/src/pdf/core/form/field.d.ts +3011 -0
- package/src/pdf/core/form/field.js +6828 -0
- package/src/pdf/core/form/form.d.ts +279 -0
- package/src/pdf/core/form/form.js +782 -0
- package/src/pdf/core/form/index.d.ts +2 -0
- package/src/pdf/core/form/index.js +2 -0
- package/src/pdf/core/graphics/images/image-decoder.d.ts +31 -0
- package/src/pdf/core/graphics/images/image-decoder.js +130 -0
- package/src/{implementation → pdf/core}/graphics/images/index.d.ts +0 -5
- package/{dist/es6/implementation → src/pdf/core}/graphics/images/index.js +0 -1
- package/src/pdf/core/graphics/images/pdf-bitmap.d.ts +73 -0
- package/src/pdf/core/graphics/images/pdf-bitmap.js +68 -0
- package/src/pdf/core/graphics/images/pdf-image.d.ts +201 -0
- package/src/pdf/core/graphics/images/pdf-image.js +201 -0
- package/src/pdf/core/graphics/index.d.ts +10 -0
- package/src/pdf/core/graphics/index.js +10 -0
- package/src/pdf/core/graphics/pdf-graphics.d.ts +956 -0
- package/src/pdf/core/graphics/pdf-graphics.js +1860 -0
- package/src/pdf/core/graphics/pdf-path.d.ts +34 -0
- package/src/pdf/core/graphics/pdf-path.js +177 -0
- package/src/pdf/core/graphics/pdf-stream-writer.d.ts +56 -0
- package/src/pdf/core/graphics/pdf-stream-writer.js +231 -0
- package/src/pdf/core/graphics/pdf-template.d.ts +79 -0
- package/src/pdf/core/graphics/pdf-template.js +100 -0
- package/src/pdf/core/graphics/rightToLeft/bidirectional.d.ts +69 -0
- package/src/pdf/core/graphics/rightToLeft/bidirectional.js +831 -0
- package/src/pdf/core/graphics/rightToLeft/index.d.ts +3 -0
- package/src/pdf/core/graphics/rightToLeft/index.js +3 -0
- package/src/pdf/core/graphics/rightToLeft/text-renderer.d.ts +13 -0
- package/src/pdf/core/graphics/rightToLeft/text-renderer.js +116 -0
- package/src/pdf/core/graphics/rightToLeft/text-shape.d.ts +48 -0
- package/src/pdf/core/graphics/rightToLeft/text-shape.js +289 -0
- package/src/pdf/core/import-export/fdf-document.d.ts +37 -0
- package/src/pdf/core/import-export/fdf-document.js +667 -0
- package/src/pdf/core/import-export/index.d.ts +5 -0
- package/src/pdf/core/import-export/index.js +5 -0
- package/src/pdf/core/import-export/json-document.d.ts +47 -0
- package/src/pdf/core/import-export/json-document.js +1547 -0
- package/src/pdf/core/import-export/xfdf-document.d.ts +146 -0
- package/src/pdf/core/import-export/xfdf-document.js +2920 -0
- package/src/pdf/core/import-export/xml-document.d.ts +14 -0
- package/src/pdf/core/import-export/xml-document.js +166 -0
- package/src/pdf/core/import-export/xml-writer.d.ts +69 -0
- package/src/pdf/core/import-export/xml-writer.js +494 -0
- package/src/pdf/core/pdf-catalog.d.ts +18 -0
- package/src/pdf/core/pdf-catalog.js +166 -0
- package/src/pdf/core/pdf-cross-reference.d.ts +80 -0
- package/src/pdf/core/pdf-cross-reference.js +1049 -0
- package/src/pdf/core/pdf-document.d.ts +821 -0
- package/src/pdf/core/pdf-document.js +1022 -0
- package/src/pdf/core/pdf-file-structure.d.ts +54 -0
- package/src/pdf/core/pdf-file-structure.js +65 -0
- package/src/pdf/core/pdf-outline.d.ts +362 -0
- package/src/pdf/core/pdf-outline.js +860 -0
- package/src/pdf/core/pdf-page.d.ts +589 -0
- package/src/pdf/core/pdf-page.js +1049 -0
- package/src/pdf/core/pdf-parser.d.ts +62 -0
- package/src/pdf/core/pdf-parser.js +1035 -0
- package/src/pdf/core/pdf-primitives.d.ts +87 -0
- package/src/pdf/core/pdf-primitives.js +305 -0
- package/src/pdf/core/predictor-stream.d.ts +15 -0
- package/src/pdf/core/predictor-stream.js +214 -0
- package/src/pdf/core/security/encryptor.d.ts +140 -0
- package/src/pdf/core/security/encryptor.js +1616 -0
- package/src/pdf/core/security/index.d.ts +1 -0
- package/src/pdf/core/security/index.js +1 -0
- package/src/pdf/core/utils.d.ts +678 -0
- package/src/pdf/core/utils.js +3607 -0
- package/src/pdf/index.d.ts +44 -0
- package/src/pdf/index.js +44 -0
- package/tslint.json +111 -0
- package/ReadMe.md +0 -13
- package/dist/es6/implementation/actions/action.js +0 -44
- package/dist/es6/implementation/actions/index.js +0 -2
- package/dist/es6/implementation/actions/uri-action.js +0 -38
- package/dist/es6/implementation/annotations/action-link-annotation.js +0 -29
- package/dist/es6/implementation/annotations/annotation-collection.js +0 -93
- package/dist/es6/implementation/annotations/annotation.js +0 -156
- package/dist/es6/implementation/annotations/document-link-annotation.js +0 -48
- package/dist/es6/implementation/annotations/index.js +0 -7
- package/dist/es6/implementation/annotations/link-annotation.js +0 -31
- package/dist/es6/implementation/annotations/pdf-text-web-link.js +0 -178
- package/dist/es6/implementation/annotations/uri-annotation.js +0 -64
- package/dist/es6/implementation/collections/dictionary.js +0 -71
- package/dist/es6/implementation/collections/index.js +0 -3
- package/dist/es6/implementation/collections/object-object-pair/dictionary.js +0 -84
- package/dist/es6/implementation/collections/object-object-pair/index.js +0 -1
- package/dist/es6/implementation/collections/utils.js +0 -8
- package/dist/es6/implementation/document/automatic-fields/automatic-field-info-collection.js +0 -17
- package/dist/es6/implementation/document/automatic-fields/automatic-field-info.js +0 -68
- package/dist/es6/implementation/document/automatic-fields/automatic-field.js +0 -145
- package/dist/es6/implementation/document/automatic-fields/composite-field.js +0 -61
- package/dist/es6/implementation/document/automatic-fields/index.js +0 -7
- package/dist/es6/implementation/document/automatic-fields/multiple-value-field.js +0 -36
- package/dist/es6/implementation/document/automatic-fields/page-count-field.js +0 -53
- package/dist/es6/implementation/document/automatic-fields/pdf-numbers-convertor.js +0 -91
- package/dist/es6/implementation/document/automatic-fields/pdf-page-number-field.js +0 -56
- package/dist/es6/implementation/document/automatic-fields/pdf-template-value-pair.js +0 -34
- package/dist/es6/implementation/document/automatic-fields/single-value-field.js +0 -47
- package/dist/es6/implementation/document/index.js +0 -11
- package/dist/es6/implementation/document/pdf-catalog.js +0 -38
- package/dist/es6/implementation/document/pdf-document-base.js +0 -71
- package/dist/es6/implementation/document/pdf-document-template.js +0 -204
- package/dist/es6/implementation/document/pdf-document.js +0 -175
- package/dist/es6/implementation/drawing/index.js +0 -1
- package/dist/es6/implementation/drawing/pdf-drawing.js +0 -80
- package/dist/es6/implementation/general/enum.js +0 -6
- package/dist/es6/implementation/general/index.js +0 -3
- package/dist/es6/implementation/general/pdf-cache-collection.js +0 -24
- package/dist/es6/implementation/general/pdf-collection.js +0 -26
- package/dist/es6/implementation/general/pdf-destination.js +0 -107
- package/dist/es6/implementation/graphics/brushes/index.js +0 -2
- package/dist/es6/implementation/graphics/brushes/pdf-brush.js +0 -6
- package/dist/es6/implementation/graphics/brushes/pdf-solid-brush.js +0 -53
- package/dist/es6/implementation/graphics/constants.js +0 -11
- package/dist/es6/implementation/graphics/enum.js +0 -100
- package/dist/es6/implementation/graphics/figures/base/element-layouter.js +0 -154
- package/dist/es6/implementation/graphics/figures/base/graphics-element.js +0 -18
- package/dist/es6/implementation/graphics/figures/base/index.js +0 -3
- package/dist/es6/implementation/graphics/figures/base/pdf-shape-element.js +0 -32
- package/dist/es6/implementation/graphics/figures/base/shape-layouter.js +0 -55
- package/dist/es6/implementation/graphics/figures/base/text-layouter.js +0 -123
- package/dist/es6/implementation/graphics/figures/enum.js +0 -11
- package/dist/es6/implementation/graphics/figures/index.js +0 -5
- package/dist/es6/implementation/graphics/figures/layout-element.js +0 -41
- package/dist/es6/implementation/graphics/figures/pdf-template.js +0 -110
- package/dist/es6/implementation/graphics/figures/text-element.js +0 -298
- package/dist/es6/implementation/graphics/fonts/enum.js +0 -45
- package/dist/es6/implementation/graphics/fonts/pdf-font-metrics.js +0 -122
- package/dist/es6/implementation/graphics/fonts/pdf-font.js +0 -159
- package/dist/es6/implementation/graphics/fonts/pdf-standard-font-metrics-factory.js +0 -357
- package/dist/es6/implementation/graphics/fonts/pdf-standard-font.js +0 -124
- package/dist/es6/implementation/graphics/fonts/pdf-string-format.js +0 -239
- package/dist/es6/implementation/graphics/fonts/string-layouter.js +0 -335
- package/dist/es6/implementation/graphics/fonts/string-tokenizer.js +0 -162
- package/dist/es6/implementation/graphics/images/byte-array.js +0 -82
- package/dist/es6/implementation/graphics/images/image-decoder.js +0 -167
- package/dist/es6/implementation/graphics/images/pdf-bitmap.js +0 -41
- package/dist/es6/implementation/graphics/images/pdf-image.js +0 -68
- package/dist/es6/implementation/graphics/index.js +0 -20
- package/dist/es6/implementation/graphics/pdf-color.js +0 -205
- package/dist/es6/implementation/graphics/pdf-graphics.js +0 -1034
- package/dist/es6/implementation/graphics/pdf-margins.js +0 -75
- package/dist/es6/implementation/graphics/pdf-pen.js +0 -180
- package/dist/es6/implementation/graphics/pdf-resources.js +0 -223
- package/dist/es6/implementation/graphics/pdf-transformation-matrix.js +0 -134
- package/dist/es6/implementation/graphics/pdf-transparency.js +0 -22
- package/dist/es6/implementation/graphics/unit-convertor.js +0 -33
- package/dist/es6/implementation/index.js +0 -85
- package/dist/es6/implementation/input-output/cross-table.js +0 -6
- package/dist/es6/implementation/input-output/enum.js +0 -5
- package/dist/es6/implementation/input-output/index.js +0 -8
- package/dist/es6/implementation/input-output/pdf-cross-table.js +0 -346
- package/dist/es6/implementation/input-output/pdf-dictionary-properties.js +0 -60
- package/dist/es6/implementation/input-output/pdf-main-object-collection.js +0 -115
- package/dist/es6/implementation/input-output/pdf-operators.js +0 -75
- package/dist/es6/implementation/input-output/pdf-stream-writer.js +0 -364
- package/dist/es6/implementation/input-output/pdf-writer.js +0 -44
- package/dist/es6/implementation/pages/enum.js +0 -51
- package/dist/es6/implementation/pages/index.js +0 -13
- package/dist/es6/implementation/pages/page-added-event-arguments.js +0 -19
- package/dist/es6/implementation/pages/pdf-document-page-collection.js +0 -120
- package/dist/es6/implementation/pages/pdf-page-base.js +0 -104
- package/dist/es6/implementation/pages/pdf-page-layer-collection.js +0 -115
- package/dist/es6/implementation/pages/pdf-page-layer.js +0 -160
- package/dist/es6/implementation/pages/pdf-page-settings.js +0 -126
- package/dist/es6/implementation/pages/pdf-page-size.js +0 -36
- package/dist/es6/implementation/pages/pdf-page-template-element.js +0 -510
- package/dist/es6/implementation/pages/pdf-page.js +0 -130
- package/dist/es6/implementation/pages/pdf-section-collection.js +0 -95
- package/dist/es6/implementation/pages/pdf-section-page-collection.js +0 -30
- package/dist/es6/implementation/pages/pdf-section-templates.js +0 -71
- package/dist/es6/implementation/pages/pdf-section.js +0 -388
- package/dist/es6/implementation/primitives/index.js +0 -8
- package/dist/es6/implementation/primitives/pdf-array.js +0 -199
- package/dist/es6/implementation/primitives/pdf-boolean.js +0 -66
- package/dist/es6/implementation/primitives/pdf-dictionary.js +0 -220
- package/dist/es6/implementation/primitives/pdf-name.js +0 -102
- package/dist/es6/implementation/primitives/pdf-number.js +0 -94
- package/dist/es6/implementation/primitives/pdf-reference.js +0 -195
- package/dist/es6/implementation/primitives/pdf-stream.js +0 -149
- package/dist/es6/implementation/primitives/pdf-string.js +0 -143
- package/dist/es6/implementation/structured-elements/grid/index.js +0 -1
- package/dist/es6/implementation/structured-elements/grid/pdf-grid-cell.js +0 -512
- package/dist/es6/implementation/structured-elements/grid/pdf-grid-column.js +0 -125
- package/dist/es6/implementation/structured-elements/grid/pdf-grid-row.js +0 -244
- package/dist/es6/implementation/structured-elements/grid/pdf-grid.js +0 -989
- package/dist/es6/implementation/structured-elements/grid/styles/index.js +0 -2
- package/dist/es6/implementation/structured-elements/grid/styles/pdf-borders.js +0 -145
- package/dist/es6/implementation/structured-elements/grid/styles/style.js +0 -267
- package/dist/es6/implementation/structured-elements/index.js +0 -1
- package/dist/es6/implementation/structured-elements/tables/light-tables/enum.js +0 -5
- package/dist/es6/index.js +0 -89
- package/dist/es6/interfaces/i-pdf-cache.js +0 -1
- package/dist/es6/interfaces/i-pdf-changable.js +0 -1
- package/dist/es6/interfaces/i-pdf-primitives.js +0 -1
- package/dist/es6/interfaces/i-pdf-wrapper.js +0 -1
- package/dist/es6/interfaces/i-pdf-writer.js +0 -1
- package/dist/es6/interfaces/index.js +0 -1
- package/dist/global/ej2-pdf-export.js +0 -15979
- package/implementation.d.ts +0 -4
- package/implementation.js +0 -8
- package/interfaces.d.ts +0 -4
- package/interfaces.js +0 -4
- package/src/implementation/actions/action.d.ts +0 -50
- package/src/implementation/actions/action.js +0 -44
- package/src/implementation/actions/index.d.ts +0 -6
- package/src/implementation/actions/index.js +0 -9
- package/src/implementation/actions/uri-action.d.ts +0 -33
- package/src/implementation/actions/uri-action.js +0 -39
- package/src/implementation/annotations/action-link-annotation.d.ts +0 -30
- package/src/implementation/annotations/action-link-annotation.js +0 -32
- package/src/implementation/annotations/annotation-collection.d.ts +0 -77
- package/src/implementation/annotations/annotation-collection.js +0 -91
- package/src/implementation/annotations/annotation.d.ts +0 -152
- package/src/implementation/annotations/annotation.js +0 -146
- package/src/implementation/annotations/document-link-annotation.d.ts +0 -89
- package/src/implementation/annotations/document-link-annotation.js +0 -51
- package/src/implementation/annotations/index.d.ts +0 -11
- package/src/implementation/annotations/index.js +0 -14
- package/src/implementation/annotations/link-annotation.d.ts +0 -23
- package/src/implementation/annotations/link-annotation.js +0 -33
- package/src/implementation/annotations/pdf-text-web-link.d.ts +0 -118
- package/src/implementation/annotations/pdf-text-web-link.js +0 -173
- package/src/implementation/annotations/uri-annotation.d.ts +0 -48
- package/src/implementation/annotations/uri-annotation.js +0 -65
- package/src/implementation/collections/dictionary.d.ts +0 -76
- package/src/implementation/collections/dictionary.js +0 -74
- package/src/implementation/collections/index.d.ts +0 -7
- package/src/implementation/collections/index.js +0 -10
- package/src/implementation/collections/object-object-pair/dictionary.d.ts +0 -62
- package/src/implementation/collections/object-object-pair/dictionary.js +0 -88
- package/src/implementation/collections/object-object-pair/index.d.ts +0 -5
- package/src/implementation/collections/object-object-pair/index.js +0 -8
- package/src/implementation/collections/utils.d.ts +0 -27
- package/src/implementation/collections/utils.js +0 -13
- package/src/implementation/document/automatic-fields/automatic-field-info-collection.d.ts +0 -31
- package/src/implementation/document/automatic-fields/automatic-field-info-collection.js +0 -21
- package/src/implementation/document/automatic-fields/automatic-field-info.d.ts +0 -67
- package/src/implementation/document/automatic-fields/automatic-field-info.js +0 -70
- package/src/implementation/document/automatic-fields/automatic-field.d.ts +0 -41
- package/src/implementation/document/automatic-fields/automatic-field.js +0 -143
- package/src/implementation/document/automatic-fields/composite-field.d.ts +0 -46
- package/src/implementation/document/automatic-fields/composite-field.js +0 -64
- package/src/implementation/document/automatic-fields/index.d.ts +0 -11
- package/src/implementation/document/automatic-fields/index.js +0 -14
- package/src/implementation/document/automatic-fields/multiple-value-field.d.ts +0 -18
- package/src/implementation/document/automatic-fields/multiple-value-field.js +0 -35
- package/src/implementation/document/automatic-fields/page-count-field.d.ts +0 -44
- package/src/implementation/document/automatic-fields/page-count-field.js +0 -53
- package/src/implementation/document/automatic-fields/pdf-numbers-convertor.d.ts +0 -53
- package/src/implementation/document/automatic-fields/pdf-numbers-convertor.js +0 -94
- package/src/implementation/document/automatic-fields/pdf-page-number-field.d.ts +0 -51
- package/src/implementation/document/automatic-fields/pdf-page-number-field.js +0 -56
- package/src/implementation/document/automatic-fields/pdf-template-value-pair.d.ts +0 -38
- package/src/implementation/document/automatic-fields/pdf-template-value-pair.js +0 -38
- package/src/implementation/document/automatic-fields/single-value-field.d.ts +0 -15
- package/src/implementation/document/automatic-fields/single-value-field.js +0 -46
- package/src/implementation/document/index.d.ts +0 -15
- package/src/implementation/document/index.js +0 -18
- package/src/implementation/document/pdf-catalog.d.ts +0 -32
- package/src/implementation/document/pdf-catalog.js +0 -38
- package/src/implementation/document/pdf-document-base.d.ts +0 -117
- package/src/implementation/document/pdf-document-base.js +0 -72
- package/src/implementation/document/pdf-document-template.d.ts +0 -166
- package/src/implementation/document/pdf-document-template.js +0 -207
- package/src/implementation/document/pdf-document.d.ts +0 -206
- package/src/implementation/document/pdf-document.js +0 -166
- package/src/implementation/drawing/index.d.ts +0 -5
- package/src/implementation/drawing/index.js +0 -8
- package/src/implementation/drawing/pdf-drawing.d.ts +0 -93
- package/src/implementation/drawing/pdf-drawing.js +0 -84
- package/src/implementation/general/enum.d.ts +0 -21
- package/src/implementation/general/enum.js +0 -10
- package/src/implementation/general/index.d.ts +0 -7
- package/src/implementation/general/index.js +0 -10
- package/src/implementation/general/pdf-cache-collection.d.ts +0 -33
- package/src/implementation/general/pdf-cache-collection.js +0 -27
- package/src/implementation/general/pdf-collection.d.ts +0 -26
- package/src/implementation/general/pdf-collection.js +0 -30
- package/src/implementation/general/pdf-destination.d.ts +0 -103
- package/src/implementation/general/pdf-destination.js +0 -103
- package/src/implementation/graphics/brushes/index.d.ts +0 -6
- package/src/implementation/graphics/brushes/index.js +0 -9
- package/src/implementation/graphics/brushes/pdf-brush.d.ts +0 -55
- package/src/implementation/graphics/brushes/pdf-brush.js +0 -10
- package/src/implementation/graphics/brushes/pdf-solid-brush.d.ts +0 -77
- package/src/implementation/graphics/brushes/pdf-solid-brush.js +0 -54
- package/src/implementation/graphics/constants.d.ts +0 -31
- package/src/implementation/graphics/constants.js +0 -15
- package/src/implementation/graphics/enum.d.ts +0 -392
- package/src/implementation/graphics/enum.js +0 -104
- package/src/implementation/graphics/figures/base/element-layouter.d.ts +0 -160
- package/src/implementation/graphics/figures/base/element-layouter.js +0 -156
- package/src/implementation/graphics/figures/base/graphics-element.d.ts +0 -16
- package/src/implementation/graphics/figures/base/graphics-element.js +0 -22
- package/src/implementation/graphics/figures/base/index.d.ts +0 -7
- package/src/implementation/graphics/figures/base/index.js +0 -10
- package/src/implementation/graphics/figures/base/pdf-shape-element.d.ts +0 -28
- package/src/implementation/graphics/figures/base/pdf-shape-element.js +0 -34
- package/src/implementation/graphics/figures/base/shape-layouter.d.ts +0 -80
- package/src/implementation/graphics/figures/base/shape-layouter.js +0 -57
- package/src/implementation/graphics/figures/base/text-layouter.d.ts +0 -107
- package/src/implementation/graphics/figures/base/text-layouter.js +0 -121
- package/src/implementation/graphics/figures/enum.d.ts +0 -37
- package/src/implementation/graphics/figures/enum.js +0 -15
- package/src/implementation/graphics/figures/index.d.ts +0 -9
- package/src/implementation/graphics/figures/index.js +0 -12
- package/src/implementation/graphics/figures/layout-element.d.ts +0 -57
- package/src/implementation/graphics/figures/layout-element.js +0 -43
- package/src/implementation/graphics/figures/pdf-template.d.ts +0 -113
- package/src/implementation/graphics/figures/pdf-template.js +0 -106
- package/src/implementation/graphics/figures/text-element.d.ts +0 -213
- package/src/implementation/graphics/figures/text-element.js +0 -289
- package/src/implementation/graphics/fonts/enum.d.ts +0 -179
- package/src/implementation/graphics/fonts/enum.js +0 -49
- package/src/implementation/graphics/fonts/index.d.ts +0 -12
- package/src/implementation/graphics/fonts/index.js +0 -15
- package/src/implementation/graphics/fonts/pdf-font-metrics.d.ts +0 -160
- package/src/implementation/graphics/fonts/pdf-font-metrics.js +0 -123
- package/src/implementation/graphics/fonts/pdf-font.d.ts +0 -187
- package/src/implementation/graphics/fonts/pdf-font.js +0 -158
- package/src/implementation/graphics/fonts/pdf-standard-font-metrics-factory.d.ts +0 -301
- package/src/implementation/graphics/fonts/pdf-standard-font-metrics-factory.js +0 -359
- package/src/implementation/graphics/fonts/pdf-standard-font.d.ts +0 -143
- package/src/implementation/graphics/fonts/pdf-standard-font.js +0 -121
- package/src/implementation/graphics/fonts/pdf-string-format.d.ts +0 -319
- package/src/implementation/graphics/fonts/pdf-string-format.js +0 -241
- package/src/implementation/graphics/fonts/string-layouter.d.ts +0 -255
- package/src/implementation/graphics/fonts/string-layouter.js +0 -336
- package/src/implementation/graphics/fonts/string-tokenizer.d.ts +0 -107
- package/src/implementation/graphics/fonts/string-tokenizer.js +0 -166
- package/src/implementation/graphics/images/byte-array.d.ts +0 -68
- package/src/implementation/graphics/images/byte-array.js +0 -86
- package/src/implementation/graphics/images/image-decoder.d.ts +0 -227
- package/src/implementation/graphics/images/image-decoder.js +0 -164
- package/src/implementation/graphics/images/index.js +0 -11
- package/src/implementation/graphics/images/pdf-bitmap.d.ts +0 -90
- package/src/implementation/graphics/images/pdf-bitmap.js +0 -41
- package/src/implementation/graphics/images/pdf-image.d.ts +0 -88
- package/src/implementation/graphics/images/pdf-image.js +0 -69
- package/src/implementation/graphics/index.d.ts +0 -24
- package/src/implementation/graphics/index.js +0 -27
- package/src/implementation/graphics/pdf-color.d.ts +0 -170
- package/src/implementation/graphics/pdf-color.js +0 -204
- package/src/implementation/graphics/pdf-graphics.d.ts +0 -1085
- package/src/implementation/graphics/pdf-graphics.js +0 -1017
- package/src/implementation/graphics/pdf-margins.d.ts +0 -82
- package/src/implementation/graphics/pdf-margins.js +0 -79
- package/src/implementation/graphics/pdf-pen.d.ts +0 -237
- package/src/implementation/graphics/pdf-pen.js +0 -181
- package/src/implementation/graphics/pdf-resources.d.ts +0 -147
- package/src/implementation/graphics/pdf-resources.js +0 -215
- package/src/implementation/graphics/pdf-transformation-matrix.d.ts +0 -143
- package/src/implementation/graphics/pdf-transformation-matrix.js +0 -136
- package/src/implementation/graphics/pdf-transparency.d.ts +0 -34
- package/src/implementation/graphics/pdf-transparency.js +0 -22
- package/src/implementation/graphics/unit-convertor.d.ts +0 -72
- package/src/implementation/graphics/unit-convertor.js +0 -37
- package/src/implementation/index.d.ts +0 -89
- package/src/implementation/index.js +0 -92
- package/src/implementation/input-output/cross-table.d.ts +0 -21
- package/src/implementation/input-output/cross-table.js +0 -10
- package/src/implementation/input-output/enum.d.ts +0 -16
- package/src/implementation/input-output/enum.js +0 -9
- package/src/implementation/input-output/index.d.ts +0 -12
- package/src/implementation/input-output/index.js +0 -15
- package/src/implementation/input-output/pdf-cross-table.d.ts +0 -249
- package/src/implementation/input-output/pdf-cross-table.js +0 -340
- package/src/implementation/input-output/pdf-dictionary-properties.d.ts +0 -283
- package/src/implementation/input-output/pdf-dictionary-properties.js +0 -64
- package/src/implementation/input-output/pdf-main-object-collection.d.ts +0 -120
- package/src/implementation/input-output/pdf-main-object-collection.js +0 -117
- package/src/implementation/input-output/pdf-operators.d.ts +0 -352
- package/src/implementation/input-output/pdf-operators.js +0 -79
- package/src/implementation/input-output/pdf-stream-writer.d.ts +0 -314
- package/src/implementation/input-output/pdf-stream-writer.js +0 -363
- package/src/implementation/input-output/pdf-writer.d.ts +0 -68
- package/src/implementation/input-output/pdf-writer.js +0 -48
- package/src/implementation/pages/enum.d.ts +0 -201
- package/src/implementation/pages/enum.js +0 -55
- package/src/implementation/pages/index.d.ts +0 -17
- package/src/implementation/pages/index.js +0 -20
- package/src/implementation/pages/page-added-event-arguments.d.ts +0 -30
- package/src/implementation/pages/page-added-event-arguments.js +0 -23
- package/src/implementation/pages/pdf-document-page-collection.d.ts +0 -92
- package/src/implementation/pages/pdf-document-page-collection.js +0 -121
- package/src/implementation/pages/pdf-page-base.d.ts +0 -121
- package/src/implementation/pages/pdf-page-base.js +0 -104
- package/src/implementation/pages/pdf-page-layer-collection.d.ts +0 -99
- package/src/implementation/pages/pdf-page-layer-collection.js +0 -113
- package/src/implementation/pages/pdf-page-layer.d.ts +0 -160
- package/src/implementation/pages/pdf-page-layer.js +0 -159
- package/src/implementation/pages/pdf-page-settings.d.ts +0 -111
- package/src/implementation/pages/pdf-page-settings.js +0 -126
- package/src/implementation/pages/pdf-page-size.d.ts +0 -159
- package/src/implementation/pages/pdf-page-size.js +0 -39
- package/src/implementation/pages/pdf-page-template-element.d.ts +0 -230
- package/src/implementation/pages/pdf-page-template-element.js +0 -509
- package/src/implementation/pages/pdf-page.d.ts +0 -153
- package/src/implementation/pages/pdf-page.js +0 -127
- package/src/implementation/pages/pdf-section-collection.d.ts +0 -109
- package/src/implementation/pages/pdf-section-collection.js +0 -91
- package/src/implementation/pages/pdf-section-page-collection.d.ts +0 -41
- package/src/implementation/pages/pdf-section-page-collection.js +0 -34
- package/src/implementation/pages/pdf-section-templates.d.ts +0 -64
- package/src/implementation/pages/pdf-section-templates.js +0 -74
- package/src/implementation/pages/pdf-section.d.ts +0 -319
- package/src/implementation/pages/pdf-section.js +0 -379
- package/src/implementation/primitives/index.d.ts +0 -12
- package/src/implementation/primitives/index.js +0 -15
- package/src/implementation/primitives/pdf-array.d.ts +0 -186
- package/src/implementation/primitives/pdf-array.js +0 -201
- package/src/implementation/primitives/pdf-boolean.d.ts +0 -84
- package/src/implementation/primitives/pdf-boolean.js +0 -70
- package/src/implementation/primitives/pdf-dictionary.d.ts +0 -311
- package/src/implementation/primitives/pdf-dictionary.js +0 -220
- package/src/implementation/primitives/pdf-name.d.ts +0 -121
- package/src/implementation/primitives/pdf-name.js +0 -106
- package/src/implementation/primitives/pdf-number.d.ts +0 -104
- package/src/implementation/primitives/pdf-number.js +0 -98
- package/src/implementation/primitives/pdf-reference.d.ts +0 -222
- package/src/implementation/primitives/pdf-reference.js +0 -192
- package/src/implementation/primitives/pdf-stream.d.ts +0 -111
- package/src/implementation/primitives/pdf-stream.js +0 -146
- package/src/implementation/primitives/pdf-string.d.ts +0 -212
- package/src/implementation/primitives/pdf-string.js +0 -147
- package/src/implementation/structured-elements/grid/index.d.ts +0 -0
- package/src/implementation/structured-elements/grid/index.js +0 -1
- package/src/implementation/structured-elements/grid/pdf-grid-cell.d.ts +0 -248
- package/src/implementation/structured-elements/grid/pdf-grid-cell.js +0 -504
- package/src/implementation/structured-elements/grid/pdf-grid-column.d.ts +0 -108
- package/src/implementation/structured-elements/grid/pdf-grid-column.js +0 -127
- package/src/implementation/structured-elements/grid/pdf-grid-row.d.ts +0 -207
- package/src/implementation/structured-elements/grid/pdf-grid-row.js +0 -246
- package/src/implementation/structured-elements/grid/pdf-grid.d.ts +0 -678
- package/src/implementation/structured-elements/grid/pdf-grid.js +0 -982
- package/src/implementation/structured-elements/grid/styles/index.d.ts +0 -5
- package/src/implementation/structured-elements/grid/styles/index.js +0 -9
- package/src/implementation/structured-elements/grid/styles/pdf-borders.d.ts +0 -126
- package/src/implementation/structured-elements/grid/styles/pdf-borders.js +0 -146
- package/src/implementation/structured-elements/grid/styles/style.d.ts +0 -250
- package/src/implementation/structured-elements/grid/styles/style.js +0 -269
- package/src/implementation/structured-elements/index.d.ts +0 -0
- package/src/implementation/structured-elements/index.js +0 -1
- package/src/implementation/structured-elements/tables/light-tables/enum.d.ts +0 -16
- package/src/implementation/structured-elements/tables/light-tables/enum.js +0 -9
- package/src/interfaces/i-pdf-cache.d.ts +0 -23
- package/src/interfaces/i-pdf-cache.js +0 -4
- package/src/interfaces/i-pdf-changable.d.ts +0 -17
- package/src/interfaces/i-pdf-changable.js +0 -4
- package/src/interfaces/i-pdf-primitives.d.ts +0 -45
- package/src/interfaces/i-pdf-primitives.js +0 -4
- package/src/interfaces/i-pdf-wrapper.d.ts +0 -13
- package/src/interfaces/i-pdf-wrapper.js +0 -4
- package/src/interfaces/i-pdf-writer.d.ts +0 -29
- package/src/interfaces/i-pdf-writer.js +0 -4
- package/src/interfaces/index.d.ts +0 -9
- package/src/interfaces/index.js +0 -4
|
@@ -0,0 +1,1717 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public Enum to define annotation flag types.
|
|
3
|
+
* ```typescript
|
|
4
|
+
* // Load an existing PDF document
|
|
5
|
+
* let document: PdfDocument = new PdfDocument(data, password);
|
|
6
|
+
* // Access first page
|
|
7
|
+
* let page: PdfPage = document.getPage(0);
|
|
8
|
+
* // Access the annotation at index 0
|
|
9
|
+
* let annotation: PdfAnnotation = page.annotations.at(0);
|
|
10
|
+
* // Sets the annotation flag to enable print
|
|
11
|
+
* annotation.flags = PdfAnnotationFlag.print;
|
|
12
|
+
* // Save the document
|
|
13
|
+
* document.save('output.pdf');
|
|
14
|
+
* // Destroy the document
|
|
15
|
+
* document.destroy();
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export var PdfAnnotationFlag;
|
|
19
|
+
(function (PdfAnnotationFlag) {
|
|
20
|
+
/**
|
|
21
|
+
* Specifies the type of `default`.
|
|
22
|
+
*/
|
|
23
|
+
PdfAnnotationFlag[PdfAnnotationFlag["default"] = 0] = "default";
|
|
24
|
+
/**
|
|
25
|
+
* Specifies the type of `invisible`.
|
|
26
|
+
*/
|
|
27
|
+
PdfAnnotationFlag[PdfAnnotationFlag["invisible"] = 1] = "invisible";
|
|
28
|
+
/**
|
|
29
|
+
* Specifies the type of `hidden`.
|
|
30
|
+
*/
|
|
31
|
+
PdfAnnotationFlag[PdfAnnotationFlag["hidden"] = 2] = "hidden";
|
|
32
|
+
/**
|
|
33
|
+
* Specifies the type of `print`.
|
|
34
|
+
*/
|
|
35
|
+
PdfAnnotationFlag[PdfAnnotationFlag["print"] = 4] = "print";
|
|
36
|
+
/**
|
|
37
|
+
* Specifies the type of `noZoom`.
|
|
38
|
+
*/
|
|
39
|
+
PdfAnnotationFlag[PdfAnnotationFlag["noZoom"] = 8] = "noZoom";
|
|
40
|
+
/**
|
|
41
|
+
* Specifies the type of `noRotate`.
|
|
42
|
+
*/
|
|
43
|
+
PdfAnnotationFlag[PdfAnnotationFlag["noRotate"] = 16] = "noRotate";
|
|
44
|
+
/**
|
|
45
|
+
* Specifies the type of `noView`.
|
|
46
|
+
*/
|
|
47
|
+
PdfAnnotationFlag[PdfAnnotationFlag["noView"] = 32] = "noView";
|
|
48
|
+
/**
|
|
49
|
+
* Specifies the type of `readOnly`.
|
|
50
|
+
*/
|
|
51
|
+
PdfAnnotationFlag[PdfAnnotationFlag["readOnly"] = 64] = "readOnly";
|
|
52
|
+
/**
|
|
53
|
+
* Specifies the type of `locked`.
|
|
54
|
+
*/
|
|
55
|
+
PdfAnnotationFlag[PdfAnnotationFlag["locked"] = 128] = "locked";
|
|
56
|
+
/**
|
|
57
|
+
* Specifies the type of `toggleNoView`.
|
|
58
|
+
*/
|
|
59
|
+
PdfAnnotationFlag[PdfAnnotationFlag["toggleNoView"] = 256] = "toggleNoView";
|
|
60
|
+
})(PdfAnnotationFlag || (PdfAnnotationFlag = {}));
|
|
61
|
+
/**
|
|
62
|
+
* Public Enum to define line ending style.
|
|
63
|
+
* ```typescript
|
|
64
|
+
* // Load an existing PDF document
|
|
65
|
+
* let document: PdfDocument = new PdfDocument(data, password);
|
|
66
|
+
* // Access first page
|
|
67
|
+
* let page: PdfPage = document.getPage(0);
|
|
68
|
+
* // Access the annotation at index 0
|
|
69
|
+
* let annotation: PdfPolyLineAnnotation = page.annotations.at(0) as PdfPolyLineAnnotation;
|
|
70
|
+
* // Sets the begin line end style as openArrow
|
|
71
|
+
* annotation.beginLineStyle = PdfLineEndingStyle.openArrow;
|
|
72
|
+
* // Save the document
|
|
73
|
+
* document.save('output.pdf');
|
|
74
|
+
* // Destroy the document
|
|
75
|
+
* document.destroy();
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
export var PdfLineEndingStyle;
|
|
79
|
+
(function (PdfLineEndingStyle) {
|
|
80
|
+
/**
|
|
81
|
+
* Specifies the type of `none`.
|
|
82
|
+
*/
|
|
83
|
+
PdfLineEndingStyle[PdfLineEndingStyle["none"] = 0] = "none";
|
|
84
|
+
/**
|
|
85
|
+
* Specifies the type of `openArrow`.
|
|
86
|
+
*/
|
|
87
|
+
PdfLineEndingStyle[PdfLineEndingStyle["openArrow"] = 1] = "openArrow";
|
|
88
|
+
/**
|
|
89
|
+
* Specifies the type of `closedArrow`.
|
|
90
|
+
*/
|
|
91
|
+
PdfLineEndingStyle[PdfLineEndingStyle["closedArrow"] = 2] = "closedArrow";
|
|
92
|
+
/**
|
|
93
|
+
* Specifies the type of `rOpenArrow`.
|
|
94
|
+
*/
|
|
95
|
+
PdfLineEndingStyle[PdfLineEndingStyle["rOpenArrow"] = 3] = "rOpenArrow";
|
|
96
|
+
/**
|
|
97
|
+
* Specifies the type of `rClosedArrow`.
|
|
98
|
+
*/
|
|
99
|
+
PdfLineEndingStyle[PdfLineEndingStyle["rClosedArrow"] = 4] = "rClosedArrow";
|
|
100
|
+
/**
|
|
101
|
+
* Specifies the type of `butt`.
|
|
102
|
+
*/
|
|
103
|
+
PdfLineEndingStyle[PdfLineEndingStyle["butt"] = 5] = "butt";
|
|
104
|
+
/**
|
|
105
|
+
* Specifies the type of `diamond`.
|
|
106
|
+
*/
|
|
107
|
+
PdfLineEndingStyle[PdfLineEndingStyle["diamond"] = 6] = "diamond";
|
|
108
|
+
/**
|
|
109
|
+
* Specifies the type of `circle`.
|
|
110
|
+
*/
|
|
111
|
+
PdfLineEndingStyle[PdfLineEndingStyle["circle"] = 7] = "circle";
|
|
112
|
+
/**
|
|
113
|
+
* Specifies the type of `square`.
|
|
114
|
+
*/
|
|
115
|
+
PdfLineEndingStyle[PdfLineEndingStyle["square"] = 8] = "square";
|
|
116
|
+
/**
|
|
117
|
+
* Specifies the type of `slash`.
|
|
118
|
+
*/
|
|
119
|
+
PdfLineEndingStyle[PdfLineEndingStyle["slash"] = 9] = "slash";
|
|
120
|
+
})(PdfLineEndingStyle || (PdfLineEndingStyle = {}));
|
|
121
|
+
/**
|
|
122
|
+
* Public Enum to define line indent.
|
|
123
|
+
* ```typescript
|
|
124
|
+
* // Load an existing PDF document
|
|
125
|
+
* let document: PdfDocument = new PdfDocument(data, password);
|
|
126
|
+
* // Access first page
|
|
127
|
+
* let page: PdfPage = document.getPage(0);
|
|
128
|
+
* // Access the annotation at index 0
|
|
129
|
+
* let annotation: PdfLineAnnotation = page.annotations.at(0) as PdfLineAnnotation;
|
|
130
|
+
* // Sets the line intent as lineArrow
|
|
131
|
+
* annotation.lineIntent = PdfLineIntent.lineArrow;
|
|
132
|
+
* // Save the document
|
|
133
|
+
* document.save('output.pdf');
|
|
134
|
+
* // Destroy the document
|
|
135
|
+
* document.destroy();
|
|
136
|
+
* ```
|
|
137
|
+
*/
|
|
138
|
+
export var PdfLineIntent;
|
|
139
|
+
(function (PdfLineIntent) {
|
|
140
|
+
/**
|
|
141
|
+
* Specifies the type of `lineArrow`.
|
|
142
|
+
*/
|
|
143
|
+
PdfLineIntent[PdfLineIntent["lineArrow"] = 0] = "lineArrow";
|
|
144
|
+
/**
|
|
145
|
+
* Specifies the type of `lineDimension`.
|
|
146
|
+
*/
|
|
147
|
+
PdfLineIntent[PdfLineIntent["lineDimension"] = 1] = "lineDimension";
|
|
148
|
+
})(PdfLineIntent || (PdfLineIntent = {}));
|
|
149
|
+
/**
|
|
150
|
+
* Public Enum to define line caption type.
|
|
151
|
+
* ```typescript
|
|
152
|
+
* // Load an existing PDF document
|
|
153
|
+
* let document: PdfDocument = new PdfDocument(data, password);
|
|
154
|
+
* // Access first page
|
|
155
|
+
* let page: PdfPage = document.getPage(0);
|
|
156
|
+
* // Access the annotation at index 0
|
|
157
|
+
* let annotation: PdfAnnotation = page.annotations.at(0);
|
|
158
|
+
* // Sets the line caption type as inline
|
|
159
|
+
* annotation.caption.type = PdfLineCaptionType.inline;
|
|
160
|
+
* // Save the document
|
|
161
|
+
* document.save('output.pdf');
|
|
162
|
+
* // Destroy the document
|
|
163
|
+
* document.destroy();
|
|
164
|
+
* ```
|
|
165
|
+
*/
|
|
166
|
+
export var PdfLineCaptionType;
|
|
167
|
+
(function (PdfLineCaptionType) {
|
|
168
|
+
/**
|
|
169
|
+
* Specifies the type of `inline`.
|
|
170
|
+
*/
|
|
171
|
+
PdfLineCaptionType[PdfLineCaptionType["inline"] = 0] = "inline";
|
|
172
|
+
/**
|
|
173
|
+
* Specifies the type of `top`.
|
|
174
|
+
*/
|
|
175
|
+
PdfLineCaptionType[PdfLineCaptionType["top"] = 1] = "top";
|
|
176
|
+
})(PdfLineCaptionType || (PdfLineCaptionType = {}));
|
|
177
|
+
/**
|
|
178
|
+
* Public Enum to define border style.
|
|
179
|
+
* ```typescript
|
|
180
|
+
* // Load an existing PDF document
|
|
181
|
+
* let document: PdfDocument = new PdfDocument(data, password);
|
|
182
|
+
* // Access first page
|
|
183
|
+
* let page: PdfPage = document.getPage(0);
|
|
184
|
+
* // Access the annotation at index 0
|
|
185
|
+
* let annotation: PdfAnnotation = page.annotations.at(0);
|
|
186
|
+
* // Sets the border style as underline
|
|
187
|
+
* annotation.border.style = PdfBorderStyle.underline;
|
|
188
|
+
* // Save the document
|
|
189
|
+
* document.save('output.pdf');
|
|
190
|
+
* // Destroy the document
|
|
191
|
+
* document.destroy();
|
|
192
|
+
* ```
|
|
193
|
+
*/
|
|
194
|
+
export var PdfBorderStyle;
|
|
195
|
+
(function (PdfBorderStyle) {
|
|
196
|
+
/**
|
|
197
|
+
* Specifies the type of `solid`.
|
|
198
|
+
*/
|
|
199
|
+
PdfBorderStyle[PdfBorderStyle["solid"] = 0] = "solid";
|
|
200
|
+
/**
|
|
201
|
+
* Specifies the type of `dashed`.
|
|
202
|
+
*/
|
|
203
|
+
PdfBorderStyle[PdfBorderStyle["dashed"] = 1] = "dashed";
|
|
204
|
+
/**
|
|
205
|
+
* Specifies the type of `beveled`.
|
|
206
|
+
*/
|
|
207
|
+
PdfBorderStyle[PdfBorderStyle["beveled"] = 2] = "beveled";
|
|
208
|
+
/**
|
|
209
|
+
* Specifies the type of `inset`.
|
|
210
|
+
*/
|
|
211
|
+
PdfBorderStyle[PdfBorderStyle["inset"] = 3] = "inset";
|
|
212
|
+
/**
|
|
213
|
+
* Specifies the type of `underline`.
|
|
214
|
+
*/
|
|
215
|
+
PdfBorderStyle[PdfBorderStyle["underline"] = 4] = "underline";
|
|
216
|
+
/**
|
|
217
|
+
* Specifies the type of `dot`.
|
|
218
|
+
*/
|
|
219
|
+
PdfBorderStyle[PdfBorderStyle["dot"] = 5] = "dot";
|
|
220
|
+
})(PdfBorderStyle || (PdfBorderStyle = {}));
|
|
221
|
+
/**
|
|
222
|
+
* Public Enum to define border effect style.
|
|
223
|
+
* ```typescript
|
|
224
|
+
* // Load an existing PDF document
|
|
225
|
+
* let document: PdfDocument = new PdfDocument(data, password);
|
|
226
|
+
* // Access first page
|
|
227
|
+
* let page: PdfPage = document.getPage(0);
|
|
228
|
+
* // Access the annotation at index 0
|
|
229
|
+
* let annotation: PdfAnnotation = page.annotations.at(0);
|
|
230
|
+
* // Sets the border effect as underline
|
|
231
|
+
* annotation.borderEffect.style = PdfBorderEffectStyle.cloudy;
|
|
232
|
+
* // Save the document
|
|
233
|
+
* document.save('output.pdf');
|
|
234
|
+
* // Destroy the document
|
|
235
|
+
* document.destroy();
|
|
236
|
+
* ```
|
|
237
|
+
*/
|
|
238
|
+
export var PdfBorderEffectStyle;
|
|
239
|
+
(function (PdfBorderEffectStyle) {
|
|
240
|
+
/**
|
|
241
|
+
* Specifies the type of `solid`.
|
|
242
|
+
*/
|
|
243
|
+
PdfBorderEffectStyle[PdfBorderEffectStyle["solid"] = 0] = "solid";
|
|
244
|
+
/**
|
|
245
|
+
* Specifies the type of `cloudy`.
|
|
246
|
+
*/
|
|
247
|
+
PdfBorderEffectStyle[PdfBorderEffectStyle["cloudy"] = 1] = "cloudy";
|
|
248
|
+
})(PdfBorderEffectStyle || (PdfBorderEffectStyle = {}));
|
|
249
|
+
/**
|
|
250
|
+
* Public Enum to define rotation of the interactive elements.
|
|
251
|
+
* ```typescript
|
|
252
|
+
* // Load an existing PDF document
|
|
253
|
+
* let document: PdfDocument = new PdfDocument(data, password);
|
|
254
|
+
* // Access text box field
|
|
255
|
+
* let field: PdfTextBoxField = document.form.fieldAt(0) as PdfTextBoxField;
|
|
256
|
+
* // Gets the rotation of the field
|
|
257
|
+
* let rotation: PdfRotationAngle = field.rotationAngle;
|
|
258
|
+
* // Save the document
|
|
259
|
+
* document.save('output.pdf');
|
|
260
|
+
* // Destroy the document
|
|
261
|
+
* document.destroy();
|
|
262
|
+
* ```
|
|
263
|
+
*/
|
|
264
|
+
export var PdfRotationAngle;
|
|
265
|
+
(function (PdfRotationAngle) {
|
|
266
|
+
/**
|
|
267
|
+
* Specifies the type of `angle0`.
|
|
268
|
+
*/
|
|
269
|
+
PdfRotationAngle[PdfRotationAngle["angle0"] = 0] = "angle0";
|
|
270
|
+
/**
|
|
271
|
+
* Specifies the type of `angle90`.
|
|
272
|
+
*/
|
|
273
|
+
PdfRotationAngle[PdfRotationAngle["angle90"] = 1] = "angle90";
|
|
274
|
+
/**
|
|
275
|
+
* Specifies the type of `angle180`.
|
|
276
|
+
*/
|
|
277
|
+
PdfRotationAngle[PdfRotationAngle["angle180"] = 2] = "angle180";
|
|
278
|
+
/**
|
|
279
|
+
* Specifies the type of `angle270`.
|
|
280
|
+
*/
|
|
281
|
+
PdfRotationAngle[PdfRotationAngle["angle270"] = 3] = "angle270";
|
|
282
|
+
})(PdfRotationAngle || (PdfRotationAngle = {}));
|
|
283
|
+
/**
|
|
284
|
+
* Public Enum to define cross reference type.
|
|
285
|
+
* ```typescript
|
|
286
|
+
* // Load an existing PDF document
|
|
287
|
+
* let document: PdfDocument = new PdfDocument(data, password);
|
|
288
|
+
* // Save the document with cross reference type as stream
|
|
289
|
+
* document.save('output.pdf', PdfCrossReferenceType.stream);
|
|
290
|
+
* // Destroy the document
|
|
291
|
+
* document.destroy();
|
|
292
|
+
* ```
|
|
293
|
+
*/
|
|
294
|
+
export var PdfCrossReferenceType;
|
|
295
|
+
(function (PdfCrossReferenceType) {
|
|
296
|
+
/**
|
|
297
|
+
* Specifies the type of `table`.
|
|
298
|
+
*/
|
|
299
|
+
PdfCrossReferenceType[PdfCrossReferenceType["table"] = 0] = "table";
|
|
300
|
+
/**
|
|
301
|
+
* Specifies the type of `stream`.
|
|
302
|
+
*/
|
|
303
|
+
PdfCrossReferenceType[PdfCrossReferenceType["stream"] = 1] = "stream";
|
|
304
|
+
})(PdfCrossReferenceType || (PdfCrossReferenceType = {}));
|
|
305
|
+
/**
|
|
306
|
+
* Public Enum to define highlight mode of text box field.
|
|
307
|
+
* ```typescript
|
|
308
|
+
* // Load an existing PDF document
|
|
309
|
+
* let document: PdfDocument = new PdfDocument(data, password);
|
|
310
|
+
* // Access text box field
|
|
311
|
+
* let field: PdfTextBoxField = document.form.fieldAt(0) as PdfTextBoxField;
|
|
312
|
+
* // Sets the highlight mode of text box field as outline
|
|
313
|
+
* field.highlightMode = PdfHighlightMode.outline;
|
|
314
|
+
* // Save the document
|
|
315
|
+
* document.save('output.pdf');
|
|
316
|
+
* // Destroy the document
|
|
317
|
+
* document.destroy();
|
|
318
|
+
* ```
|
|
319
|
+
*/
|
|
320
|
+
export var PdfHighlightMode;
|
|
321
|
+
(function (PdfHighlightMode) {
|
|
322
|
+
/**
|
|
323
|
+
* Specifies the type of `noHighlighting`.
|
|
324
|
+
*/
|
|
325
|
+
PdfHighlightMode[PdfHighlightMode["noHighlighting"] = 0] = "noHighlighting";
|
|
326
|
+
/**
|
|
327
|
+
* Specifies the type of `invert`.
|
|
328
|
+
*/
|
|
329
|
+
PdfHighlightMode[PdfHighlightMode["invert"] = 1] = "invert";
|
|
330
|
+
/**
|
|
331
|
+
* Specifies the type of `outline`.
|
|
332
|
+
*/
|
|
333
|
+
PdfHighlightMode[PdfHighlightMode["outline"] = 2] = "outline";
|
|
334
|
+
/**
|
|
335
|
+
* Specifies the type of `push`.
|
|
336
|
+
*/
|
|
337
|
+
PdfHighlightMode[PdfHighlightMode["push"] = 3] = "push";
|
|
338
|
+
})(PdfHighlightMode || (PdfHighlightMode = {}));
|
|
339
|
+
/**
|
|
340
|
+
* Public Enum to define text alignment of text box field.
|
|
341
|
+
* ```typescript
|
|
342
|
+
* // Load an existing PDF document
|
|
343
|
+
* let document: PdfDocument = new PdfDocument(data, password);
|
|
344
|
+
* // Access text box field
|
|
345
|
+
* let field: PdfTextBoxField = document.form.fieldAt(0) as PdfTextBoxField;
|
|
346
|
+
* // Sets the text alignment of form field as center
|
|
347
|
+
* field.textAlignment = PdfTextAlignment.center;
|
|
348
|
+
* // Save the document
|
|
349
|
+
* document.save('output.pdf');
|
|
350
|
+
* // Destroy the document
|
|
351
|
+
* document.destroy();
|
|
352
|
+
* ```
|
|
353
|
+
*/
|
|
354
|
+
export var PdfTextAlignment;
|
|
355
|
+
(function (PdfTextAlignment) {
|
|
356
|
+
/**
|
|
357
|
+
* Specifies the type of `left`.
|
|
358
|
+
*/
|
|
359
|
+
PdfTextAlignment[PdfTextAlignment["left"] = 0] = "left";
|
|
360
|
+
/**
|
|
361
|
+
* Specifies the type of `center`.
|
|
362
|
+
*/
|
|
363
|
+
PdfTextAlignment[PdfTextAlignment["center"] = 1] = "center";
|
|
364
|
+
/**
|
|
365
|
+
* Specifies the type of `right`.
|
|
366
|
+
*/
|
|
367
|
+
PdfTextAlignment[PdfTextAlignment["right"] = 2] = "right";
|
|
368
|
+
/**
|
|
369
|
+
* Specifies the type of `justify`.
|
|
370
|
+
*/
|
|
371
|
+
PdfTextAlignment[PdfTextAlignment["justify"] = 3] = "justify";
|
|
372
|
+
})(PdfTextAlignment || (PdfTextAlignment = {}));
|
|
373
|
+
/**
|
|
374
|
+
* Public Enum to define visibility of form field.
|
|
375
|
+
* ```typescript
|
|
376
|
+
* // Load an existing PDF document
|
|
377
|
+
* let document: PdfDocument = new PdfDocument(data, password);
|
|
378
|
+
* // Access PDF form field
|
|
379
|
+
* let field: PdfField = document.form.fieldAt(0);
|
|
380
|
+
* // Sets the visibility of form field as hidden
|
|
381
|
+
* field.visibility = PdfFormFieldVisibility.hidden;
|
|
382
|
+
* // Save the document
|
|
383
|
+
* document.save('output.pdf');
|
|
384
|
+
* // Destroy the document
|
|
385
|
+
* document.destroy();
|
|
386
|
+
* ```
|
|
387
|
+
*/
|
|
388
|
+
export var PdfFormFieldVisibility;
|
|
389
|
+
(function (PdfFormFieldVisibility) {
|
|
390
|
+
/**
|
|
391
|
+
* Specifies the type of `visible`.
|
|
392
|
+
*/
|
|
393
|
+
PdfFormFieldVisibility[PdfFormFieldVisibility["visible"] = 0] = "visible";
|
|
394
|
+
/**
|
|
395
|
+
* Specifies the type of `hidden`.
|
|
396
|
+
*/
|
|
397
|
+
PdfFormFieldVisibility[PdfFormFieldVisibility["hidden"] = 1] = "hidden";
|
|
398
|
+
/**
|
|
399
|
+
* Specifies the type of `visibleNotPrintable`.
|
|
400
|
+
*/
|
|
401
|
+
PdfFormFieldVisibility[PdfFormFieldVisibility["visibleNotPrintable"] = 2] = "visibleNotPrintable";
|
|
402
|
+
/**
|
|
403
|
+
* Specifies the type of `hiddenPrintable`.
|
|
404
|
+
*/
|
|
405
|
+
PdfFormFieldVisibility[PdfFormFieldVisibility["hiddenPrintable"] = 3] = "hiddenPrintable";
|
|
406
|
+
})(PdfFormFieldVisibility || (PdfFormFieldVisibility = {}));
|
|
407
|
+
/**
|
|
408
|
+
* Public Enum to define measurement unit of line measurement annotation.
|
|
409
|
+
* ```typescript
|
|
410
|
+
* // Load an existing PDF document
|
|
411
|
+
* let document: PdfDocument = new PdfDocument(data, password);
|
|
412
|
+
* // Access first page
|
|
413
|
+
* let page: PdfPage = document.getPage(0);
|
|
414
|
+
* // Access the annotation at index 0
|
|
415
|
+
* let annotation: PdfLineAnnotation = page.annotations.at(0) PdfLineAnnotation;
|
|
416
|
+
* // Sets the measurement unit of line measurement annoation as centimeter
|
|
417
|
+
* annotation.unit = PdfMeasurementUnit.centimeter;
|
|
418
|
+
* // Save the document
|
|
419
|
+
* document.save('output.pdf');
|
|
420
|
+
* // Destroy the document
|
|
421
|
+
* document.destroy();
|
|
422
|
+
* ```
|
|
423
|
+
*/
|
|
424
|
+
export var PdfMeasurementUnit;
|
|
425
|
+
(function (PdfMeasurementUnit) {
|
|
426
|
+
/**
|
|
427
|
+
* Specifies the type of `inch`.
|
|
428
|
+
*/
|
|
429
|
+
PdfMeasurementUnit[PdfMeasurementUnit["inch"] = 0] = "inch";
|
|
430
|
+
/**
|
|
431
|
+
* Specifies the type of `pica`.
|
|
432
|
+
*/
|
|
433
|
+
PdfMeasurementUnit[PdfMeasurementUnit["pica"] = 1] = "pica";
|
|
434
|
+
/**
|
|
435
|
+
* Specifies the type of `point`.
|
|
436
|
+
*/
|
|
437
|
+
PdfMeasurementUnit[PdfMeasurementUnit["point"] = 3] = "point";
|
|
438
|
+
/**
|
|
439
|
+
* Specifies the type of `centimeter`.
|
|
440
|
+
*/
|
|
441
|
+
PdfMeasurementUnit[PdfMeasurementUnit["centimeter"] = 4] = "centimeter";
|
|
442
|
+
/**
|
|
443
|
+
* Specifies the type of `millimeter`.
|
|
444
|
+
*/
|
|
445
|
+
PdfMeasurementUnit[PdfMeasurementUnit["millimeter"] = 6] = "millimeter";
|
|
446
|
+
})(PdfMeasurementUnit || (PdfMeasurementUnit = {}));
|
|
447
|
+
/**
|
|
448
|
+
* Public Enum to define measurement type of circle annotation.
|
|
449
|
+
* ```typescript
|
|
450
|
+
* // Load an existing PDF document
|
|
451
|
+
* let document: PdfDocument = new PdfDocument(data, password);
|
|
452
|
+
* // Access first page
|
|
453
|
+
* let page: PdfPage = document.getPage(0);
|
|
454
|
+
* // Access the annotation at index 0
|
|
455
|
+
* let annotation: PdfCircleAnnotation = page.annotations.at(0) PdfCircleAnnotation;
|
|
456
|
+
* // Sets the measurement type of circle annotation as diameter
|
|
457
|
+
* annotation.measureType = PdfCircleMeasurementType.diameter;
|
|
458
|
+
* // Save the document
|
|
459
|
+
* document.save('output.pdf');
|
|
460
|
+
* // Destroy the document
|
|
461
|
+
* document.destroy();
|
|
462
|
+
* ```
|
|
463
|
+
*/
|
|
464
|
+
export var PdfCircleMeasurementType;
|
|
465
|
+
(function (PdfCircleMeasurementType) {
|
|
466
|
+
/**
|
|
467
|
+
* Specifies the type of `diameter`.
|
|
468
|
+
*/
|
|
469
|
+
PdfCircleMeasurementType[PdfCircleMeasurementType["diameter"] = 0] = "diameter";
|
|
470
|
+
/**
|
|
471
|
+
* Specifies the type of `radius`.
|
|
472
|
+
*/
|
|
473
|
+
PdfCircleMeasurementType[PdfCircleMeasurementType["radius"] = 1] = "radius";
|
|
474
|
+
})(PdfCircleMeasurementType || (PdfCircleMeasurementType = {}));
|
|
475
|
+
/**
|
|
476
|
+
* Public Enum to define icon type of rubber stamp annotation.
|
|
477
|
+
* ```typescript
|
|
478
|
+
* // Load an existing PDF document
|
|
479
|
+
* let document: PdfDocument = new PdfDocument(data, password);
|
|
480
|
+
* // Access first page
|
|
481
|
+
* let page: PdfPage = document.getPage(0);
|
|
482
|
+
* // Access the annotation at index 0
|
|
483
|
+
* let annotation: PdfRubberStampAnnotation = page.annotations.at(0) PdfRubberStampAnnotation;
|
|
484
|
+
* // Sets the rubber stamp annotation icon type as confidential
|
|
485
|
+
* annotation.icon = PdfRubberStampAnnotationIcon.confidential;
|
|
486
|
+
* // Save the document
|
|
487
|
+
* document.save('output.pdf');
|
|
488
|
+
* // Destroy the document
|
|
489
|
+
* document.destroy();
|
|
490
|
+
* ```
|
|
491
|
+
*/
|
|
492
|
+
export var PdfRubberStampAnnotationIcon;
|
|
493
|
+
(function (PdfRubberStampAnnotationIcon) {
|
|
494
|
+
/**
|
|
495
|
+
* Specifies the type of `approved`.
|
|
496
|
+
*/
|
|
497
|
+
PdfRubberStampAnnotationIcon[PdfRubberStampAnnotationIcon["approved"] = 0] = "approved";
|
|
498
|
+
/**
|
|
499
|
+
* Specifies the type of `asIs`.
|
|
500
|
+
*/
|
|
501
|
+
PdfRubberStampAnnotationIcon[PdfRubberStampAnnotationIcon["asIs"] = 1] = "asIs";
|
|
502
|
+
/**
|
|
503
|
+
* Specifies the type of `confidential`.
|
|
504
|
+
*/
|
|
505
|
+
PdfRubberStampAnnotationIcon[PdfRubberStampAnnotationIcon["confidential"] = 2] = "confidential";
|
|
506
|
+
/**
|
|
507
|
+
* Specifies the type of `departmental`.
|
|
508
|
+
*/
|
|
509
|
+
PdfRubberStampAnnotationIcon[PdfRubberStampAnnotationIcon["departmental"] = 3] = "departmental";
|
|
510
|
+
/**
|
|
511
|
+
* Specifies the type of `draft`.
|
|
512
|
+
*/
|
|
513
|
+
PdfRubberStampAnnotationIcon[PdfRubberStampAnnotationIcon["draft"] = 4] = "draft";
|
|
514
|
+
/**
|
|
515
|
+
* Specifies the type of `experimental`.
|
|
516
|
+
*/
|
|
517
|
+
PdfRubberStampAnnotationIcon[PdfRubberStampAnnotationIcon["experimental"] = 5] = "experimental";
|
|
518
|
+
/**
|
|
519
|
+
* Specifies the type of `expired`.
|
|
520
|
+
*/
|
|
521
|
+
PdfRubberStampAnnotationIcon[PdfRubberStampAnnotationIcon["expired"] = 6] = "expired";
|
|
522
|
+
/**
|
|
523
|
+
* Specifies the type of `final`.
|
|
524
|
+
*/
|
|
525
|
+
PdfRubberStampAnnotationIcon[PdfRubberStampAnnotationIcon["final"] = 7] = "final";
|
|
526
|
+
/**
|
|
527
|
+
* Specifies the type of `forComment`.
|
|
528
|
+
*/
|
|
529
|
+
PdfRubberStampAnnotationIcon[PdfRubberStampAnnotationIcon["forComment"] = 8] = "forComment";
|
|
530
|
+
/**
|
|
531
|
+
* Specifies the type of `forPublicRelease`.
|
|
532
|
+
*/
|
|
533
|
+
PdfRubberStampAnnotationIcon[PdfRubberStampAnnotationIcon["forPublicRelease"] = 9] = "forPublicRelease";
|
|
534
|
+
/**
|
|
535
|
+
* Specifies the type of `notApproved`.
|
|
536
|
+
*/
|
|
537
|
+
PdfRubberStampAnnotationIcon[PdfRubberStampAnnotationIcon["notApproved"] = 10] = "notApproved";
|
|
538
|
+
/**
|
|
539
|
+
* Specifies the type of `notForPublicRelease`.
|
|
540
|
+
*/
|
|
541
|
+
PdfRubberStampAnnotationIcon[PdfRubberStampAnnotationIcon["notForPublicRelease"] = 11] = "notForPublicRelease";
|
|
542
|
+
/**
|
|
543
|
+
* Specifies the type of `sold`.
|
|
544
|
+
*/
|
|
545
|
+
PdfRubberStampAnnotationIcon[PdfRubberStampAnnotationIcon["sold"] = 12] = "sold";
|
|
546
|
+
/**
|
|
547
|
+
* Specifies the type of `topSecret`.
|
|
548
|
+
*/
|
|
549
|
+
PdfRubberStampAnnotationIcon[PdfRubberStampAnnotationIcon["topSecret"] = 13] = "topSecret";
|
|
550
|
+
/**
|
|
551
|
+
* Specifies the type of `completed`.
|
|
552
|
+
*/
|
|
553
|
+
PdfRubberStampAnnotationIcon[PdfRubberStampAnnotationIcon["completed"] = 14] = "completed";
|
|
554
|
+
/**
|
|
555
|
+
* Specifies the type of `void`.
|
|
556
|
+
*/
|
|
557
|
+
PdfRubberStampAnnotationIcon[PdfRubberStampAnnotationIcon["void"] = 15] = "void";
|
|
558
|
+
/**
|
|
559
|
+
* Specifies the type of `informationOnly`.
|
|
560
|
+
*/
|
|
561
|
+
PdfRubberStampAnnotationIcon[PdfRubberStampAnnotationIcon["informationOnly"] = 16] = "informationOnly";
|
|
562
|
+
/**
|
|
563
|
+
* Specifies the type of `preliminaryResults`.
|
|
564
|
+
*/
|
|
565
|
+
PdfRubberStampAnnotationIcon[PdfRubberStampAnnotationIcon["preliminaryResults"] = 17] = "preliminaryResults";
|
|
566
|
+
})(PdfRubberStampAnnotationIcon || (PdfRubberStampAnnotationIcon = {}));
|
|
567
|
+
/**
|
|
568
|
+
* Public Enum to define check box style.
|
|
569
|
+
* ```typescript
|
|
570
|
+
* // Load an existing PDF document
|
|
571
|
+
* let document: PdfDocument = new PdfDocument(data, password);
|
|
572
|
+
* // Access check box field
|
|
573
|
+
* let field: PdfCheckBoxField = document.form.fieldAt(0) as PdfCheckBoxField;
|
|
574
|
+
* // Access first item of check box field
|
|
575
|
+
* let item: PdfStateItem = field.itemAt(0) as PdfStateItem;
|
|
576
|
+
* // Sets the check box style as check
|
|
577
|
+
* item.style = PdfCheckBoxStyle.check;
|
|
578
|
+
* // Save the document
|
|
579
|
+
* document.save('output.pdf');
|
|
580
|
+
* // Destroy the document
|
|
581
|
+
* document.destroy();
|
|
582
|
+
* ```
|
|
583
|
+
*/
|
|
584
|
+
export var PdfCheckBoxStyle;
|
|
585
|
+
(function (PdfCheckBoxStyle) {
|
|
586
|
+
/**
|
|
587
|
+
* Specifies the type of `check`.
|
|
588
|
+
*/
|
|
589
|
+
PdfCheckBoxStyle[PdfCheckBoxStyle["check"] = 0] = "check";
|
|
590
|
+
/**
|
|
591
|
+
* Specifies the type of `circle`.
|
|
592
|
+
*/
|
|
593
|
+
PdfCheckBoxStyle[PdfCheckBoxStyle["circle"] = 1] = "circle";
|
|
594
|
+
/**
|
|
595
|
+
* Specifies the type of `cross`.
|
|
596
|
+
*/
|
|
597
|
+
PdfCheckBoxStyle[PdfCheckBoxStyle["cross"] = 2] = "cross";
|
|
598
|
+
/**
|
|
599
|
+
* Specifies the type of `diamond`.
|
|
600
|
+
*/
|
|
601
|
+
PdfCheckBoxStyle[PdfCheckBoxStyle["diamond"] = 3] = "diamond";
|
|
602
|
+
/**
|
|
603
|
+
* Specifies the type of `square`.
|
|
604
|
+
*/
|
|
605
|
+
PdfCheckBoxStyle[PdfCheckBoxStyle["square"] = 4] = "square";
|
|
606
|
+
/**
|
|
607
|
+
* Specifies the type of `star`.
|
|
608
|
+
*/
|
|
609
|
+
PdfCheckBoxStyle[PdfCheckBoxStyle["star"] = 5] = "star";
|
|
610
|
+
})(PdfCheckBoxStyle || (PdfCheckBoxStyle = {}));
|
|
611
|
+
/**
|
|
612
|
+
* Public Enum to define type of text markup annotation.
|
|
613
|
+
* ```typescript
|
|
614
|
+
* // Load an existing PDF document
|
|
615
|
+
* let document: PdfDocument = new PdfDocument(data, password);
|
|
616
|
+
* // Access first page
|
|
617
|
+
* let page: PdfPage = document.getPage(0);
|
|
618
|
+
* // Access the annotation at index 0
|
|
619
|
+
* let annotation: PdfTextMarkupAnnotation = page.annotations.at(0) PdfTextMarkupAnnotation;
|
|
620
|
+
* // Sets the type of the text markup annotation as underline
|
|
621
|
+
* annotation.textMarkupType = PdfTextMarkupAnnotationType.underline;
|
|
622
|
+
* // Save the document
|
|
623
|
+
* document.save('output.pdf');
|
|
624
|
+
* // Destroy the document
|
|
625
|
+
* document.destroy();
|
|
626
|
+
* ```
|
|
627
|
+
*/
|
|
628
|
+
export var PdfTextMarkupAnnotationType;
|
|
629
|
+
(function (PdfTextMarkupAnnotationType) {
|
|
630
|
+
/**
|
|
631
|
+
* Specifies the type of `highlight`.
|
|
632
|
+
*/
|
|
633
|
+
PdfTextMarkupAnnotationType[PdfTextMarkupAnnotationType["highlight"] = 0] = "highlight";
|
|
634
|
+
/**
|
|
635
|
+
* Specifies the type of `underline`.
|
|
636
|
+
*/
|
|
637
|
+
PdfTextMarkupAnnotationType[PdfTextMarkupAnnotationType["underline"] = 1] = "underline";
|
|
638
|
+
/**
|
|
639
|
+
* Specifies the type of `squiggly`.
|
|
640
|
+
*/
|
|
641
|
+
PdfTextMarkupAnnotationType[PdfTextMarkupAnnotationType["squiggly"] = 2] = "squiggly";
|
|
642
|
+
/**
|
|
643
|
+
* Specifies the type of `strikeOut`.
|
|
644
|
+
*/
|
|
645
|
+
PdfTextMarkupAnnotationType[PdfTextMarkupAnnotationType["strikeOut"] = 3] = "strikeOut";
|
|
646
|
+
})(PdfTextMarkupAnnotationType || (PdfTextMarkupAnnotationType = {}));
|
|
647
|
+
/**
|
|
648
|
+
* Public Enum to define icon type of popup annotation.
|
|
649
|
+
* ```typescript
|
|
650
|
+
* // Load an existing PDF document
|
|
651
|
+
* let document: PdfDocument = new PdfDocument(data, password);
|
|
652
|
+
* // Access first page
|
|
653
|
+
* let page: PdfPage = document.getPage(0);
|
|
654
|
+
* // Access the annotation at index 0
|
|
655
|
+
* let annotation: PdfPopupAnnotation = page.annotations.at(0) PdfPopupAnnotation;
|
|
656
|
+
* // Sets the icon type of the popup annotation as comment
|
|
657
|
+
* annotation.icon = PdfPopupIcon.comment;
|
|
658
|
+
* // Save the document
|
|
659
|
+
* document.save('output.pdf');
|
|
660
|
+
* // Destroy the document
|
|
661
|
+
* document.destroy();
|
|
662
|
+
* ```
|
|
663
|
+
*/
|
|
664
|
+
export var PdfPopupIcon;
|
|
665
|
+
(function (PdfPopupIcon) {
|
|
666
|
+
/**
|
|
667
|
+
* Specifies the type of `note`.
|
|
668
|
+
*/
|
|
669
|
+
PdfPopupIcon[PdfPopupIcon["note"] = 0] = "note";
|
|
670
|
+
/**
|
|
671
|
+
* Specifies the type of `comment`.
|
|
672
|
+
*/
|
|
673
|
+
PdfPopupIcon[PdfPopupIcon["comment"] = 1] = "comment";
|
|
674
|
+
/**
|
|
675
|
+
* Specifies the type of `help`.
|
|
676
|
+
*/
|
|
677
|
+
PdfPopupIcon[PdfPopupIcon["help"] = 2] = "help";
|
|
678
|
+
/**
|
|
679
|
+
* Specifies the type of `insert`.
|
|
680
|
+
*/
|
|
681
|
+
PdfPopupIcon[PdfPopupIcon["insert"] = 3] = "insert";
|
|
682
|
+
/**
|
|
683
|
+
* Specifies the type of `key`.
|
|
684
|
+
*/
|
|
685
|
+
PdfPopupIcon[PdfPopupIcon["key"] = 4] = "key";
|
|
686
|
+
/**
|
|
687
|
+
* Specifies the type of `new paragraph`.
|
|
688
|
+
*/
|
|
689
|
+
PdfPopupIcon[PdfPopupIcon["newParagraph"] = 5] = "newParagraph";
|
|
690
|
+
/**
|
|
691
|
+
* Specifies the type of `paragraph`.
|
|
692
|
+
*/
|
|
693
|
+
PdfPopupIcon[PdfPopupIcon["paragraph"] = 6] = "paragraph";
|
|
694
|
+
})(PdfPopupIcon || (PdfPopupIcon = {}));
|
|
695
|
+
/**
|
|
696
|
+
* Public Enum to define annotation state.
|
|
697
|
+
* ```typescript
|
|
698
|
+
* // Load an existing PDF document
|
|
699
|
+
* let document: PdfDocument = new PdfDocument(data, password);
|
|
700
|
+
* // Access first page
|
|
701
|
+
* let page: PdfPage = document.getPage(0);
|
|
702
|
+
* // Access the annotation at index 0
|
|
703
|
+
* let annotation: PdfPopupAnnotation = page.annotations.at(0) PdfPopupAnnotation;
|
|
704
|
+
* // Sets the state of the popup annotation as accepted
|
|
705
|
+
* annotation.state = PdfAnnotationState.accepted;
|
|
706
|
+
* // Save the document
|
|
707
|
+
* document.save('output.pdf');
|
|
708
|
+
* // Destroy the document
|
|
709
|
+
* document.destroy();
|
|
710
|
+
* ```
|
|
711
|
+
*/
|
|
712
|
+
export var PdfAnnotationState;
|
|
713
|
+
(function (PdfAnnotationState) {
|
|
714
|
+
/**
|
|
715
|
+
* Specifies the default state of `none`.
|
|
716
|
+
*/
|
|
717
|
+
PdfAnnotationState[PdfAnnotationState["none"] = 0] = "none";
|
|
718
|
+
/**
|
|
719
|
+
* Specifies the state of `accepted`.
|
|
720
|
+
*/
|
|
721
|
+
PdfAnnotationState[PdfAnnotationState["accepted"] = 1] = "accepted";
|
|
722
|
+
/**
|
|
723
|
+
* Specifies the state of `rejected`.
|
|
724
|
+
*/
|
|
725
|
+
PdfAnnotationState[PdfAnnotationState["rejected"] = 2] = "rejected";
|
|
726
|
+
/**
|
|
727
|
+
* Specifies the state of `cancel`.
|
|
728
|
+
*/
|
|
729
|
+
PdfAnnotationState[PdfAnnotationState["cancel"] = 3] = "cancel";
|
|
730
|
+
/**
|
|
731
|
+
* Specifies the state of `completed`.
|
|
732
|
+
*/
|
|
733
|
+
PdfAnnotationState[PdfAnnotationState["completed"] = 4] = "completed";
|
|
734
|
+
/**
|
|
735
|
+
* Specifies the state of `marked`.
|
|
736
|
+
*/
|
|
737
|
+
PdfAnnotationState[PdfAnnotationState["marked"] = 5] = "marked";
|
|
738
|
+
/**
|
|
739
|
+
* Specifies the state of `unmarked`.
|
|
740
|
+
*/
|
|
741
|
+
PdfAnnotationState[PdfAnnotationState["unmarked"] = 6] = "unmarked";
|
|
742
|
+
/**
|
|
743
|
+
* Specifies the state of `unknown`.
|
|
744
|
+
*/
|
|
745
|
+
PdfAnnotationState[PdfAnnotationState["unknown"] = 7] = "unknown";
|
|
746
|
+
})(PdfAnnotationState || (PdfAnnotationState = {}));
|
|
747
|
+
/**
|
|
748
|
+
* Public Enum to define annotation state model.
|
|
749
|
+
* ```typescript
|
|
750
|
+
* // Load an existing PDF document
|
|
751
|
+
* let document: PdfDocument = new PdfDocument(data, password);
|
|
752
|
+
* // Access first page
|
|
753
|
+
* let page: PdfPage = document.getPage(0);
|
|
754
|
+
* // Access the annotation at index 0
|
|
755
|
+
* let annotation: PdfPopupAnnotation = page.annotations.at(0) PdfPopupAnnotation;
|
|
756
|
+
* // Sets the state model of the popup annotation as marked
|
|
757
|
+
* annotation.stateModel = PdfAnnotationStateModel.marked;
|
|
758
|
+
* // Save the document
|
|
759
|
+
* document.save('output.pdf');
|
|
760
|
+
* // Destroy the document
|
|
761
|
+
* document.destroy();
|
|
762
|
+
* ```
|
|
763
|
+
*/
|
|
764
|
+
export var PdfAnnotationStateModel;
|
|
765
|
+
(function (PdfAnnotationStateModel) {
|
|
766
|
+
/**
|
|
767
|
+
* Specifies the default model of `none`.
|
|
768
|
+
*/
|
|
769
|
+
PdfAnnotationStateModel[PdfAnnotationStateModel["none"] = 0] = "none";
|
|
770
|
+
/**
|
|
771
|
+
* Specifies the model of `marked`.
|
|
772
|
+
*/
|
|
773
|
+
PdfAnnotationStateModel[PdfAnnotationStateModel["marked"] = 1] = "marked";
|
|
774
|
+
/**
|
|
775
|
+
* Specifies the model of `review`.
|
|
776
|
+
*/
|
|
777
|
+
PdfAnnotationStateModel[PdfAnnotationStateModel["review"] = 2] = "review";
|
|
778
|
+
})(PdfAnnotationStateModel || (PdfAnnotationStateModel = {}));
|
|
779
|
+
/**
|
|
780
|
+
* Public Enum to define icon type of attachment annotation.
|
|
781
|
+
* ```typescript
|
|
782
|
+
* // Load an existing PDF document
|
|
783
|
+
* let document: PdfDocument = new PdfDocument(data, password);
|
|
784
|
+
* // Access first page
|
|
785
|
+
* let page: PdfPage = document.getPage(0);
|
|
786
|
+
* // Access the annotation at index 0
|
|
787
|
+
* let annotation: PdfAttachmentAnnotation = page.annotations.at(0) PdfAttachmentAnnotation;
|
|
788
|
+
* // Sets the icon type of attachment annotation to pushPin
|
|
789
|
+
* annotation.icon = PdfAttachmentIcon.pushPin;
|
|
790
|
+
* // Save the document
|
|
791
|
+
* document.save('output.pdf');
|
|
792
|
+
* // Destroy the document
|
|
793
|
+
* document.destroy();
|
|
794
|
+
* ```
|
|
795
|
+
*/
|
|
796
|
+
export var PdfAttachmentIcon;
|
|
797
|
+
(function (PdfAttachmentIcon) {
|
|
798
|
+
/**
|
|
799
|
+
* Specifies the default icon of `pushPin`.
|
|
800
|
+
*/
|
|
801
|
+
PdfAttachmentIcon[PdfAttachmentIcon["pushPin"] = 0] = "pushPin";
|
|
802
|
+
/**
|
|
803
|
+
* Specifies the icon of `tag`.
|
|
804
|
+
*/
|
|
805
|
+
PdfAttachmentIcon[PdfAttachmentIcon["tag"] = 1] = "tag";
|
|
806
|
+
/**
|
|
807
|
+
* Specifies the icon of `graph`.
|
|
808
|
+
*/
|
|
809
|
+
PdfAttachmentIcon[PdfAttachmentIcon["graph"] = 2] = "graph";
|
|
810
|
+
/**
|
|
811
|
+
* Specifies the icon of `paperClip`.
|
|
812
|
+
*/
|
|
813
|
+
PdfAttachmentIcon[PdfAttachmentIcon["paperClip"] = 3] = "paperClip";
|
|
814
|
+
})(PdfAttachmentIcon || (PdfAttachmentIcon = {}));
|
|
815
|
+
/**
|
|
816
|
+
* Public Enum to define annotation intent of free text annotation.
|
|
817
|
+
* ```typescript
|
|
818
|
+
* // Load an existing PDF document
|
|
819
|
+
* let document: PdfDocument = new PdfDocument(data, password);
|
|
820
|
+
* // Access first page
|
|
821
|
+
* let page: PdfPage = document.getPage(0);
|
|
822
|
+
* // Access the annotation at index 0
|
|
823
|
+
* let annotation: PdfFreeTextAnnotation = page.annotations.at(0) PdfFreeTextAnnotation;
|
|
824
|
+
* // Sets the free text annotation intent to freeTextCallout
|
|
825
|
+
* annotation.annotationIntent = PdfAnnotationIntent.freeTextCallout;
|
|
826
|
+
* // Save the document
|
|
827
|
+
* document.save('output.pdf');
|
|
828
|
+
* // Destroy the document
|
|
829
|
+
* document.destroy();
|
|
830
|
+
* ```
|
|
831
|
+
*/
|
|
832
|
+
export var PdfAnnotationIntent;
|
|
833
|
+
(function (PdfAnnotationIntent) {
|
|
834
|
+
/**
|
|
835
|
+
* Specifies the default intent of `none`.
|
|
836
|
+
*/
|
|
837
|
+
PdfAnnotationIntent[PdfAnnotationIntent["none"] = 0] = "none";
|
|
838
|
+
/**
|
|
839
|
+
* Specifies the intent of `freeTextCallout`.
|
|
840
|
+
*/
|
|
841
|
+
PdfAnnotationIntent[PdfAnnotationIntent["freeTextCallout"] = 1] = "freeTextCallout";
|
|
842
|
+
/**
|
|
843
|
+
* Specifies the intent of `freeTextTypeWriter`.
|
|
844
|
+
*/
|
|
845
|
+
PdfAnnotationIntent[PdfAnnotationIntent["freeTextTypeWriter"] = 2] = "freeTextTypeWriter";
|
|
846
|
+
})(PdfAnnotationIntent || (PdfAnnotationIntent = {}));
|
|
847
|
+
/**
|
|
848
|
+
* Public Enum to define destination mode of document link annotation.
|
|
849
|
+
* ```typescript
|
|
850
|
+
* // Load an existing PDF document
|
|
851
|
+
* let document: PdfDocument = new PdfDocument(data, password);
|
|
852
|
+
* // Access first page
|
|
853
|
+
* let page: PdfPage = document.getPage(0);
|
|
854
|
+
* // Access the annotation at index 0
|
|
855
|
+
* let annotation: PdfDocumentLinkAnnotation = page.annotations.at(0) PdfDocumentLinkAnnotation;
|
|
856
|
+
* // Sets the destination mode as fitToPage
|
|
857
|
+
* annotation.destination.mode = PdfDestinationMode.fitToPage;
|
|
858
|
+
* // Save the document
|
|
859
|
+
* document.save('output.pdf');
|
|
860
|
+
* // Destroy the document
|
|
861
|
+
* document.destroy();
|
|
862
|
+
* ```
|
|
863
|
+
*/
|
|
864
|
+
export var PdfDestinationMode;
|
|
865
|
+
(function (PdfDestinationMode) {
|
|
866
|
+
/**
|
|
867
|
+
* Specifies the default intent of `location`.
|
|
868
|
+
*/
|
|
869
|
+
PdfDestinationMode[PdfDestinationMode["location"] = 0] = "location";
|
|
870
|
+
/**
|
|
871
|
+
* Specifies the intent of `FitToPage`.
|
|
872
|
+
*/
|
|
873
|
+
PdfDestinationMode[PdfDestinationMode["fitToPage"] = 1] = "fitToPage";
|
|
874
|
+
/**
|
|
875
|
+
* Specifies the intent of `fitR`.
|
|
876
|
+
*/
|
|
877
|
+
PdfDestinationMode[PdfDestinationMode["fitR"] = 2] = "fitR";
|
|
878
|
+
/**
|
|
879
|
+
* Specifies the intent of `fitH`.
|
|
880
|
+
*/
|
|
881
|
+
PdfDestinationMode[PdfDestinationMode["fitH"] = 3] = "fitH";
|
|
882
|
+
})(PdfDestinationMode || (PdfDestinationMode = {}));
|
|
883
|
+
/**
|
|
884
|
+
* Public Enum to define export or import data format.
|
|
885
|
+
* ```typescript
|
|
886
|
+
* // Load an existing PDF document
|
|
887
|
+
* let document: PdfDocument = new PdfDocument(data, password);
|
|
888
|
+
* // Sets export data format as JSON type to annotation export settings
|
|
889
|
+
* let settings: PdfAnnotationExportSettings = new PdfAnnotationExportSettings();
|
|
890
|
+
* settings.dataFormat = DataFormat.json;
|
|
891
|
+
* // Export annotations to JSON format
|
|
892
|
+
* let json: Uint8Array = document.exportAnnotations(settings);
|
|
893
|
+
* // Save the document
|
|
894
|
+
* document.save('output.pdf');
|
|
895
|
+
* // Destroy the document
|
|
896
|
+
* document.destroy();
|
|
897
|
+
* ```
|
|
898
|
+
*/
|
|
899
|
+
export var DataFormat;
|
|
900
|
+
(function (DataFormat) {
|
|
901
|
+
/**
|
|
902
|
+
* Specifies the intent of `FDF`.
|
|
903
|
+
*/
|
|
904
|
+
DataFormat[DataFormat["fdf"] = 0] = "fdf";
|
|
905
|
+
/**
|
|
906
|
+
* Specifies the intent of `XFDF`.
|
|
907
|
+
*/
|
|
908
|
+
DataFormat[DataFormat["xfdf"] = 1] = "xfdf";
|
|
909
|
+
/**
|
|
910
|
+
* Specifies the intent of `JSON`.
|
|
911
|
+
*/
|
|
912
|
+
DataFormat[DataFormat["json"] = 2] = "json";
|
|
913
|
+
/**
|
|
914
|
+
* Specifies the intent of `XML`.
|
|
915
|
+
*/
|
|
916
|
+
DataFormat[DataFormat["xml"] = 3] = "xml";
|
|
917
|
+
})(DataFormat || (DataFormat = {}));
|
|
918
|
+
/**
|
|
919
|
+
* Public enum to define form fields tab order.
|
|
920
|
+
* ```typescript
|
|
921
|
+
* // Load an existing PDF document
|
|
922
|
+
* let document: PdfDocument = new PdfDocument(data, password);
|
|
923
|
+
* // Set a PDF form's tab order.
|
|
924
|
+
* document.form.orderFormFields(PdfFormFieldsTabOrder.row);
|
|
925
|
+
* // Save the document
|
|
926
|
+
* document.save('output.pdf');
|
|
927
|
+
* // Destroy the document
|
|
928
|
+
* document.destroy();
|
|
929
|
+
* ```
|
|
930
|
+
*/
|
|
931
|
+
export var PdfFormFieldsTabOrder;
|
|
932
|
+
(function (PdfFormFieldsTabOrder) {
|
|
933
|
+
/**
|
|
934
|
+
* Specifies that no tab order is defined.
|
|
935
|
+
*/
|
|
936
|
+
PdfFormFieldsTabOrder[PdfFormFieldsTabOrder["none"] = 0] = "none";
|
|
937
|
+
/**
|
|
938
|
+
* Specifies the tab order is defined by the document's rows.
|
|
939
|
+
*/
|
|
940
|
+
PdfFormFieldsTabOrder[PdfFormFieldsTabOrder["row"] = 1] = "row";
|
|
941
|
+
/**
|
|
942
|
+
* Specifies the tab order is defined by the document's columns.
|
|
943
|
+
*/
|
|
944
|
+
PdfFormFieldsTabOrder[PdfFormFieldsTabOrder["column"] = 2] = "column";
|
|
945
|
+
/**
|
|
946
|
+
* Specifies the tab order is defined by the document's structure tree.
|
|
947
|
+
*/
|
|
948
|
+
PdfFormFieldsTabOrder[PdfFormFieldsTabOrder["structure"] = 3] = "structure";
|
|
949
|
+
/**
|
|
950
|
+
* Specifies the tab order is defined manually.
|
|
951
|
+
*/
|
|
952
|
+
PdfFormFieldsTabOrder[PdfFormFieldsTabOrder["manual"] = 4] = "manual";
|
|
953
|
+
/**
|
|
954
|
+
* Specifies the tab order is defined by the widget annotations in the document.
|
|
955
|
+
*/
|
|
956
|
+
PdfFormFieldsTabOrder[PdfFormFieldsTabOrder["widget"] = 5] = "widget";
|
|
957
|
+
})(PdfFormFieldsTabOrder || (PdfFormFieldsTabOrder = {}));
|
|
958
|
+
/**
|
|
959
|
+
* Enum for PDF loaded annotation type.
|
|
960
|
+
*/
|
|
961
|
+
export var _PdfAnnotationType;
|
|
962
|
+
(function (_PdfAnnotationType) {
|
|
963
|
+
/**
|
|
964
|
+
* Specifies the intent of `highlight`.
|
|
965
|
+
*/
|
|
966
|
+
_PdfAnnotationType[_PdfAnnotationType["highlight"] = 0] = "highlight";
|
|
967
|
+
/**
|
|
968
|
+
* Specifies the intent of `underline`.
|
|
969
|
+
*/
|
|
970
|
+
_PdfAnnotationType[_PdfAnnotationType["underline"] = 1] = "underline";
|
|
971
|
+
/**
|
|
972
|
+
* Specifies the intent of `strikeOut`.
|
|
973
|
+
*/
|
|
974
|
+
_PdfAnnotationType[_PdfAnnotationType["strikeOut"] = 2] = "strikeOut";
|
|
975
|
+
/**
|
|
976
|
+
* Specifies the intent of `squiggly`.
|
|
977
|
+
*/
|
|
978
|
+
_PdfAnnotationType[_PdfAnnotationType["squiggly"] = 3] = "squiggly";
|
|
979
|
+
/**
|
|
980
|
+
* Specifies the intent of `redactionAnnotation`.
|
|
981
|
+
*/
|
|
982
|
+
_PdfAnnotationType[_PdfAnnotationType["redactionAnnotation"] = 4] = "redactionAnnotation";
|
|
983
|
+
/**
|
|
984
|
+
* Specifies the intent of `textAnnotation`.
|
|
985
|
+
*/
|
|
986
|
+
_PdfAnnotationType[_PdfAnnotationType["textAnnotation"] = 5] = "textAnnotation";
|
|
987
|
+
/**
|
|
988
|
+
* Specifies the intent of `linkAnnotation`.
|
|
989
|
+
*/
|
|
990
|
+
_PdfAnnotationType[_PdfAnnotationType["linkAnnotation"] = 6] = "linkAnnotation";
|
|
991
|
+
/**
|
|
992
|
+
* Specifies the intent of `documentLinkAnnotation`.
|
|
993
|
+
*/
|
|
994
|
+
_PdfAnnotationType[_PdfAnnotationType["documentLinkAnnotation"] = 7] = "documentLinkAnnotation";
|
|
995
|
+
/**
|
|
996
|
+
* Specifies the intent of `uriAnnotation`.
|
|
997
|
+
*/
|
|
998
|
+
_PdfAnnotationType[_PdfAnnotationType["uriAnnotation"] = 8] = "uriAnnotation";
|
|
999
|
+
/**
|
|
1000
|
+
* Specifies the intent of `fileLinkAnnotation`.
|
|
1001
|
+
*/
|
|
1002
|
+
_PdfAnnotationType[_PdfAnnotationType["fileLinkAnnotation"] = 9] = "fileLinkAnnotation";
|
|
1003
|
+
/**
|
|
1004
|
+
* Specifies the intent of `freeTextAnnotation`.
|
|
1005
|
+
*/
|
|
1006
|
+
_PdfAnnotationType[_PdfAnnotationType["freeTextAnnotation"] = 10] = "freeTextAnnotation";
|
|
1007
|
+
/**
|
|
1008
|
+
* Specifies the intent of `lineAnnotation`.
|
|
1009
|
+
*/
|
|
1010
|
+
_PdfAnnotationType[_PdfAnnotationType["lineAnnotation"] = 11] = "lineAnnotation";
|
|
1011
|
+
/**
|
|
1012
|
+
* Specifies the intent of `circleAnnotation`.
|
|
1013
|
+
*/
|
|
1014
|
+
_PdfAnnotationType[_PdfAnnotationType["circleAnnotation"] = 12] = "circleAnnotation";
|
|
1015
|
+
/**
|
|
1016
|
+
* Specifies the intent of `ellipseAnnotation`.
|
|
1017
|
+
*/
|
|
1018
|
+
_PdfAnnotationType[_PdfAnnotationType["ellipseAnnotation"] = 13] = "ellipseAnnotation";
|
|
1019
|
+
/**
|
|
1020
|
+
* Specifies the intent of `squareAnnotation`.
|
|
1021
|
+
*/
|
|
1022
|
+
_PdfAnnotationType[_PdfAnnotationType["squareAnnotation"] = 14] = "squareAnnotation";
|
|
1023
|
+
/**
|
|
1024
|
+
* Specifies the intent of `rectangleAnnotation`.
|
|
1025
|
+
*/
|
|
1026
|
+
_PdfAnnotationType[_PdfAnnotationType["rectangleAnnotation"] = 15] = "rectangleAnnotation";
|
|
1027
|
+
/**
|
|
1028
|
+
* Specifies the intent of `polygonAnnotation`.
|
|
1029
|
+
*/
|
|
1030
|
+
_PdfAnnotationType[_PdfAnnotationType["polygonAnnotation"] = 16] = "polygonAnnotation";
|
|
1031
|
+
/**
|
|
1032
|
+
* Specifies the intent of `polyLineAnnotation`.
|
|
1033
|
+
*/
|
|
1034
|
+
_PdfAnnotationType[_PdfAnnotationType["polyLineAnnotation"] = 17] = "polyLineAnnotation";
|
|
1035
|
+
/**
|
|
1036
|
+
* Specifies the intent of `textMarkupAnnotation`.
|
|
1037
|
+
*/
|
|
1038
|
+
_PdfAnnotationType[_PdfAnnotationType["textMarkupAnnotation"] = 18] = "textMarkupAnnotation";
|
|
1039
|
+
/**
|
|
1040
|
+
* Specifies the intent of `caretAnnotation`.
|
|
1041
|
+
*/
|
|
1042
|
+
_PdfAnnotationType[_PdfAnnotationType["caretAnnotation"] = 19] = "caretAnnotation";
|
|
1043
|
+
/**
|
|
1044
|
+
* Specifies the intent of `rubberStampAnnotation`.
|
|
1045
|
+
*/
|
|
1046
|
+
_PdfAnnotationType[_PdfAnnotationType["rubberStampAnnotation"] = 20] = "rubberStampAnnotation";
|
|
1047
|
+
/**
|
|
1048
|
+
* Specifies the intent of `popupAnnotation`.
|
|
1049
|
+
*/
|
|
1050
|
+
_PdfAnnotationType[_PdfAnnotationType["popupAnnotation"] = 21] = "popupAnnotation";
|
|
1051
|
+
/**
|
|
1052
|
+
* Specifies the intent of `fileAttachmentAnnotation`.
|
|
1053
|
+
*/
|
|
1054
|
+
_PdfAnnotationType[_PdfAnnotationType["fileAttachmentAnnotation"] = 22] = "fileAttachmentAnnotation";
|
|
1055
|
+
/**
|
|
1056
|
+
* Specifies the intent of `soundAnnotation`.
|
|
1057
|
+
*/
|
|
1058
|
+
_PdfAnnotationType[_PdfAnnotationType["soundAnnotation"] = 23] = "soundAnnotation";
|
|
1059
|
+
/**
|
|
1060
|
+
* Specifies the intent of `movieAnnotation`.
|
|
1061
|
+
*/
|
|
1062
|
+
_PdfAnnotationType[_PdfAnnotationType["movieAnnotation"] = 24] = "movieAnnotation";
|
|
1063
|
+
/**
|
|
1064
|
+
* Specifies the intent of `screenAnnotation`.
|
|
1065
|
+
*/
|
|
1066
|
+
_PdfAnnotationType[_PdfAnnotationType["screenAnnotation"] = 25] = "screenAnnotation";
|
|
1067
|
+
/**
|
|
1068
|
+
* Specifies the intent of `widgetAnnotation`.
|
|
1069
|
+
*/
|
|
1070
|
+
_PdfAnnotationType[_PdfAnnotationType["widgetAnnotation"] = 26] = "widgetAnnotation";
|
|
1071
|
+
/**
|
|
1072
|
+
* Specifies the intent of `printerMarkAnnotation`.
|
|
1073
|
+
*/
|
|
1074
|
+
_PdfAnnotationType[_PdfAnnotationType["printerMarkAnnotation"] = 27] = "printerMarkAnnotation";
|
|
1075
|
+
/**
|
|
1076
|
+
* Specifies the intent of `trapNetworkAnnotation`.
|
|
1077
|
+
*/
|
|
1078
|
+
_PdfAnnotationType[_PdfAnnotationType["trapNetworkAnnotation"] = 28] = "trapNetworkAnnotation";
|
|
1079
|
+
/**
|
|
1080
|
+
* Specifies the intent of `watermarkAnnotation`.
|
|
1081
|
+
*/
|
|
1082
|
+
_PdfAnnotationType[_PdfAnnotationType["watermarkAnnotation"] = 29] = "watermarkAnnotation";
|
|
1083
|
+
/**
|
|
1084
|
+
* Specifies the intent of `textWebLinkAnnotation`.
|
|
1085
|
+
*/
|
|
1086
|
+
_PdfAnnotationType[_PdfAnnotationType["textWebLinkAnnotation"] = 30] = "textWebLinkAnnotation";
|
|
1087
|
+
/**
|
|
1088
|
+
* Specifies the intent of `inkAnnotation`.
|
|
1089
|
+
*/
|
|
1090
|
+
_PdfAnnotationType[_PdfAnnotationType["inkAnnotation"] = 31] = "inkAnnotation";
|
|
1091
|
+
/**
|
|
1092
|
+
* Specifies the intent of `richMediaAnnotation`.
|
|
1093
|
+
*/
|
|
1094
|
+
_PdfAnnotationType[_PdfAnnotationType["richMediaAnnotation"] = 32] = "richMediaAnnotation";
|
|
1095
|
+
/**
|
|
1096
|
+
* Specifies the intent of `angleMeasurementAnnotation`.
|
|
1097
|
+
*/
|
|
1098
|
+
_PdfAnnotationType[_PdfAnnotationType["angleMeasurementAnnotation"] = 33] = "angleMeasurementAnnotation";
|
|
1099
|
+
/**
|
|
1100
|
+
* Specifies the intent of `null`.
|
|
1101
|
+
*/
|
|
1102
|
+
_PdfAnnotationType[_PdfAnnotationType["null"] = 34] = "null";
|
|
1103
|
+
})(_PdfAnnotationType || (_PdfAnnotationType = {}));
|
|
1104
|
+
/**
|
|
1105
|
+
* Enum for PDF graphics unit.
|
|
1106
|
+
*/
|
|
1107
|
+
export var _PdfGraphicsUnit;
|
|
1108
|
+
(function (_PdfGraphicsUnit) {
|
|
1109
|
+
/**
|
|
1110
|
+
* Specifies the type of `centimeter`.
|
|
1111
|
+
*/
|
|
1112
|
+
_PdfGraphicsUnit[_PdfGraphicsUnit["centimeter"] = 0] = "centimeter";
|
|
1113
|
+
/**
|
|
1114
|
+
* Specifies the type of `pica`.
|
|
1115
|
+
*/
|
|
1116
|
+
_PdfGraphicsUnit[_PdfGraphicsUnit["pica"] = 1] = "pica";
|
|
1117
|
+
/**
|
|
1118
|
+
* Specifies the type of `pixel`.
|
|
1119
|
+
*/
|
|
1120
|
+
_PdfGraphicsUnit[_PdfGraphicsUnit["pixel"] = 2] = "pixel";
|
|
1121
|
+
/**
|
|
1122
|
+
* Specifies the type of `point`.
|
|
1123
|
+
*/
|
|
1124
|
+
_PdfGraphicsUnit[_PdfGraphicsUnit["point"] = 3] = "point";
|
|
1125
|
+
/**
|
|
1126
|
+
* Specifies the type of `inch`.
|
|
1127
|
+
*/
|
|
1128
|
+
_PdfGraphicsUnit[_PdfGraphicsUnit["inch"] = 4] = "inch";
|
|
1129
|
+
/**
|
|
1130
|
+
* Specifies the type of `document`.
|
|
1131
|
+
*/
|
|
1132
|
+
_PdfGraphicsUnit[_PdfGraphicsUnit["document"] = 5] = "document";
|
|
1133
|
+
/**
|
|
1134
|
+
* Specifies the type of `millimeter`.
|
|
1135
|
+
*/
|
|
1136
|
+
_PdfGraphicsUnit[_PdfGraphicsUnit["millimeter"] = 6] = "millimeter";
|
|
1137
|
+
})(_PdfGraphicsUnit || (_PdfGraphicsUnit = {}));
|
|
1138
|
+
export var _FieldFlag;
|
|
1139
|
+
(function (_FieldFlag) {
|
|
1140
|
+
_FieldFlag[_FieldFlag["default"] = 0] = "default";
|
|
1141
|
+
_FieldFlag[_FieldFlag["readOnly"] = 1] = "readOnly";
|
|
1142
|
+
_FieldFlag[_FieldFlag["required"] = 2] = "required";
|
|
1143
|
+
_FieldFlag[_FieldFlag["noExport"] = 4] = "noExport";
|
|
1144
|
+
_FieldFlag[_FieldFlag["multiLine"] = 4096] = "multiLine";
|
|
1145
|
+
_FieldFlag[_FieldFlag["password"] = 8192] = "password";
|
|
1146
|
+
_FieldFlag[_FieldFlag["fileSelect"] = 1048576] = "fileSelect";
|
|
1147
|
+
_FieldFlag[_FieldFlag["doNotSpellCheck"] = 4194304] = "doNotSpellCheck";
|
|
1148
|
+
_FieldFlag[_FieldFlag["doNotScroll"] = 8388608] = "doNotScroll";
|
|
1149
|
+
_FieldFlag[_FieldFlag["comb"] = 16777216] = "comb";
|
|
1150
|
+
_FieldFlag[_FieldFlag["richText"] = 33554432] = "richText";
|
|
1151
|
+
_FieldFlag[_FieldFlag["noToggleToOff"] = 16384] = "noToggleToOff";
|
|
1152
|
+
_FieldFlag[_FieldFlag["radio"] = 32768] = "radio";
|
|
1153
|
+
_FieldFlag[_FieldFlag["pushButton"] = 65536] = "pushButton";
|
|
1154
|
+
_FieldFlag[_FieldFlag["radiosInUnison"] = 33554432] = "radiosInUnison";
|
|
1155
|
+
_FieldFlag[_FieldFlag["combo"] = 131072] = "combo";
|
|
1156
|
+
_FieldFlag[_FieldFlag["edit"] = 262144] = "edit";
|
|
1157
|
+
_FieldFlag[_FieldFlag["sort"] = 524288] = "sort";
|
|
1158
|
+
_FieldFlag[_FieldFlag["multiSelect"] = 2097152] = "multiSelect";
|
|
1159
|
+
_FieldFlag[_FieldFlag["commitOnSelectChange"] = 67108864] = "commitOnSelectChange";
|
|
1160
|
+
})(_FieldFlag || (_FieldFlag = {}));
|
|
1161
|
+
export var _SignatureFlag;
|
|
1162
|
+
(function (_SignatureFlag) {
|
|
1163
|
+
_SignatureFlag[_SignatureFlag["none"] = 0] = "none";
|
|
1164
|
+
_SignatureFlag[_SignatureFlag["signatureExists"] = 1] = "signatureExists";
|
|
1165
|
+
_SignatureFlag[_SignatureFlag["appendOnly"] = 2] = "appendOnly";
|
|
1166
|
+
})(_SignatureFlag || (_SignatureFlag = {}));
|
|
1167
|
+
export var _PdfCheckFieldState;
|
|
1168
|
+
(function (_PdfCheckFieldState) {
|
|
1169
|
+
_PdfCheckFieldState[_PdfCheckFieldState["unchecked"] = 0] = "unchecked";
|
|
1170
|
+
_PdfCheckFieldState[_PdfCheckFieldState["checked"] = 1] = "checked";
|
|
1171
|
+
_PdfCheckFieldState[_PdfCheckFieldState["pressedUnchecked"] = 2] = "pressedUnchecked";
|
|
1172
|
+
_PdfCheckFieldState[_PdfCheckFieldState["pressedChecked"] = 3] = "pressedChecked";
|
|
1173
|
+
})(_PdfCheckFieldState || (_PdfCheckFieldState = {}));
|
|
1174
|
+
/**
|
|
1175
|
+
* Public enum to define the PDF document permission flags.
|
|
1176
|
+
* ```typescript
|
|
1177
|
+
* // Load an existing PDF document
|
|
1178
|
+
* let document: PdfDocument = new PdfDocument(data, password);
|
|
1179
|
+
* // Get the permission flag
|
|
1180
|
+
* let permission: PdfPermissionFlag = document.permissions;
|
|
1181
|
+
* // Destroy the document
|
|
1182
|
+
* document.destroy();
|
|
1183
|
+
* ```
|
|
1184
|
+
*/
|
|
1185
|
+
export var PdfPermissionFlag;
|
|
1186
|
+
(function (PdfPermissionFlag) {
|
|
1187
|
+
/**
|
|
1188
|
+
* Specifies the default permission flag.
|
|
1189
|
+
*/
|
|
1190
|
+
PdfPermissionFlag[PdfPermissionFlag["default"] = 0] = "default";
|
|
1191
|
+
/**
|
|
1192
|
+
* Specifies the print permission flag.
|
|
1193
|
+
*/
|
|
1194
|
+
PdfPermissionFlag[PdfPermissionFlag["print"] = 4] = "print";
|
|
1195
|
+
/**
|
|
1196
|
+
* Specifies the edit content permission flag.
|
|
1197
|
+
*/
|
|
1198
|
+
PdfPermissionFlag[PdfPermissionFlag["editContent"] = 8] = "editContent";
|
|
1199
|
+
/**
|
|
1200
|
+
* Specifies the copy content permission flag.
|
|
1201
|
+
*/
|
|
1202
|
+
PdfPermissionFlag[PdfPermissionFlag["copyContent"] = 16] = "copyContent";
|
|
1203
|
+
/**
|
|
1204
|
+
* Specifies the edit annotations permission flag.
|
|
1205
|
+
*/
|
|
1206
|
+
PdfPermissionFlag[PdfPermissionFlag["editAnnotations"] = 32] = "editAnnotations";
|
|
1207
|
+
/**
|
|
1208
|
+
* Specifies the fill fields permission flag.
|
|
1209
|
+
*/
|
|
1210
|
+
PdfPermissionFlag[PdfPermissionFlag["fillFields"] = 256] = "fillFields";
|
|
1211
|
+
/**
|
|
1212
|
+
* Specifies the accessibility copy content permission flag.
|
|
1213
|
+
*/
|
|
1214
|
+
PdfPermissionFlag[PdfPermissionFlag["accessibilityCopyContent"] = 512] = "accessibilityCopyContent";
|
|
1215
|
+
/**
|
|
1216
|
+
* Specifies the assemble document permission flag.
|
|
1217
|
+
*/
|
|
1218
|
+
PdfPermissionFlag[PdfPermissionFlag["assembleDocument"] = 1024] = "assembleDocument";
|
|
1219
|
+
/**
|
|
1220
|
+
* Specifies the full quality print permission flag.
|
|
1221
|
+
*/
|
|
1222
|
+
PdfPermissionFlag[PdfPermissionFlag["fullQualityPrint"] = 2048] = "fullQualityPrint";
|
|
1223
|
+
})(PdfPermissionFlag || (PdfPermissionFlag = {}));
|
|
1224
|
+
/**
|
|
1225
|
+
* Public enum to define the PDF page orientation.
|
|
1226
|
+
* ```typescript
|
|
1227
|
+
* // Load an existing PDF document
|
|
1228
|
+
* let document: PdfDocument = new PdfDocument(data, password);
|
|
1229
|
+
* // Access first page
|
|
1230
|
+
* let page: PdfPage = document.getPage(0);
|
|
1231
|
+
* // Get the page orientation
|
|
1232
|
+
* let orientation: PdfPageOrientation = page.orientation;
|
|
1233
|
+
* // Destroy the document
|
|
1234
|
+
* document.destroy();
|
|
1235
|
+
* ```
|
|
1236
|
+
*/
|
|
1237
|
+
export var PdfPageOrientation;
|
|
1238
|
+
(function (PdfPageOrientation) {
|
|
1239
|
+
/**
|
|
1240
|
+
* Specifies the type of `portrait`.
|
|
1241
|
+
*/
|
|
1242
|
+
PdfPageOrientation[PdfPageOrientation["portrait"] = 0] = "portrait";
|
|
1243
|
+
/**
|
|
1244
|
+
* Specifies the type of `landscape`.
|
|
1245
|
+
*/
|
|
1246
|
+
PdfPageOrientation[PdfPageOrientation["landscape"] = 1] = "landscape";
|
|
1247
|
+
})(PdfPageOrientation || (PdfPageOrientation = {}));
|
|
1248
|
+
/**
|
|
1249
|
+
* Public enum to define the text direction.
|
|
1250
|
+
* ```typescript
|
|
1251
|
+
* // Load an existing PDF document
|
|
1252
|
+
* let document: PdfDocument = new PdfDocument(data, password);
|
|
1253
|
+
* // Load the font file
|
|
1254
|
+
* let font: PdfTrueTypeFont = new PdfTrueTypeFont(read('./resources/Fonts/', 'Arial.ttf'), 10);
|
|
1255
|
+
* // Add a string format
|
|
1256
|
+
* let format: PdfStringFormat = new PdfStringFormat();
|
|
1257
|
+
* format.alignment = PdfTextAlignment.right;
|
|
1258
|
+
* format.textDirection = PdfTextDirection.rightToLeft;
|
|
1259
|
+
* // Draw a text with right to left direction
|
|
1260
|
+
* page.graphics.drawString('Hello World مرحبا بالعالم', font, [10, 20, 300, 200], undefined, new PdfBrush([0, 0, 255]), format);
|
|
1261
|
+
* // Save the document
|
|
1262
|
+
* document.save('output.pdf');
|
|
1263
|
+
* // Destroy the document
|
|
1264
|
+
* document.destroy();
|
|
1265
|
+
* ```
|
|
1266
|
+
*/
|
|
1267
|
+
export var PdfTextDirection;
|
|
1268
|
+
(function (PdfTextDirection) {
|
|
1269
|
+
/**
|
|
1270
|
+
* Specifies the type of `none`.
|
|
1271
|
+
*/
|
|
1272
|
+
PdfTextDirection[PdfTextDirection["none"] = 0] = "none";
|
|
1273
|
+
/**
|
|
1274
|
+
* Specifies the type of `leftToRight`.
|
|
1275
|
+
*/
|
|
1276
|
+
PdfTextDirection[PdfTextDirection["leftToRight"] = 1] = "leftToRight";
|
|
1277
|
+
/**
|
|
1278
|
+
* Specifies the type of `rightToLeft`.
|
|
1279
|
+
*/
|
|
1280
|
+
PdfTextDirection[PdfTextDirection["rightToLeft"] = 2] = "rightToLeft";
|
|
1281
|
+
})(PdfTextDirection || (PdfTextDirection = {}));
|
|
1282
|
+
/**
|
|
1283
|
+
* Public enum to define the subscript or superscript mode.
|
|
1284
|
+
* ```typescript
|
|
1285
|
+
* // Load an existing PDF document
|
|
1286
|
+
* let document: PdfDocument = new PdfDocument(data, password);
|
|
1287
|
+
* // Gets the first page
|
|
1288
|
+
* let page: PdfPage = document.getPage(0) as PdfPage;
|
|
1289
|
+
* // Create a new PDF standard font
|
|
1290
|
+
* let font: PdfStandardFont = new PdfStandardFont(PdfFontFamily.Helvetica, 10);
|
|
1291
|
+
* // Create a new PDF string format
|
|
1292
|
+
* let format: PdfStringFormat = new PdfStringFormat(PdfTextAlignment.right);
|
|
1293
|
+
* // Set a new paragraph indent
|
|
1294
|
+
* format.paragraphIndent = 20;
|
|
1295
|
+
* // Set the subscript or superscript mode
|
|
1296
|
+
* format.subSuperScript = PdfSubSuperScript.subScript;
|
|
1297
|
+
* // Draw the text
|
|
1298
|
+
* page.graphics.drawString('Helvetica', font, [0, 180, page.size[0], 40], undefined, new PdfBrush([0, 0, 255]), format);
|
|
1299
|
+
* // Save the document
|
|
1300
|
+
* document.save('output.pdf');
|
|
1301
|
+
* // Destroy the document
|
|
1302
|
+
* document.destroy();
|
|
1303
|
+
* ```
|
|
1304
|
+
*/
|
|
1305
|
+
export var PdfSubSuperScript;
|
|
1306
|
+
(function (PdfSubSuperScript) {
|
|
1307
|
+
/**
|
|
1308
|
+
* Specifies the type of `none`.
|
|
1309
|
+
*/
|
|
1310
|
+
PdfSubSuperScript[PdfSubSuperScript["none"] = 0] = "none";
|
|
1311
|
+
/**
|
|
1312
|
+
* Specifies the type of `superScript`.
|
|
1313
|
+
*/
|
|
1314
|
+
PdfSubSuperScript[PdfSubSuperScript["superScript"] = 1] = "superScript";
|
|
1315
|
+
/**
|
|
1316
|
+
* Specifies the type of `subScript`.
|
|
1317
|
+
*/
|
|
1318
|
+
PdfSubSuperScript[PdfSubSuperScript["subScript"] = 2] = "subScript";
|
|
1319
|
+
})(PdfSubSuperScript || (PdfSubSuperScript = {}));
|
|
1320
|
+
/**
|
|
1321
|
+
* Public enum to define blend mode of the PDF page.
|
|
1322
|
+
* ```typescript
|
|
1323
|
+
* // Load an existing PDF document
|
|
1324
|
+
* let document: PdfDocument = new PdfDocument(data, password);
|
|
1325
|
+
* // Access first page
|
|
1326
|
+
* let page: PdfPage = document.getPage(0);
|
|
1327
|
+
* // Gets the graphics of the PDF page
|
|
1328
|
+
* let graphics: PdfGraphics = page.graphics;
|
|
1329
|
+
* // Create a new font
|
|
1330
|
+
* let font: PdfStandardFont = new PdfStandardFont(PdfFontFamily.symbol, 10);
|
|
1331
|
+
* // Set the blend mode
|
|
1332
|
+
* graphics.setTransparency(0.5, 0.5, PdfBlendMode.hardLight);
|
|
1333
|
+
* // Draw the text
|
|
1334
|
+
* graphics.drawString('Hello World', font, null, new PointF(10, 10));
|
|
1335
|
+
* // Save the document
|
|
1336
|
+
* document.save('output.pdf');
|
|
1337
|
+
* // Destroy the document
|
|
1338
|
+
* document.destroy();
|
|
1339
|
+
* ```
|
|
1340
|
+
*/
|
|
1341
|
+
export var PdfBlendMode;
|
|
1342
|
+
(function (PdfBlendMode) {
|
|
1343
|
+
/**
|
|
1344
|
+
* Specifies the type of `normal`.
|
|
1345
|
+
*/
|
|
1346
|
+
PdfBlendMode[PdfBlendMode["normal"] = 0] = "normal";
|
|
1347
|
+
/**
|
|
1348
|
+
* Specifies the type of `multiply`.
|
|
1349
|
+
*/
|
|
1350
|
+
PdfBlendMode[PdfBlendMode["multiply"] = 1] = "multiply";
|
|
1351
|
+
/**
|
|
1352
|
+
* Specifies the type of `screen`.
|
|
1353
|
+
*/
|
|
1354
|
+
PdfBlendMode[PdfBlendMode["screen"] = 2] = "screen";
|
|
1355
|
+
/**
|
|
1356
|
+
* Specifies the type of `overlay`.
|
|
1357
|
+
*/
|
|
1358
|
+
PdfBlendMode[PdfBlendMode["overlay"] = 3] = "overlay";
|
|
1359
|
+
/**
|
|
1360
|
+
* Specifies the type of `darken`.
|
|
1361
|
+
*/
|
|
1362
|
+
PdfBlendMode[PdfBlendMode["darken"] = 4] = "darken";
|
|
1363
|
+
/**
|
|
1364
|
+
* Specifies the type of `lighten`.
|
|
1365
|
+
*/
|
|
1366
|
+
PdfBlendMode[PdfBlendMode["lighten"] = 5] = "lighten";
|
|
1367
|
+
/**
|
|
1368
|
+
* Specifies the type of `colorDodge`.
|
|
1369
|
+
*/
|
|
1370
|
+
PdfBlendMode[PdfBlendMode["colorDodge"] = 6] = "colorDodge";
|
|
1371
|
+
/**
|
|
1372
|
+
* Specifies the type of `colorBurn`.
|
|
1373
|
+
*/
|
|
1374
|
+
PdfBlendMode[PdfBlendMode["colorBurn"] = 7] = "colorBurn";
|
|
1375
|
+
/**
|
|
1376
|
+
* Specifies the type of `hardLight`.
|
|
1377
|
+
*/
|
|
1378
|
+
PdfBlendMode[PdfBlendMode["hardLight"] = 8] = "hardLight";
|
|
1379
|
+
/**
|
|
1380
|
+
* Specifies the type of `softLight`.
|
|
1381
|
+
*/
|
|
1382
|
+
PdfBlendMode[PdfBlendMode["softLight"] = 9] = "softLight";
|
|
1383
|
+
/**
|
|
1384
|
+
* Specifies the type of `difference`.
|
|
1385
|
+
*/
|
|
1386
|
+
PdfBlendMode[PdfBlendMode["difference"] = 10] = "difference";
|
|
1387
|
+
/**
|
|
1388
|
+
* Specifies the type of `exclusion`.
|
|
1389
|
+
*/
|
|
1390
|
+
PdfBlendMode[PdfBlendMode["exclusion"] = 11] = "exclusion";
|
|
1391
|
+
/**
|
|
1392
|
+
* Specifies the type of `hue`.
|
|
1393
|
+
*/
|
|
1394
|
+
PdfBlendMode[PdfBlendMode["hue"] = 12] = "hue";
|
|
1395
|
+
/**
|
|
1396
|
+
* Specifies the type of `saturation`.
|
|
1397
|
+
*/
|
|
1398
|
+
PdfBlendMode[PdfBlendMode["saturation"] = 13] = "saturation";
|
|
1399
|
+
/**
|
|
1400
|
+
* Specifies the type of `color`.
|
|
1401
|
+
*/
|
|
1402
|
+
PdfBlendMode[PdfBlendMode["color"] = 14] = "color";
|
|
1403
|
+
/**
|
|
1404
|
+
* Specifies the type of `luminosity`.
|
|
1405
|
+
*/
|
|
1406
|
+
PdfBlendMode[PdfBlendMode["luminosity"] = 15] = "luminosity";
|
|
1407
|
+
})(PdfBlendMode || (PdfBlendMode = {}));
|
|
1408
|
+
/**
|
|
1409
|
+
* Public enum to define fill mode of the PDF page.
|
|
1410
|
+
* ```typescript
|
|
1411
|
+
* // Load an existing PDF document
|
|
1412
|
+
* let document: PdfDocument = new PdfDocument(data, password);
|
|
1413
|
+
* // Access first page
|
|
1414
|
+
* let page: PdfPage = document.getPage(0);
|
|
1415
|
+
* // Gets the graphics of the PDF page
|
|
1416
|
+
* let graphics: PdfGraphics = page.graphics;
|
|
1417
|
+
* // Create a new font
|
|
1418
|
+
* let font: PdfStandardFont = new PdfStandardFont(PdfFontFamily.symbol, 10);
|
|
1419
|
+
* // Set the fill mode
|
|
1420
|
+
* graphics.setClip([0, 0, 100, 100], PdfFillMode.winding);
|
|
1421
|
+
* // Draw the text
|
|
1422
|
+
* graphics.drawString('Hello World', font, null, new PointF(10, 10));
|
|
1423
|
+
* // Save the document
|
|
1424
|
+
* document.save('output.pdf');
|
|
1425
|
+
* // Destroy the document
|
|
1426
|
+
* document.destroy();
|
|
1427
|
+
* ```
|
|
1428
|
+
*/
|
|
1429
|
+
export var PdfFillMode;
|
|
1430
|
+
(function (PdfFillMode) {
|
|
1431
|
+
/**
|
|
1432
|
+
* Specifies the type of `winding`.
|
|
1433
|
+
*/
|
|
1434
|
+
PdfFillMode[PdfFillMode["winding"] = 0] = "winding";
|
|
1435
|
+
/**
|
|
1436
|
+
* Specifies the type of `alternate`.
|
|
1437
|
+
*/
|
|
1438
|
+
PdfFillMode[PdfFillMode["alternate"] = 1] = "alternate";
|
|
1439
|
+
})(PdfFillMode || (PdfFillMode = {}));
|
|
1440
|
+
/**
|
|
1441
|
+
* Public enum to define the dash style.
|
|
1442
|
+
* ```typescript
|
|
1443
|
+
* // Load an existing PDF document
|
|
1444
|
+
* let document: PdfDocument = new PdfDocument(data, password);
|
|
1445
|
+
* // Access first page
|
|
1446
|
+
* let page: PdfPage = document.getPage(0);
|
|
1447
|
+
* // Gets the graphics of the PDF page
|
|
1448
|
+
* let graphics: PdfGraphics = page.graphics;
|
|
1449
|
+
* // Create a new pen
|
|
1450
|
+
* let pen: PdfPen = new PdfPen([0, 0, 0], 1);
|
|
1451
|
+
* // Set the dash style
|
|
1452
|
+
* pen._dashStyle = PdfDashStyle.dashDot;
|
|
1453
|
+
* // Draw a rectangle using pen
|
|
1454
|
+
* graphics.drawRectangle(150, 50, 50, 50, pen);
|
|
1455
|
+
* // Save the document
|
|
1456
|
+
* document.save('output.pdf');
|
|
1457
|
+
* // Destroy the document
|
|
1458
|
+
* document.destroy();
|
|
1459
|
+
* ```
|
|
1460
|
+
*/
|
|
1461
|
+
export var PdfDashStyle;
|
|
1462
|
+
(function (PdfDashStyle) {
|
|
1463
|
+
/**
|
|
1464
|
+
* Specifies the type of `solid`.
|
|
1465
|
+
*/
|
|
1466
|
+
PdfDashStyle[PdfDashStyle["solid"] = 0] = "solid";
|
|
1467
|
+
/**
|
|
1468
|
+
* Specifies the type of `dash`.
|
|
1469
|
+
*/
|
|
1470
|
+
PdfDashStyle[PdfDashStyle["dash"] = 1] = "dash";
|
|
1471
|
+
/**
|
|
1472
|
+
* Specifies the type of `dot`.
|
|
1473
|
+
*/
|
|
1474
|
+
PdfDashStyle[PdfDashStyle["dot"] = 2] = "dot";
|
|
1475
|
+
/**
|
|
1476
|
+
* Specifies the type of `dashDot`.
|
|
1477
|
+
*/
|
|
1478
|
+
PdfDashStyle[PdfDashStyle["dashDot"] = 3] = "dashDot";
|
|
1479
|
+
/**
|
|
1480
|
+
* Specifies the type of `dashDotDot`.
|
|
1481
|
+
*/
|
|
1482
|
+
PdfDashStyle[PdfDashStyle["dashDotDot"] = 4] = "dashDotDot";
|
|
1483
|
+
/**
|
|
1484
|
+
* Specifies the type of `custom`.
|
|
1485
|
+
*/
|
|
1486
|
+
PdfDashStyle[PdfDashStyle["custom"] = 5] = "custom";
|
|
1487
|
+
})(PdfDashStyle || (PdfDashStyle = {}));
|
|
1488
|
+
/**
|
|
1489
|
+
* Public enum to define the line cap.
|
|
1490
|
+
* ```typescript
|
|
1491
|
+
* // Load an existing PDF document
|
|
1492
|
+
* let document: PdfDocument = new PdfDocument(data, password);
|
|
1493
|
+
* // Access first page
|
|
1494
|
+
* let page: PdfPage = document.getPage(0);
|
|
1495
|
+
* // Gets the graphics of the PDF page
|
|
1496
|
+
* let graphics: PdfGraphics = page.graphics;
|
|
1497
|
+
* // Create a new pen
|
|
1498
|
+
* let pen: PdfPen = new PdfPen([0, 0, 0], 1);
|
|
1499
|
+
* // Set the dash style
|
|
1500
|
+
* pen._dashStyle = PdfDashStyle.dashDot;
|
|
1501
|
+
* // Set the line cap
|
|
1502
|
+
* pen._lineCap = PdfLineCap.round;
|
|
1503
|
+
* // Draw a rectangle using pen
|
|
1504
|
+
* graphics.drawRectangle(150, 50, 50, 50, pen);
|
|
1505
|
+
* // Save the document
|
|
1506
|
+
* document.save('output.pdf');
|
|
1507
|
+
* // Destroy the document
|
|
1508
|
+
* document.destroy();
|
|
1509
|
+
* ```
|
|
1510
|
+
*/
|
|
1511
|
+
export var PdfLineCap;
|
|
1512
|
+
(function (PdfLineCap) {
|
|
1513
|
+
/**
|
|
1514
|
+
* Specifies the type of `flat`.
|
|
1515
|
+
*/
|
|
1516
|
+
PdfLineCap[PdfLineCap["flat"] = 0] = "flat";
|
|
1517
|
+
/**
|
|
1518
|
+
* Specifies the type of `round`.
|
|
1519
|
+
*/
|
|
1520
|
+
PdfLineCap[PdfLineCap["round"] = 1] = "round";
|
|
1521
|
+
/**
|
|
1522
|
+
* Specifies the type of `square`.
|
|
1523
|
+
*/
|
|
1524
|
+
PdfLineCap[PdfLineCap["square"] = 2] = "square";
|
|
1525
|
+
})(PdfLineCap || (PdfLineCap = {}));
|
|
1526
|
+
/**
|
|
1527
|
+
* Public enum to define the line join.
|
|
1528
|
+
* ```typescript
|
|
1529
|
+
* // Load an existing PDF document
|
|
1530
|
+
* let document: PdfDocument = new PdfDocument(data, password);
|
|
1531
|
+
* // Access first page
|
|
1532
|
+
* let page: PdfPage = document.getPage(0);
|
|
1533
|
+
* // Gets the graphics of the PDF page
|
|
1534
|
+
* let graphics: PdfGraphics = page.graphics;
|
|
1535
|
+
* // Create a new pen
|
|
1536
|
+
* let pen: PdfPen = new PdfPen([0, 0, 0], 1);
|
|
1537
|
+
* // Set the dash style
|
|
1538
|
+
* pen._dashStyle = PdfDashStyle.dashDot;
|
|
1539
|
+
* // Set the line join
|
|
1540
|
+
* pen._lineJoin = PdfLineJoin.bevel;
|
|
1541
|
+
* // Draw a rectangle using pen
|
|
1542
|
+
* graphics.drawRectangle(150, 50, 50, 50, pen);
|
|
1543
|
+
* // Save the document
|
|
1544
|
+
* document.save('output.pdf');
|
|
1545
|
+
* // Destroy the document
|
|
1546
|
+
* document.destroy();
|
|
1547
|
+
* ```
|
|
1548
|
+
*/
|
|
1549
|
+
export var PdfLineJoin;
|
|
1550
|
+
(function (PdfLineJoin) {
|
|
1551
|
+
/**
|
|
1552
|
+
* Specifies the type of `miter`.
|
|
1553
|
+
*/
|
|
1554
|
+
PdfLineJoin[PdfLineJoin["miter"] = 0] = "miter";
|
|
1555
|
+
/**
|
|
1556
|
+
* Specifies the type of `round`.
|
|
1557
|
+
*/
|
|
1558
|
+
PdfLineJoin[PdfLineJoin["round"] = 1] = "round";
|
|
1559
|
+
/**
|
|
1560
|
+
* Specifies the type of `bevel`.
|
|
1561
|
+
*/
|
|
1562
|
+
PdfLineJoin[PdfLineJoin["bevel"] = 2] = "bevel";
|
|
1563
|
+
})(PdfLineJoin || (PdfLineJoin = {}));
|
|
1564
|
+
export var _PdfWordWrapType;
|
|
1565
|
+
(function (_PdfWordWrapType) {
|
|
1566
|
+
/**
|
|
1567
|
+
* Specifies the type of `none`.
|
|
1568
|
+
*/
|
|
1569
|
+
_PdfWordWrapType[_PdfWordWrapType["none"] = 0] = "none";
|
|
1570
|
+
/**
|
|
1571
|
+
* Specifies the type of `word`.
|
|
1572
|
+
*/
|
|
1573
|
+
_PdfWordWrapType[_PdfWordWrapType["word"] = 1] = "word";
|
|
1574
|
+
/**
|
|
1575
|
+
* Specifies the type of `wordOnly`.
|
|
1576
|
+
*/
|
|
1577
|
+
_PdfWordWrapType[_PdfWordWrapType["wordOnly"] = 2] = "wordOnly";
|
|
1578
|
+
/**
|
|
1579
|
+
* Specifies the type of `character`.
|
|
1580
|
+
*/
|
|
1581
|
+
_PdfWordWrapType[_PdfWordWrapType["character"] = 3] = "character";
|
|
1582
|
+
})(_PdfWordWrapType || (_PdfWordWrapType = {}));
|
|
1583
|
+
export var _FontDescriptorFlag;
|
|
1584
|
+
(function (_FontDescriptorFlag) {
|
|
1585
|
+
_FontDescriptorFlag[_FontDescriptorFlag["fixedPitch"] = 1] = "fixedPitch";
|
|
1586
|
+
_FontDescriptorFlag[_FontDescriptorFlag["serif"] = 2] = "serif";
|
|
1587
|
+
_FontDescriptorFlag[_FontDescriptorFlag["symbolic"] = 4] = "symbolic";
|
|
1588
|
+
_FontDescriptorFlag[_FontDescriptorFlag["script"] = 8] = "script";
|
|
1589
|
+
_FontDescriptorFlag[_FontDescriptorFlag["nonSymbolic"] = 32] = "nonSymbolic";
|
|
1590
|
+
_FontDescriptorFlag[_FontDescriptorFlag["italic"] = 64] = "italic";
|
|
1591
|
+
_FontDescriptorFlag[_FontDescriptorFlag["forceBold"] = 262144] = "forceBold";
|
|
1592
|
+
})(_FontDescriptorFlag || (_FontDescriptorFlag = {}));
|
|
1593
|
+
export var _TrueTypeCmapFormat;
|
|
1594
|
+
(function (_TrueTypeCmapFormat) {
|
|
1595
|
+
_TrueTypeCmapFormat[_TrueTypeCmapFormat["apple"] = 0] = "apple";
|
|
1596
|
+
_TrueTypeCmapFormat[_TrueTypeCmapFormat["microsoft"] = 4] = "microsoft";
|
|
1597
|
+
_TrueTypeCmapFormat[_TrueTypeCmapFormat["trimmed"] = 6] = "trimmed";
|
|
1598
|
+
})(_TrueTypeCmapFormat || (_TrueTypeCmapFormat = {}));
|
|
1599
|
+
export var _TrueTypeCmapEncoding;
|
|
1600
|
+
(function (_TrueTypeCmapEncoding) {
|
|
1601
|
+
_TrueTypeCmapEncoding[_TrueTypeCmapEncoding["unknown"] = 0] = "unknown";
|
|
1602
|
+
_TrueTypeCmapEncoding[_TrueTypeCmapEncoding["symbol"] = 1] = "symbol";
|
|
1603
|
+
_TrueTypeCmapEncoding[_TrueTypeCmapEncoding["unicode"] = 2] = "unicode";
|
|
1604
|
+
_TrueTypeCmapEncoding[_TrueTypeCmapEncoding["macintosh"] = 3] = "macintosh";
|
|
1605
|
+
})(_TrueTypeCmapEncoding || (_TrueTypeCmapEncoding = {}));
|
|
1606
|
+
export var _TrueTypePlatformID;
|
|
1607
|
+
(function (_TrueTypePlatformID) {
|
|
1608
|
+
_TrueTypePlatformID[_TrueTypePlatformID["appleUnicode"] = 0] = "appleUnicode";
|
|
1609
|
+
_TrueTypePlatformID[_TrueTypePlatformID["macintosh"] = 1] = "macintosh";
|
|
1610
|
+
_TrueTypePlatformID[_TrueTypePlatformID["iSO"] = 2] = "iSO";
|
|
1611
|
+
_TrueTypePlatformID[_TrueTypePlatformID["microsoft"] = 3] = "microsoft";
|
|
1612
|
+
})(_TrueTypePlatformID || (_TrueTypePlatformID = {}));
|
|
1613
|
+
export var _TrueTypeMicrosoftEncodingID;
|
|
1614
|
+
(function (_TrueTypeMicrosoftEncodingID) {
|
|
1615
|
+
_TrueTypeMicrosoftEncodingID[_TrueTypeMicrosoftEncodingID["undefined"] = 0] = "undefined";
|
|
1616
|
+
_TrueTypeMicrosoftEncodingID[_TrueTypeMicrosoftEncodingID["unicode"] = 1] = "unicode";
|
|
1617
|
+
})(_TrueTypeMicrosoftEncodingID || (_TrueTypeMicrosoftEncodingID = {}));
|
|
1618
|
+
export var _TrueTypeMacintoshEncodingID;
|
|
1619
|
+
(function (_TrueTypeMacintoshEncodingID) {
|
|
1620
|
+
_TrueTypeMacintoshEncodingID[_TrueTypeMacintoshEncodingID["roman"] = 0] = "roman";
|
|
1621
|
+
_TrueTypeMacintoshEncodingID[_TrueTypeMacintoshEncodingID["japanese"] = 1] = "japanese";
|
|
1622
|
+
_TrueTypeMacintoshEncodingID[_TrueTypeMacintoshEncodingID["chinese"] = 2] = "chinese";
|
|
1623
|
+
})(_TrueTypeMacintoshEncodingID || (_TrueTypeMacintoshEncodingID = {}));
|
|
1624
|
+
export var _TrueTypeCompositeGlyphFlag;
|
|
1625
|
+
(function (_TrueTypeCompositeGlyphFlag) {
|
|
1626
|
+
_TrueTypeCompositeGlyphFlag[_TrueTypeCompositeGlyphFlag["Arg1And2AreWords"] = 1] = "Arg1And2AreWords";
|
|
1627
|
+
_TrueTypeCompositeGlyphFlag[_TrueTypeCompositeGlyphFlag["ArgsAreXyValues"] = 2] = "ArgsAreXyValues";
|
|
1628
|
+
_TrueTypeCompositeGlyphFlag[_TrueTypeCompositeGlyphFlag["RoundXyToGrid"] = 4] = "RoundXyToGrid";
|
|
1629
|
+
_TrueTypeCompositeGlyphFlag[_TrueTypeCompositeGlyphFlag["WeHaveScale"] = 8] = "WeHaveScale";
|
|
1630
|
+
_TrueTypeCompositeGlyphFlag[_TrueTypeCompositeGlyphFlag["Reserved"] = 16] = "Reserved";
|
|
1631
|
+
_TrueTypeCompositeGlyphFlag[_TrueTypeCompositeGlyphFlag["MoreComponents"] = 32] = "MoreComponents";
|
|
1632
|
+
_TrueTypeCompositeGlyphFlag[_TrueTypeCompositeGlyphFlag["WeHaveAnXyScale"] = 64] = "WeHaveAnXyScale";
|
|
1633
|
+
_TrueTypeCompositeGlyphFlag[_TrueTypeCompositeGlyphFlag["WeHaveTwoByTwo"] = 128] = "WeHaveTwoByTwo";
|
|
1634
|
+
_TrueTypeCompositeGlyphFlag[_TrueTypeCompositeGlyphFlag["WeHaveInstructions"] = 256] = "WeHaveInstructions";
|
|
1635
|
+
_TrueTypeCompositeGlyphFlag[_TrueTypeCompositeGlyphFlag["UseMyMetrics"] = 512] = "UseMyMetrics";
|
|
1636
|
+
})(_TrueTypeCompositeGlyphFlag || (_TrueTypeCompositeGlyphFlag = {}));
|
|
1637
|
+
export var _ImageFormat;
|
|
1638
|
+
(function (_ImageFormat) {
|
|
1639
|
+
/**
|
|
1640
|
+
* Specifies the type of `unknown`.
|
|
1641
|
+
*/
|
|
1642
|
+
_ImageFormat[_ImageFormat["unknown"] = 0] = "unknown";
|
|
1643
|
+
/**
|
|
1644
|
+
* Specifies the type of `bmp`.
|
|
1645
|
+
*/
|
|
1646
|
+
_ImageFormat[_ImageFormat["bmp"] = 1] = "bmp";
|
|
1647
|
+
/**
|
|
1648
|
+
* Specifies the type of `emf`.
|
|
1649
|
+
*/
|
|
1650
|
+
_ImageFormat[_ImageFormat["emf"] = 2] = "emf";
|
|
1651
|
+
/**
|
|
1652
|
+
* Specifies the type of `gif`.
|
|
1653
|
+
*/
|
|
1654
|
+
_ImageFormat[_ImageFormat["gif"] = 3] = "gif";
|
|
1655
|
+
/**
|
|
1656
|
+
* Specifies the type of `jpeg`.
|
|
1657
|
+
*/
|
|
1658
|
+
_ImageFormat[_ImageFormat["jpeg"] = 4] = "jpeg";
|
|
1659
|
+
/**
|
|
1660
|
+
* Specifies the type of `png`.
|
|
1661
|
+
*/
|
|
1662
|
+
_ImageFormat[_ImageFormat["png"] = 5] = "png";
|
|
1663
|
+
/**
|
|
1664
|
+
* Specifies the type of `wmf`.
|
|
1665
|
+
*/
|
|
1666
|
+
_ImageFormat[_ImageFormat["wmf"] = 6] = "wmf";
|
|
1667
|
+
/**
|
|
1668
|
+
* Specifies the type of `icon`.
|
|
1669
|
+
*/
|
|
1670
|
+
_ImageFormat[_ImageFormat["icon"] = 7] = "icon";
|
|
1671
|
+
})(_ImageFormat || (_ImageFormat = {}));
|
|
1672
|
+
export var _TokenType;
|
|
1673
|
+
(function (_TokenType) {
|
|
1674
|
+
_TokenType[_TokenType["none"] = 0] = "none";
|
|
1675
|
+
_TokenType[_TokenType["comment"] = 1] = "comment";
|
|
1676
|
+
_TokenType[_TokenType["number"] = 2] = "number";
|
|
1677
|
+
_TokenType[_TokenType["real"] = 3] = "real";
|
|
1678
|
+
_TokenType[_TokenType["string"] = 4] = "string";
|
|
1679
|
+
_TokenType[_TokenType["hexString"] = 5] = "hexString";
|
|
1680
|
+
_TokenType[_TokenType["unicodeString"] = 6] = "unicodeString";
|
|
1681
|
+
_TokenType[_TokenType["unicodeHexString"] = 7] = "unicodeHexString";
|
|
1682
|
+
_TokenType[_TokenType["name"] = 8] = "name";
|
|
1683
|
+
_TokenType[_TokenType["operator"] = 9] = "operator";
|
|
1684
|
+
_TokenType[_TokenType["beginArray"] = 10] = "beginArray";
|
|
1685
|
+
_TokenType[_TokenType["endArray"] = 11] = "endArray";
|
|
1686
|
+
_TokenType[_TokenType["eof"] = 12] = "eof";
|
|
1687
|
+
})(_TokenType || (_TokenType = {}));
|
|
1688
|
+
/**
|
|
1689
|
+
* Public enum to define text style.
|
|
1690
|
+
* ```typescript
|
|
1691
|
+
* // Load an existing PDF document
|
|
1692
|
+
* let document: PdfDocument = new PdfDocument(data);
|
|
1693
|
+
* // Get the bookmarks
|
|
1694
|
+
* let bookmarks: PdfBookmarkBase = document.bookmarks;
|
|
1695
|
+
* // Gets bookmark at the specified index
|
|
1696
|
+
* let bookmark : PdfBookMark = bookmarks.at(0) as PdfBookMark;
|
|
1697
|
+
* // Gets the textStyle
|
|
1698
|
+
* let textStyle: PdfTextStyle = bookmark.textStyle;
|
|
1699
|
+
* // Destroy the document
|
|
1700
|
+
* document.destroy();
|
|
1701
|
+
* ```
|
|
1702
|
+
*/
|
|
1703
|
+
export var PdfTextStyle;
|
|
1704
|
+
(function (PdfTextStyle) {
|
|
1705
|
+
/**
|
|
1706
|
+
* Specifies the `regular` text style.
|
|
1707
|
+
*/
|
|
1708
|
+
PdfTextStyle[PdfTextStyle["regular"] = 0] = "regular";
|
|
1709
|
+
/**
|
|
1710
|
+
* Specifies the `italic` text style.
|
|
1711
|
+
*/
|
|
1712
|
+
PdfTextStyle[PdfTextStyle["italic"] = 1] = "italic";
|
|
1713
|
+
/**
|
|
1714
|
+
* Specifies the `bold` text style.
|
|
1715
|
+
*/
|
|
1716
|
+
PdfTextStyle[PdfTextStyle["bold"] = 2] = "bold";
|
|
1717
|
+
})(PdfTextStyle || (PdfTextStyle = {}));
|