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