@syncfusion/ej2-pdf-export 31.1.17 → 31.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ej2-pdf-export.min.js +3 -3
- package/dist/ej2-pdf-export.umd.min.js +3 -3
- package/dist/ej2-pdf-export.umd.min.js.map +1 -1
- package/dist/es6/ej2-pdf-export.es2015.js +142 -23
- package/dist/es6/ej2-pdf-export.es2015.js.map +1 -1
- package/dist/es6/ej2-pdf-export.es5.js +148 -21
- package/dist/es6/ej2-pdf-export.es5.js.map +1 -1
- package/dist/global/ej2-pdf-export.min.js +3 -3
- package/dist/global/ej2-pdf-export.min.js.map +1 -1
- package/dist/global/index.d.ts +2 -2
- package/package.json +8 -45
- package/src/implementation/input-output/pdf-cross-table.js +2 -1
- package/src/implementation/input-output/pdf-writer.d.ts +77 -14
- package/src/implementation/input-output/pdf-writer.js +146 -20
- package/dist/ts/implementation/actions/action.d.ts +0 -50
- package/dist/ts/implementation/actions/action.ts +0 -76
- package/dist/ts/implementation/actions/index.d.ts +0 -6
- package/dist/ts/implementation/actions/index.ts +0 -6
- package/dist/ts/implementation/actions/uri-action.d.ts +0 -33
- package/dist/ts/implementation/actions/uri-action.ts +0 -52
- package/dist/ts/implementation/annotations/action-link-annotation.d.ts +0 -30
- package/dist/ts/implementation/annotations/action-link-annotation.ts +0 -43
- package/dist/ts/implementation/annotations/annotation-collection.d.ts +0 -77
- package/dist/ts/implementation/annotations/annotation-collection.ts +0 -159
- package/dist/ts/implementation/annotations/annotation.d.ts +0 -152
- package/dist/ts/implementation/annotations/annotation.ts +0 -241
- package/dist/ts/implementation/annotations/document-link-annotation.d.ts +0 -89
- package/dist/ts/implementation/annotations/document-link-annotation.ts +0 -118
- package/dist/ts/implementation/annotations/index.d.ts +0 -11
- package/dist/ts/implementation/annotations/index.ts +0 -11
- package/dist/ts/implementation/annotations/link-annotation.d.ts +0 -23
- package/dist/ts/implementation/annotations/link-annotation.ts +0 -32
- package/dist/ts/implementation/annotations/pdf-text-web-link.d.ts +0 -118
- package/dist/ts/implementation/annotations/pdf-text-web-link.ts +0 -268
- package/dist/ts/implementation/annotations/uri-annotation.d.ts +0 -48
- package/dist/ts/implementation/annotations/uri-annotation.ts +0 -86
- package/dist/ts/implementation/collections/dictionary.d.ts +0 -76
- package/dist/ts/implementation/collections/dictionary.ts +0 -150
- package/dist/ts/implementation/collections/index.d.ts +0 -7
- package/dist/ts/implementation/collections/index.ts +0 -7
- package/dist/ts/implementation/collections/object-object-pair/dictionary.d.ts +0 -62
- package/dist/ts/implementation/collections/object-object-pair/dictionary.ts +0 -125
- package/dist/ts/implementation/collections/object-object-pair/index.d.ts +0 -5
- package/dist/ts/implementation/collections/object-object-pair/index.ts +0 -5
- package/dist/ts/implementation/collections/utils.d.ts +0 -27
- package/dist/ts/implementation/collections/utils.ts +0 -38
- package/dist/ts/implementation/document/automatic-fields/automatic-field-info-collection.d.ts +0 -31
- package/dist/ts/implementation/document/automatic-fields/automatic-field-info-collection.ts +0 -39
- package/dist/ts/implementation/document/automatic-fields/automatic-field-info.d.ts +0 -67
- package/dist/ts/implementation/document/automatic-fields/automatic-field-info.ts +0 -108
- package/dist/ts/implementation/document/automatic-fields/automatic-field.d.ts +0 -41
- package/dist/ts/implementation/document/automatic-fields/automatic-field.ts +0 -127
- package/dist/ts/implementation/document/automatic-fields/composite-field.d.ts +0 -46
- package/dist/ts/implementation/document/automatic-fields/composite-field.ts +0 -76
- package/dist/ts/implementation/document/automatic-fields/index.d.ts +0 -11
- package/dist/ts/implementation/document/automatic-fields/index.ts +0 -11
- package/dist/ts/implementation/document/automatic-fields/multiple-value-field.d.ts +0 -18
- package/dist/ts/implementation/document/automatic-fields/multiple-value-field.ts +0 -37
- package/dist/ts/implementation/document/automatic-fields/page-count-field.d.ts +0 -44
- package/dist/ts/implementation/document/automatic-fields/page-count-field.ts +0 -75
- package/dist/ts/implementation/document/automatic-fields/pdf-numbers-convertor.d.ts +0 -53
- package/dist/ts/implementation/document/automatic-fields/pdf-numbers-convertor.ts +0 -157
- package/dist/ts/implementation/document/automatic-fields/pdf-page-number-field.d.ts +0 -51
- package/dist/ts/implementation/document/automatic-fields/pdf-page-number-field.ts +0 -82
- package/dist/ts/implementation/document/automatic-fields/pdf-template-value-pair.d.ts +0 -38
- package/dist/ts/implementation/document/automatic-fields/pdf-template-value-pair.ts +0 -60
- package/dist/ts/implementation/document/automatic-fields/single-value-field.d.ts +0 -15
- package/dist/ts/implementation/document/automatic-fields/single-value-field.ts +0 -48
- package/dist/ts/implementation/document/index.d.ts +0 -16
- package/dist/ts/implementation/document/index.ts +0 -16
- package/dist/ts/implementation/document/pdf-catalog.d.ts +0 -39
- package/dist/ts/implementation/document/pdf-catalog.ts +0 -65
- package/dist/ts/implementation/document/pdf-document-base.d.ts +0 -137
- package/dist/ts/implementation/document/pdf-document-base.ts +0 -187
- package/dist/ts/implementation/document/pdf-document-template.d.ts +0 -166
- package/dist/ts/implementation/document/pdf-document-template.ts +0 -310
- package/dist/ts/implementation/document/pdf-document.d.ts +0 -227
- package/dist/ts/implementation/document/pdf-document.ts +0 -361
- package/dist/ts/implementation/document/pdf-viewer-preferences.d.ts +0 -467
- package/dist/ts/implementation/document/pdf-viewer-preferences.ts +0 -578
- package/dist/ts/implementation/drawing/index.d.ts +0 -5
- package/dist/ts/implementation/drawing/index.ts +0 -5
- package/dist/ts/implementation/drawing/pdf-drawing.d.ts +0 -141
- package/dist/ts/implementation/drawing/pdf-drawing.ts +0 -218
- package/dist/ts/implementation/general/enum.d.ts +0 -21
- package/dist/ts/implementation/general/enum.ts +0 -21
- package/dist/ts/implementation/general/functions/index.d.ts +0 -6
- package/dist/ts/implementation/general/functions/index.ts +0 -6
- package/dist/ts/implementation/general/functions/pdf-function.d.ts +0 -44
- package/dist/ts/implementation/general/functions/pdf-function.ts +0 -66
- package/dist/ts/implementation/general/functions/pdf-sampled-function.d.ts +0 -25
- package/dist/ts/implementation/general/functions/pdf-sampled-function.ts +0 -63
- package/dist/ts/implementation/general/index.d.ts +0 -9
- package/dist/ts/implementation/general/index.ts +0 -9
- package/dist/ts/implementation/general/pdf-cache-collection.d.ts +0 -42
- package/dist/ts/implementation/general/pdf-cache-collection.ts +0 -97
- package/dist/ts/implementation/general/pdf-collection.d.ts +0 -26
- package/dist/ts/implementation/general/pdf-collection.ts +0 -41
- package/dist/ts/implementation/general/pdf-destination.d.ts +0 -103
- package/dist/ts/implementation/general/pdf-destination.ts +0 -170
- package/dist/ts/implementation/graphics/brushes/enum.d.ts +0 -236
- package/dist/ts/implementation/graphics/brushes/enum.ts +0 -237
- package/dist/ts/implementation/graphics/brushes/index.d.ts +0 -13
- package/dist/ts/implementation/graphics/brushes/index.ts +0 -13
- package/dist/ts/implementation/graphics/brushes/pdf-blend.d.ts +0 -105
- package/dist/ts/implementation/graphics/brushes/pdf-blend.ts +0 -294
- package/dist/ts/implementation/graphics/brushes/pdf-brush.d.ts +0 -51
- package/dist/ts/implementation/graphics/brushes/pdf-brush.ts +0 -63
- package/dist/ts/implementation/graphics/brushes/pdf-brushes.d.ts +0 -726
- package/dist/ts/implementation/graphics/brushes/pdf-brushes.ts +0 -2438
- package/dist/ts/implementation/graphics/brushes/pdf-color-blend.d.ts +0 -113
- package/dist/ts/implementation/graphics/brushes/pdf-color-blend.ts +0 -295
- package/dist/ts/implementation/graphics/brushes/pdf-gradient-brush.d.ts +0 -155
- package/dist/ts/implementation/graphics/brushes/pdf-gradient-brush.ts +0 -311
- package/dist/ts/implementation/graphics/brushes/pdf-linear-gradient-brush.d.ts +0 -147
- package/dist/ts/implementation/graphics/brushes/pdf-linear-gradient-brush.ts +0 -406
- package/dist/ts/implementation/graphics/brushes/pdf-radial-gradient-brush.d.ts +0 -122
- package/dist/ts/implementation/graphics/brushes/pdf-radial-gradient-brush.ts +0 -290
- package/dist/ts/implementation/graphics/brushes/pdf-solid-brush.d.ts +0 -77
- package/dist/ts/implementation/graphics/brushes/pdf-solid-brush.ts +0 -107
- package/dist/ts/implementation/graphics/brushes/pdf-tiling-brush.d.ts +0 -161
- package/dist/ts/implementation/graphics/brushes/pdf-tiling-brush.ts +0 -304
- package/dist/ts/implementation/graphics/constants.d.ts +0 -31
- package/dist/ts/implementation/graphics/constants.ts +0 -31
- package/dist/ts/implementation/graphics/enum.d.ts +0 -413
- package/dist/ts/implementation/graphics/enum.ts +0 -413
- package/dist/ts/implementation/graphics/figures/arc.d.ts +0 -87
- package/dist/ts/implementation/graphics/figures/arc.ts +0 -133
- package/dist/ts/implementation/graphics/figures/base/draw-element.d.ts +0 -30
- package/dist/ts/implementation/graphics/figures/base/draw-element.ts +0 -59
- package/dist/ts/implementation/graphics/figures/base/element-layouter.d.ts +0 -161
- package/dist/ts/implementation/graphics/figures/base/element-layouter.ts +0 -260
- package/dist/ts/implementation/graphics/figures/base/fill-element.d.ts +0 -46
- package/dist/ts/implementation/graphics/figures/base/fill-element.ts +0 -72
- package/dist/ts/implementation/graphics/figures/base/graphics-element.d.ts +0 -16
- package/dist/ts/implementation/graphics/figures/base/graphics-element.ts +0 -34
- package/dist/ts/implementation/graphics/figures/base/index.d.ts +0 -9
- package/dist/ts/implementation/graphics/figures/base/index.ts +0 -9
- package/dist/ts/implementation/graphics/figures/base/pdf-shape-element.d.ts +0 -40
- package/dist/ts/implementation/graphics/figures/base/pdf-shape-element.ts +0 -69
- package/dist/ts/implementation/graphics/figures/base/shape-layouter.d.ts +0 -131
- package/dist/ts/implementation/graphics/figures/base/shape-layouter.ts +0 -276
- package/dist/ts/implementation/graphics/figures/base/text-layouter.d.ts +0 -107
- package/dist/ts/implementation/graphics/figures/base/text-layouter.ts +0 -212
- package/dist/ts/implementation/graphics/figures/ellipse-part.d.ts +0 -48
- package/dist/ts/implementation/graphics/figures/ellipse-part.ts +0 -76
- package/dist/ts/implementation/graphics/figures/enum.d.ts +0 -79
- package/dist/ts/implementation/graphics/figures/enum.ts +0 -80
- package/dist/ts/implementation/graphics/figures/index.d.ts +0 -13
- package/dist/ts/implementation/graphics/figures/index.ts +0 -13
- package/dist/ts/implementation/graphics/figures/layout-element.d.ts +0 -73
- package/dist/ts/implementation/graphics/figures/layout-element.ts +0 -132
- package/dist/ts/implementation/graphics/figures/path.d.ts +0 -319
- package/dist/ts/implementation/graphics/figures/path.ts +0 -646
- package/dist/ts/implementation/graphics/figures/pdf-template.d.ts +0 -113
- package/dist/ts/implementation/graphics/figures/pdf-template.ts +0 -205
- package/dist/ts/implementation/graphics/figures/rectangle-area.d.ts +0 -64
- package/dist/ts/implementation/graphics/figures/rectangle-area.ts +0 -108
- package/dist/ts/implementation/graphics/figures/text-element.d.ts +0 -214
- package/dist/ts/implementation/graphics/figures/text-element.ts +0 -449
- package/dist/ts/implementation/graphics/fonts/enum.d.ts +0 -385
- package/dist/ts/implementation/graphics/fonts/enum.ts +0 -385
- package/dist/ts/implementation/graphics/fonts/index.d.ts +0 -16
- package/dist/ts/implementation/graphics/fonts/index.ts +0 -16
- package/dist/ts/implementation/graphics/fonts/pdf-font-metrics.d.ts +0 -164
- package/dist/ts/implementation/graphics/fonts/pdf-font-metrics.ts +0 -248
- package/dist/ts/implementation/graphics/fonts/pdf-font.d.ts +0 -187
- package/dist/ts/implementation/graphics/fonts/pdf-font.ts +0 -316
- package/dist/ts/implementation/graphics/fonts/pdf-standard-font-metrics-factory.d.ts +0 -301
- package/dist/ts/implementation/graphics/fonts/pdf-standard-font-metrics-factory.ts +0 -606
- package/dist/ts/implementation/graphics/fonts/pdf-standard-font.d.ts +0 -143
- package/dist/ts/implementation/graphics/fonts/pdf-standard-font.ts +0 -243
- package/dist/ts/implementation/graphics/fonts/pdf-string-format.d.ts +0 -321
- package/dist/ts/implementation/graphics/fonts/pdf-string-format.ts +0 -474
- package/dist/ts/implementation/graphics/fonts/pdf-true-type-font.d.ts +0 -49
- package/dist/ts/implementation/graphics/fonts/pdf-true-type-font.ts +0 -165
- package/dist/ts/implementation/graphics/fonts/rtl/index.d.ts +0 -6
- package/dist/ts/implementation/graphics/fonts/rtl/index.ts +0 -6
- package/dist/ts/implementation/graphics/fonts/rtl/rtl-bidirectional.d.ts +0 -62
- package/dist/ts/implementation/graphics/fonts/rtl/rtl-bidirectional.ts +0 -958
- package/dist/ts/implementation/graphics/fonts/rtl/rtl-text-shape.d.ts +0 -68
- package/dist/ts/implementation/graphics/fonts/rtl/rtl-text-shape.ts +0 -374
- package/dist/ts/implementation/graphics/fonts/rtl-renderer.d.ts +0 -23
- package/dist/ts/implementation/graphics/fonts/rtl-renderer.ts +0 -255
- package/dist/ts/implementation/graphics/fonts/string-layouter.d.ts +0 -254
- package/dist/ts/implementation/graphics/fonts/string-layouter.ts +0 -617
- package/dist/ts/implementation/graphics/fonts/string-tokenizer.d.ts +0 -109
- package/dist/ts/implementation/graphics/fonts/string-tokenizer.ts +0 -275
- package/dist/ts/implementation/graphics/fonts/ttf-OS2-Table.d.ts +0 -204
- package/dist/ts/implementation/graphics/fonts/ttf-OS2-Table.ts +0 -206
- package/dist/ts/implementation/graphics/fonts/ttf-apple-cmap-sub-table.d.ts +0 -17
- package/dist/ts/implementation/graphics/fonts/ttf-apple-cmap-sub-table.ts +0 -18
- package/dist/ts/implementation/graphics/fonts/ttf-cmap-sub-table.d.ts +0 -17
- package/dist/ts/implementation/graphics/fonts/ttf-cmap-sub-table.ts +0 -18
- package/dist/ts/implementation/graphics/fonts/ttf-cmap-table.d.ts +0 -13
- package/dist/ts/implementation/graphics/fonts/ttf-cmap-table.ts +0 -14
- package/dist/ts/implementation/graphics/fonts/ttf-glyph-header.d.ts +0 -25
- package/dist/ts/implementation/graphics/fonts/ttf-glyph-header.ts +0 -26
- package/dist/ts/implementation/graphics/fonts/ttf-glyph-info.d.ts +0 -25
- package/dist/ts/implementation/graphics/fonts/ttf-glyph-info.ts +0 -35
- package/dist/ts/implementation/graphics/fonts/ttf-head-table.d.ts +0 -94
- package/dist/ts/implementation/graphics/fonts/ttf-head-table.ts +0 -94
- package/dist/ts/implementation/graphics/fonts/ttf-horizontal-header-table.d.ts +0 -55
- package/dist/ts/implementation/graphics/fonts/ttf-horizontal-header-table.ts +0 -56
- package/dist/ts/implementation/graphics/fonts/ttf-loca-table.d.ts +0 -9
- package/dist/ts/implementation/graphics/fonts/ttf-loca-table.ts +0 -10
- package/dist/ts/implementation/graphics/fonts/ttf-long-hor-metric.d.ts +0 -13
- package/dist/ts/implementation/graphics/fonts/ttf-long-hor-metric.ts +0 -14
- package/dist/ts/implementation/graphics/fonts/ttf-metrics.d.ts +0 -101
- package/dist/ts/implementation/graphics/fonts/ttf-metrics.ts +0 -106
- package/dist/ts/implementation/graphics/fonts/ttf-microsoft-cmap-sub-table.d.ts +0 -57
- package/dist/ts/implementation/graphics/fonts/ttf-microsoft-cmap-sub-table.ts +0 -58
- package/dist/ts/implementation/graphics/fonts/ttf-name-record.d.ts +0 -33
- package/dist/ts/implementation/graphics/fonts/ttf-name-record.ts +0 -33
- package/dist/ts/implementation/graphics/fonts/ttf-name-table.d.ts +0 -22
- package/dist/ts/implementation/graphics/fonts/ttf-name-table.ts +0 -22
- package/dist/ts/implementation/graphics/fonts/ttf-post-table.d.ts +0 -41
- package/dist/ts/implementation/graphics/fonts/ttf-post-table.ts +0 -42
- package/dist/ts/implementation/graphics/fonts/ttf-reader.d.ts +0 -227
- package/dist/ts/implementation/graphics/fonts/ttf-reader.ts +0 -1267
- package/dist/ts/implementation/graphics/fonts/ttf-table-info.d.ts +0 -22
- package/dist/ts/implementation/graphics/fonts/ttf-table-info.ts +0 -26
- package/dist/ts/implementation/graphics/fonts/ttf-trimmed-cmap-sub-table.d.ts +0 -25
- package/dist/ts/implementation/graphics/fonts/ttf-trimmed-cmap-sub-table.ts +0 -26
- package/dist/ts/implementation/graphics/fonts/unicode-true-type-font.d.ts +0 -213
- package/dist/ts/implementation/graphics/fonts/unicode-true-type-font.ts +0 -592
- package/dist/ts/implementation/graphics/images/byte-array.d.ts +0 -74
- package/dist/ts/implementation/graphics/images/byte-array.ts +0 -137
- package/dist/ts/implementation/graphics/images/image-decoder.d.ts +0 -274
- package/dist/ts/implementation/graphics/images/image-decoder.ts +0 -439
- package/dist/ts/implementation/graphics/images/index.d.ts +0 -8
- package/dist/ts/implementation/graphics/images/index.ts +0 -8
- package/dist/ts/implementation/graphics/images/pdf-bitmap.d.ts +0 -90
- package/dist/ts/implementation/graphics/images/pdf-bitmap.ts +0 -110
- package/dist/ts/implementation/graphics/images/pdf-image.d.ts +0 -88
- package/dist/ts/implementation/graphics/images/pdf-image.ts +0 -132
- package/dist/ts/implementation/graphics/index.d.ts +0 -35
- package/dist/ts/implementation/graphics/index.ts +0 -46
- package/dist/ts/implementation/graphics/pdf-color.d.ts +0 -206
- package/dist/ts/implementation/graphics/pdf-color.ts +0 -484
- package/dist/ts/implementation/graphics/pdf-graphics.d.ts +0 -1210
- package/dist/ts/implementation/graphics/pdf-graphics.ts +0 -2556
- package/dist/ts/implementation/graphics/pdf-margins.d.ts +0 -82
- package/dist/ts/implementation/graphics/pdf-margins.ts +0 -124
- package/dist/ts/implementation/graphics/pdf-pen.d.ts +0 -237
- package/dist/ts/implementation/graphics/pdf-pen.ts +0 -370
- package/dist/ts/implementation/graphics/pdf-resources.d.ts +0 -122
- package/dist/ts/implementation/graphics/pdf-resources.ts +0 -300
- package/dist/ts/implementation/graphics/pdf-transformation-matrix.d.ts +0 -143
- package/dist/ts/implementation/graphics/pdf-transformation-matrix.ts +0 -246
- package/dist/ts/implementation/graphics/pdf-transparency.d.ts +0 -34
- package/dist/ts/implementation/graphics/pdf-transparency.ts +0 -93
- package/dist/ts/implementation/graphics/unit-convertor.d.ts +0 -72
- package/dist/ts/implementation/graphics/unit-convertor.ts +0 -96
- package/dist/ts/implementation/index.d.ts +0 -103
- package/dist/ts/implementation/index.ts +0 -103
- package/dist/ts/implementation/input-output/big-endian-writer.d.ts +0 -59
- package/dist/ts/implementation/input-output/big-endian-writer.ts +0 -121
- package/dist/ts/implementation/input-output/cross-table.d.ts +0 -21
- package/dist/ts/implementation/input-output/cross-table.ts +0 -21
- package/dist/ts/implementation/input-output/enum.d.ts +0 -16
- package/dist/ts/implementation/input-output/enum.ts +0 -16
- package/dist/ts/implementation/input-output/index.d.ts +0 -12
- package/dist/ts/implementation/input-output/index.ts +0 -12
- package/dist/ts/implementation/input-output/pdf-cross-table.d.ts +0 -259
- package/dist/ts/implementation/input-output/pdf-cross-table.ts +0 -536
- package/dist/ts/implementation/input-output/pdf-dictionary-properties.d.ts +0 -583
- package/dist/ts/implementation/input-output/pdf-dictionary-properties.ts +0 -586
- package/dist/ts/implementation/input-output/pdf-main-object-collection.d.ts +0 -120
- package/dist/ts/implementation/input-output/pdf-main-object-collection.ts +0 -194
- package/dist/ts/implementation/input-output/pdf-operators.d.ts +0 -361
- package/dist/ts/implementation/input-output/pdf-operators.ts +0 -363
- package/dist/ts/implementation/input-output/pdf-stream-writer.d.ts +0 -311
- package/dist/ts/implementation/input-output/pdf-stream-writer.ts +0 -681
- package/dist/ts/implementation/input-output/pdf-writer.d.ts +0 -122
- package/dist/ts/implementation/input-output/pdf-writer.ts +0 -164
- package/dist/ts/implementation/pages/enum.d.ts +0 -201
- package/dist/ts/implementation/pages/enum.ts +0 -201
- package/dist/ts/implementation/pages/index.d.ts +0 -17
- package/dist/ts/implementation/pages/index.ts +0 -17
- package/dist/ts/implementation/pages/page-added-event-arguments.d.ts +0 -30
- package/dist/ts/implementation/pages/page-added-event-arguments.ts +0 -39
- package/dist/ts/implementation/pages/pdf-document-page-collection.d.ts +0 -86
- package/dist/ts/implementation/pages/pdf-document-page-collection.ts +0 -180
- package/dist/ts/implementation/pages/pdf-page-base.d.ts +0 -121
- package/dist/ts/implementation/pages/pdf-page-base.ts +0 -181
- package/dist/ts/implementation/pages/pdf-page-layer-collection.d.ts +0 -99
- package/dist/ts/implementation/pages/pdf-page-layer-collection.ts +0 -348
- package/dist/ts/implementation/pages/pdf-page-layer.d.ts +0 -160
- package/dist/ts/implementation/pages/pdf-page-layer.ts +0 -271
- package/dist/ts/implementation/pages/pdf-page-settings.d.ts +0 -111
- package/dist/ts/implementation/pages/pdf-page-settings.ts +0 -192
- package/dist/ts/implementation/pages/pdf-page-size.d.ts +0 -159
- package/dist/ts/implementation/pages/pdf-page-size.ts +0 -162
- package/dist/ts/implementation/pages/pdf-page-template-element.d.ts +0 -240
- package/dist/ts/implementation/pages/pdf-page-template-element.ts +0 -663
- package/dist/ts/implementation/pages/pdf-page.d.ts +0 -153
- package/dist/ts/implementation/pages/pdf-page.ts +0 -235
- package/dist/ts/implementation/pages/pdf-section-collection.d.ts +0 -109
- package/dist/ts/implementation/pages/pdf-section-collection.ts +0 -187
- package/dist/ts/implementation/pages/pdf-section-page-collection.d.ts +0 -41
- package/dist/ts/implementation/pages/pdf-section-page-collection.ts +0 -61
- package/dist/ts/implementation/pages/pdf-section-templates.d.ts +0 -64
- package/dist/ts/implementation/pages/pdf-section-templates.ts +0 -96
- package/dist/ts/implementation/pages/pdf-section.d.ts +0 -327
- package/dist/ts/implementation/pages/pdf-section.ts +0 -644
- package/dist/ts/implementation/primitives/index.d.ts +0 -12
- package/dist/ts/implementation/primitives/index.ts +0 -12
- package/dist/ts/implementation/primitives/pdf-array.d.ts +0 -192
- package/dist/ts/implementation/primitives/pdf-array.ts +0 -386
- package/dist/ts/implementation/primitives/pdf-boolean.d.ts +0 -84
- package/dist/ts/implementation/primitives/pdf-boolean.ts +0 -119
- package/dist/ts/implementation/primitives/pdf-dictionary.d.ts +0 -362
- package/dist/ts/implementation/primitives/pdf-dictionary.ts +0 -513
- package/dist/ts/implementation/primitives/pdf-name.d.ts +0 -121
- package/dist/ts/implementation/primitives/pdf-name.ts +0 -218
- package/dist/ts/implementation/primitives/pdf-number.d.ts +0 -104
- package/dist/ts/implementation/primitives/pdf-number.ts +0 -165
- package/dist/ts/implementation/primitives/pdf-reference.d.ts +0 -223
- package/dist/ts/implementation/primitives/pdf-reference.ts +0 -430
- package/dist/ts/implementation/primitives/pdf-stream.d.ts +0 -161
- package/dist/ts/implementation/primitives/pdf-stream.ts +0 -306
- package/dist/ts/implementation/primitives/pdf-string.d.ts +0 -235
- package/dist/ts/implementation/primitives/pdf-string.ts +0 -397
- package/dist/ts/implementation/structured-elements/grid/index.d.ts +0 -4
- package/dist/ts/implementation/structured-elements/grid/index.ts +0 -10
- package/dist/ts/implementation/structured-elements/grid/layout/grid-layouter.d.ts +0 -597
- package/dist/ts/implementation/structured-elements/grid/layout/grid-layouter.ts +0 -2127
- package/dist/ts/implementation/structured-elements/grid/pdf-grid-cell.d.ts +0 -288
- package/dist/ts/implementation/structured-elements/grid/pdf-grid-cell.ts +0 -1225
- package/dist/ts/implementation/structured-elements/grid/pdf-grid-column.d.ts +0 -108
- package/dist/ts/implementation/structured-elements/grid/pdf-grid-column.ts +0 -206
- package/dist/ts/implementation/structured-elements/grid/pdf-grid-row.d.ts +0 -261
- package/dist/ts/implementation/structured-elements/grid/pdf-grid-row.ts +0 -470
- package/dist/ts/implementation/structured-elements/grid/pdf-grid.d.ts +0 -292
- package/dist/ts/implementation/structured-elements/grid/pdf-grid.ts +0 -853
- package/dist/ts/implementation/structured-elements/grid/styles/index.d.ts +0 -5
- package/dist/ts/implementation/structured-elements/grid/styles/index.ts +0 -5
- package/dist/ts/implementation/structured-elements/grid/styles/pdf-borders.d.ts +0 -146
- package/dist/ts/implementation/structured-elements/grid/styles/pdf-borders.ts +0 -238
- package/dist/ts/implementation/structured-elements/grid/styles/style.d.ts +0 -272
- package/dist/ts/implementation/structured-elements/grid/styles/style.ts +0 -423
- package/dist/ts/implementation/structured-elements/index.d.ts +0 -4
- package/dist/ts/implementation/structured-elements/index.ts +0 -10
- package/dist/ts/implementation/structured-elements/tables/light-tables/enum.d.ts +0 -16
- package/dist/ts/implementation/structured-elements/tables/light-tables/enum.ts +0 -16
- package/dist/ts/index.d.ts +0 -116
- package/dist/ts/index.ts +0 -116
- package/dist/ts/interfaces/i-pdf-cache.d.ts +0 -23
- package/dist/ts/interfaces/i-pdf-cache.ts +0 -23
- package/dist/ts/interfaces/i-pdf-changable.d.ts +0 -17
- package/dist/ts/interfaces/i-pdf-changable.ts +0 -17
- package/dist/ts/interfaces/i-pdf-clonable.d.ts +0 -12
- package/dist/ts/interfaces/i-pdf-clonable.ts +0 -12
- package/dist/ts/interfaces/i-pdf-primitives.d.ts +0 -45
- package/dist/ts/interfaces/i-pdf-primitives.ts +0 -45
- package/dist/ts/interfaces/i-pdf-true-type-font.d.ts +0 -18
- package/dist/ts/interfaces/i-pdf-true-type-font.ts +0 -48
- package/dist/ts/interfaces/i-pdf-wrapper.d.ts +0 -13
- package/dist/ts/interfaces/i-pdf-wrapper.ts +0 -13
- package/dist/ts/interfaces/i-pdf-writer.d.ts +0 -29
- package/dist/ts/interfaces/i-pdf-writer.ts +0 -29
- package/dist/ts/interfaces/index.d.ts +0 -10
- package/dist/ts/interfaces/index.ts +0 -10
|
@@ -1,578 +0,0 @@
|
|
|
1
|
-
import { DictionaryProperties } from './../input-output/pdf-dictionary-properties';
|
|
2
|
-
import { PdfCatalog } from './pdf-catalog';
|
|
3
|
-
import { PdfDictionary } from './../primitives/pdf-dictionary';
|
|
4
|
-
import { PdfBoolean } from './../primitives/pdf-boolean';
|
|
5
|
-
import { PdfName } from './../primitives/pdf-name';
|
|
6
|
-
import { IPdfPrimitive } from './../../interfaces/i-pdf-primitives';
|
|
7
|
-
import { IPdfWrapper } from './../../interfaces/i-pdf-wrapper';
|
|
8
|
-
/**
|
|
9
|
-
* Defines the way the document is to be presented on the screen or in print.
|
|
10
|
-
* ```typescript
|
|
11
|
-
* // Create a new PDF document
|
|
12
|
-
* let document : PdfDocument = new PdfDocument();
|
|
13
|
-
* // Gets viewer preferences
|
|
14
|
-
* let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
|
|
15
|
-
* // Destroy the document
|
|
16
|
-
* document.destroy();
|
|
17
|
-
* ```
|
|
18
|
-
*/
|
|
19
|
-
export class PdfViewerPreferences implements IPdfWrapper {
|
|
20
|
-
/**
|
|
21
|
-
* Initialize a new instance of `PdfViewerPreferences` class.
|
|
22
|
-
*
|
|
23
|
-
* @private
|
|
24
|
-
* ```
|
|
25
|
-
*/
|
|
26
|
-
constructor(catalog: PdfCatalog) {
|
|
27
|
-
this._catalog = catalog;
|
|
28
|
-
}
|
|
29
|
-
_dictionaryProperties : DictionaryProperties = new DictionaryProperties();
|
|
30
|
-
_catalog: PdfCatalog;
|
|
31
|
-
_centerWindow: boolean = false;
|
|
32
|
-
_fitWindow: boolean = false;
|
|
33
|
-
_displayTitle: boolean = false;
|
|
34
|
-
_splitWindow: boolean = false;
|
|
35
|
-
_hideMenuBar: boolean = false;
|
|
36
|
-
_hideToolBar: boolean = false;
|
|
37
|
-
_hideWindowUI: boolean = false;
|
|
38
|
-
_pageMode: PdfPageMode = PdfPageMode.UseNone;
|
|
39
|
-
_pageLayout: PdfPageLayout = PdfPageLayout.SinglePage;
|
|
40
|
-
_dictionary: PdfDictionary = new PdfDictionary();
|
|
41
|
-
_pageScaling: PageScalingMode;
|
|
42
|
-
_duplex: DuplexMode = DuplexMode.None;
|
|
43
|
-
/**
|
|
44
|
-
* A flag specifying whether to position the document’s window in the center of the screen.
|
|
45
|
-
* ```typescript
|
|
46
|
-
* // Create a new PDF document
|
|
47
|
-
* let document : PdfDocument = new PdfDocument();
|
|
48
|
-
* // Gets the viewer preferences of the document
|
|
49
|
-
* let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
|
|
50
|
-
* // Gets the center window
|
|
51
|
-
* let centerWindow : boolean = viewerPreferences.centerWindow;
|
|
52
|
-
* // Destroy the document
|
|
53
|
-
* document.destroy();
|
|
54
|
-
* ```
|
|
55
|
-
*/
|
|
56
|
-
get centerWindow(): boolean {
|
|
57
|
-
return this._centerWindow;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* A flag specifying whether to position the document’s window in the center of the screen.
|
|
61
|
-
* ```typescript
|
|
62
|
-
* // Create a new PDF document
|
|
63
|
-
* let document : PdfDocument = new PdfDocument();
|
|
64
|
-
* // Gets the viewer preferences of the document
|
|
65
|
-
* let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
|
|
66
|
-
* // Sets the center window
|
|
67
|
-
* viewerPreferences.centerWindow = true;
|
|
68
|
-
* // Destroy the document
|
|
69
|
-
* document.destroy();
|
|
70
|
-
* ```
|
|
71
|
-
*/
|
|
72
|
-
set centerWindow(value: boolean) {
|
|
73
|
-
this._centerWindow = value;
|
|
74
|
-
this._dictionary.items.setValue(this._dictionaryProperties.centerWindow, new PdfBoolean(this._centerWindow));
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* A flag specifying whether the window’s title bar should display the document title taken
|
|
78
|
-
* from the Title entry of the document information dictionary. If false, the title bar
|
|
79
|
-
* should instead display the name of the PDF file containing the document.
|
|
80
|
-
* ```typescript
|
|
81
|
-
* // Create a new PDF document
|
|
82
|
-
* let document : PdfDocument = new PdfDocument();
|
|
83
|
-
* // Gets the viewer preferences of the document
|
|
84
|
-
* let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
|
|
85
|
-
* // Gets the display title
|
|
86
|
-
* let displayTitle : boolean = viewerPreferences.displayTitle;
|
|
87
|
-
* // Destroy the document
|
|
88
|
-
* document.destroy();
|
|
89
|
-
* ```
|
|
90
|
-
*/
|
|
91
|
-
get displayTitle(): boolean {
|
|
92
|
-
return this._displayTitle;
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* A flag specifying whether the window’s title bar should display the document title taken
|
|
96
|
-
* from the Title entry of the document information dictionary. If false, the title bar
|
|
97
|
-
* should instead display the name of the PDF file containing the document.
|
|
98
|
-
* ```typescript
|
|
99
|
-
* // Create a new PDF document
|
|
100
|
-
* let document : PdfDocument = new PdfDocument();
|
|
101
|
-
* // Gets the viewer preferences of the document
|
|
102
|
-
* let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
|
|
103
|
-
* // Sets the display title
|
|
104
|
-
* viewerPreferences.displayTitle = true;
|
|
105
|
-
* // Destroy the document
|
|
106
|
-
* document.destroy();
|
|
107
|
-
* ```
|
|
108
|
-
*/
|
|
109
|
-
set displayTitle(value: boolean) {
|
|
110
|
-
this._displayTitle = value;
|
|
111
|
-
this._dictionary.items.setValue(this._dictionaryProperties.displayTitle, new PdfBoolean(this._displayTitle));
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* A flag specifying whether to resize the document’s window to fit the size of the first
|
|
115
|
-
* displayed page.
|
|
116
|
-
* ```typescript
|
|
117
|
-
* // Create a new PDF document
|
|
118
|
-
* let document : PdfDocument = new PdfDocument();
|
|
119
|
-
* // Gets the viewer preferences of the document
|
|
120
|
-
* let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
|
|
121
|
-
* // Gets the fit window
|
|
122
|
-
* let fitWindow : boolean = viewerPreferences.fitWindow;
|
|
123
|
-
* // Destroy the document
|
|
124
|
-
* document.destroy();
|
|
125
|
-
* ```
|
|
126
|
-
*/
|
|
127
|
-
get fitWindow(): boolean {
|
|
128
|
-
return this._fitWindow;
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* A flag specifying whether to resize the document’s window to fit the size of the first
|
|
132
|
-
* displayed page.
|
|
133
|
-
* ```typescript
|
|
134
|
-
* // Create a new PDF document
|
|
135
|
-
* let document : PdfDocument = new PdfDocument();
|
|
136
|
-
* // Gets the viewer preferences of the document
|
|
137
|
-
* let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
|
|
138
|
-
* // Sets the fit window
|
|
139
|
-
* viewerPreferences.fitWindow = true;
|
|
140
|
-
* // Destroy the document
|
|
141
|
-
* document.destroy();
|
|
142
|
-
* ```
|
|
143
|
-
*/
|
|
144
|
-
set fitWindow(value: boolean) {
|
|
145
|
-
this._fitWindow = value;
|
|
146
|
-
this._dictionary.items.setValue(this._dictionaryProperties.fitWindow, new PdfBoolean(this._fitWindow));
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* A flag specifying whether to hide the viewer application’s menu bar when the
|
|
150
|
-
* document is active.
|
|
151
|
-
* ```typescript
|
|
152
|
-
* // Create a new PDF document
|
|
153
|
-
* let document : PdfDocument = new PdfDocument();
|
|
154
|
-
* // Gets the viewer preferences of the document
|
|
155
|
-
* let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
|
|
156
|
-
* // Gets the hide menu bar
|
|
157
|
-
* let hideMenuBar: boolean = viewerPreferences.hideMenuBar;
|
|
158
|
-
* // Destroy the document
|
|
159
|
-
* document.destroy();
|
|
160
|
-
* ```
|
|
161
|
-
*/
|
|
162
|
-
get hideMenuBar(): boolean {
|
|
163
|
-
return this._hideMenuBar;
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
* A flag specifying whether to hide the viewer application’s menu bar when the
|
|
167
|
-
* document is active.
|
|
168
|
-
* ```typescript
|
|
169
|
-
* // Create a new PDF document
|
|
170
|
-
* let document : PdfDocument = new PdfDocument();
|
|
171
|
-
* // Gets the viewer preferences of the document
|
|
172
|
-
* let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
|
|
173
|
-
* // Sets the hide menu bar
|
|
174
|
-
* viewerPreferences.hideMenuBar = true;
|
|
175
|
-
* // Destroy the document
|
|
176
|
-
* document.destroy();
|
|
177
|
-
* ```
|
|
178
|
-
*/
|
|
179
|
-
set hideMenuBar(value: boolean) {
|
|
180
|
-
this._hideMenuBar = value;
|
|
181
|
-
this._dictionary.items.setValue(this._dictionaryProperties.hideMenuBar, new PdfBoolean(this._hideMenuBar));
|
|
182
|
-
}
|
|
183
|
-
/**
|
|
184
|
-
* A flag specifying whether to hide the viewer application’s tool bar when the
|
|
185
|
-
* document is active.
|
|
186
|
-
* ```typescript
|
|
187
|
-
* // Create a new PDF document
|
|
188
|
-
* let document : PdfDocument = new PdfDocument();
|
|
189
|
-
* // Gets the viewer preferences of the document
|
|
190
|
-
* let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
|
|
191
|
-
* // Gets the hide tool bar
|
|
192
|
-
* let hideToolBar: boolean = viewerPreferences.hideToolBar;
|
|
193
|
-
* // Destroy the document
|
|
194
|
-
* document.destroy();
|
|
195
|
-
* ```
|
|
196
|
-
*/
|
|
197
|
-
get hideToolBar(): boolean {
|
|
198
|
-
return this._hideToolBar;
|
|
199
|
-
}
|
|
200
|
-
/**
|
|
201
|
-
* A flag specifying whether to hide the viewer application’s tool bar when the
|
|
202
|
-
* document is active.
|
|
203
|
-
* ```typescript
|
|
204
|
-
* // Create a new PDF document
|
|
205
|
-
* let document : PdfDocument = new PdfDocument();
|
|
206
|
-
* // Gets the viewer preferences of the document
|
|
207
|
-
* let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
|
|
208
|
-
* // Sets the hide tool bar
|
|
209
|
-
* viewerPreferences.hideToolbar = true;
|
|
210
|
-
* // Destroy the document
|
|
211
|
-
* document.destroy();
|
|
212
|
-
* ```
|
|
213
|
-
*/
|
|
214
|
-
set hideToolBar(value: boolean) {
|
|
215
|
-
this._hideToolBar = value;
|
|
216
|
-
this._dictionary.items.setValue(this._dictionaryProperties.hideToolBar, new PdfBoolean(this._hideToolBar));
|
|
217
|
-
}
|
|
218
|
-
/**
|
|
219
|
-
* A flag specifying whether to hide user interface elements in the document’s window
|
|
220
|
-
* (such as scroll bars and navigation controls), leaving only the document’s contents displayed.
|
|
221
|
-
* ```typescript
|
|
222
|
-
* // Create a new PDF document
|
|
223
|
-
* let document : PdfDocument = new PdfDocument();
|
|
224
|
-
* // Gets the viewer preferences of the document
|
|
225
|
-
* let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
|
|
226
|
-
* // Gets the hide window UI
|
|
227
|
-
* let hideWindowUI: boolean = viewerPreferences.hideWindowUI;
|
|
228
|
-
* // Destroy the document
|
|
229
|
-
* document.destroy();
|
|
230
|
-
* ```
|
|
231
|
-
*/
|
|
232
|
-
get hideWindowUI(): boolean {
|
|
233
|
-
return this._hideWindowUI;
|
|
234
|
-
}
|
|
235
|
-
/**
|
|
236
|
-
* A flag specifying whether to hide user interface elements in the document’s window
|
|
237
|
-
* (such as scroll bars and navigation controls), leaving only the document’s contents displayed.
|
|
238
|
-
* ```typescript
|
|
239
|
-
* // Create a new PDF document
|
|
240
|
-
* let document : PdfDocument = new PdfDocument();
|
|
241
|
-
* // Gets the viewer preferences of the document
|
|
242
|
-
* let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
|
|
243
|
-
* // Sets the hide window UI
|
|
244
|
-
* viewerPreferences.hideWindowUI = true;
|
|
245
|
-
* // Destroy the document
|
|
246
|
-
* document.destroy();
|
|
247
|
-
* ```
|
|
248
|
-
*/
|
|
249
|
-
set hideWindowUI(value: boolean) {
|
|
250
|
-
this._hideWindowUI = value;
|
|
251
|
-
this._dictionary.items.setValue(this._dictionaryProperties.hideWindowUI, new PdfBoolean(this._hideWindowUI));
|
|
252
|
-
}
|
|
253
|
-
/**
|
|
254
|
-
* A name object specifying how the document should be displayed when opened.
|
|
255
|
-
* ```typescript
|
|
256
|
-
* // Create a new PDF document
|
|
257
|
-
* let document : PdfDocument = new PdfDocument();
|
|
258
|
-
* // Gets the viewer preferences of the document
|
|
259
|
-
* let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
|
|
260
|
-
* // Gets the page mode
|
|
261
|
-
* let pageMode: PdfPageMode = viewerPreferences.pageMode;
|
|
262
|
-
* // Destroy the document
|
|
263
|
-
* document.destroy();
|
|
264
|
-
* ```
|
|
265
|
-
*/
|
|
266
|
-
get pageMode(): PdfPageMode {
|
|
267
|
-
return this._pageMode;
|
|
268
|
-
}
|
|
269
|
-
/**
|
|
270
|
-
* A name object specifying how the document should be displayed when opened.
|
|
271
|
-
* ```typescript
|
|
272
|
-
* // Create a new PDF document
|
|
273
|
-
* let document : PdfDocument = new PdfDocument();
|
|
274
|
-
* // Gets the viewer preferences of the document
|
|
275
|
-
* let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
|
|
276
|
-
* // Sets the page mode
|
|
277
|
-
* viewerPreferences.pageMode = PdfPageMode.UseOutlines;
|
|
278
|
-
* // Destroy the document
|
|
279
|
-
* document.destroy();
|
|
280
|
-
* ```
|
|
281
|
-
*/
|
|
282
|
-
set pageMode(value: PdfPageMode) {
|
|
283
|
-
this._pageMode = value;
|
|
284
|
-
this._catalog.items.setValue(this._dictionaryProperties.pageMode, new PdfName(this._mapPageMode(this._pageMode)));
|
|
285
|
-
}
|
|
286
|
-
/**
|
|
287
|
-
* Gets print duplex mode handling option to use when printing the file from the print dialog.
|
|
288
|
-
* ```typescript
|
|
289
|
-
* // Create a new PDF document
|
|
290
|
-
* let document : PdfDocument = new PdfDocument();
|
|
291
|
-
* // Gets the viewer preferences of the document
|
|
292
|
-
* let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
|
|
293
|
-
* // Gets the duplex
|
|
294
|
-
* let duplex : DuplexMode = viewerPreferences.duplex;
|
|
295
|
-
* // Destroy the document
|
|
296
|
-
* document.destroy();
|
|
297
|
-
* ```
|
|
298
|
-
*/
|
|
299
|
-
get duplex(): DuplexMode {
|
|
300
|
-
return this._duplex;
|
|
301
|
-
}
|
|
302
|
-
/**
|
|
303
|
-
* Sets print duplex mode handling option to use when printing the file from the print dialog.
|
|
304
|
-
* ```typescript
|
|
305
|
-
* // Create a new PDF document
|
|
306
|
-
* let document : PdfDocument = new PdfDocument();
|
|
307
|
-
* // Gets the viewer preferences of the document
|
|
308
|
-
* let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
|
|
309
|
-
* // Sets the duplex
|
|
310
|
-
* viewerPreferences.duplex = DuplexMode.DuplexFlipLongEdge;
|
|
311
|
-
* // Destroy the document
|
|
312
|
-
* document.destroy();
|
|
313
|
-
* ```
|
|
314
|
-
*/
|
|
315
|
-
set duplex(value: DuplexMode) {
|
|
316
|
-
this._duplex = value;
|
|
317
|
-
this._catalog.items.setValue(this._dictionaryProperties.duplex, new PdfName(this._mapDuplexMode(this._duplex)));
|
|
318
|
-
}
|
|
319
|
-
/**
|
|
320
|
-
* A name object specifying the page layout to be used when the document is opened.
|
|
321
|
-
* ```typescript
|
|
322
|
-
* // Create a new PDF document
|
|
323
|
-
* let document : PdfDocument = new PdfDocument();
|
|
324
|
-
* // Gets the viewer preferences of the document
|
|
325
|
-
* let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
|
|
326
|
-
* // Gets the page layout
|
|
327
|
-
* let pageLayout : PdfPageLayout = viewerPreferences.pageLayout;
|
|
328
|
-
* // Destroy the document
|
|
329
|
-
* document.destroy();
|
|
330
|
-
* ```
|
|
331
|
-
*/
|
|
332
|
-
get pageLayout(): PdfPageLayout {
|
|
333
|
-
return this._pageLayout;
|
|
334
|
-
}
|
|
335
|
-
/**
|
|
336
|
-
* A name object specifying the page layout to be used when the document is opened.
|
|
337
|
-
* ```typescript
|
|
338
|
-
* // Create a new PDF document
|
|
339
|
-
* let document : PdfDocument = new PdfDocument();
|
|
340
|
-
* // Gets the viewer preferences of the document
|
|
341
|
-
* let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
|
|
342
|
-
* // Sets the page layout
|
|
343
|
-
* viewerPreferences.pageLayout = PdfPageLayout.TwoColumnLeft;
|
|
344
|
-
* // Destroy the document
|
|
345
|
-
* document.destroy();
|
|
346
|
-
* ```
|
|
347
|
-
*/
|
|
348
|
-
set pageLayout(value: PdfPageLayout) {
|
|
349
|
-
this._pageLayout = value;
|
|
350
|
-
this._catalog.items.setValue(this._dictionaryProperties.pageLayout, new PdfName(this._mapPageLayout(this._pageLayout)));
|
|
351
|
-
}
|
|
352
|
-
/**
|
|
353
|
-
* Gets the page scaling option to be selected
|
|
354
|
-
* when a print dialog is displayed for this document.
|
|
355
|
-
* ```typescript
|
|
356
|
-
* // Create a new PDF document
|
|
357
|
-
* let document : PdfDocument = new PdfDocument();
|
|
358
|
-
* // Gets the viewer preferences of the document
|
|
359
|
-
* let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
|
|
360
|
-
* // Gets the page scaling
|
|
361
|
-
* let pageScaling : PageScalingMode = viewerPreferences.pageScaling;
|
|
362
|
-
* // Destroy the document
|
|
363
|
-
* document.destroy();
|
|
364
|
-
* ```
|
|
365
|
-
*/
|
|
366
|
-
get pageScaling(): PageScalingMode {
|
|
367
|
-
return this._pageScaling;
|
|
368
|
-
}
|
|
369
|
-
/**
|
|
370
|
-
* Sets the page scaling option to be selected
|
|
371
|
-
* when a print dialog is displayed for this document.
|
|
372
|
-
* ```typescript
|
|
373
|
-
* // Create a new PDF document
|
|
374
|
-
* let document : PdfDocument = new PdfDocument();
|
|
375
|
-
* // Gets the viewer preferences of the document
|
|
376
|
-
* let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
|
|
377
|
-
* // Sets the page scaling
|
|
378
|
-
* viewerPreferences.pageScaling = PageScalingMode.None;
|
|
379
|
-
* // Destroy the document
|
|
380
|
-
* document.destroy();
|
|
381
|
-
* ```
|
|
382
|
-
*/
|
|
383
|
-
set pageScaling(value: PageScalingMode) {
|
|
384
|
-
this._pageScaling = value;
|
|
385
|
-
if (this._pageScaling === PageScalingMode.AppDefault && this._dictionary.items.containsKey(this._dictionaryProperties.printScaling)) {
|
|
386
|
-
this._dictionary.items.remove(this._dictionaryProperties.printScaling);
|
|
387
|
-
} else if (this._pageScaling === PageScalingMode.None) {
|
|
388
|
-
this._dictionary.items.setValue(this._dictionaryProperties.printScaling, new PdfName('None'));
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
/**
|
|
392
|
-
* Primivie element
|
|
393
|
-
*
|
|
394
|
-
* @private
|
|
395
|
-
*/
|
|
396
|
-
get element(): IPdfPrimitive {
|
|
397
|
-
return this._dictionary;
|
|
398
|
-
}
|
|
399
|
-
_mapDuplexMode(mode: DuplexMode): string {
|
|
400
|
-
switch (mode) {
|
|
401
|
-
case DuplexMode.Simplex:
|
|
402
|
-
return 'Simplex';
|
|
403
|
-
case DuplexMode.DuplexFlipShortEdge:
|
|
404
|
-
return 'DuplexFlipShortEdge';
|
|
405
|
-
case DuplexMode.DuplexFlipLongEdge:
|
|
406
|
-
return 'DuplexFlipLongEdge';
|
|
407
|
-
case DuplexMode.None:
|
|
408
|
-
return 'None';
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
_mapPageMode(mode: PdfPageMode): string {
|
|
412
|
-
switch (mode) {
|
|
413
|
-
case PdfPageMode.UseNone:
|
|
414
|
-
return 'UseNone';
|
|
415
|
-
case PdfPageMode.UseOutlines:
|
|
416
|
-
return 'UseOutlines';
|
|
417
|
-
case PdfPageMode.UseThumbs:
|
|
418
|
-
return 'UseThumbs';
|
|
419
|
-
case PdfPageMode.FullScreen:
|
|
420
|
-
return 'FullScreen';
|
|
421
|
-
case PdfPageMode.UseOC:
|
|
422
|
-
return 'UseOC';
|
|
423
|
-
case PdfPageMode.UseAttachments:
|
|
424
|
-
return 'UseAttachments';
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
_mapPageLayout(layout: PdfPageLayout): string {
|
|
428
|
-
switch (layout) {
|
|
429
|
-
case PdfPageLayout.SinglePage:
|
|
430
|
-
return 'SinglePage';
|
|
431
|
-
case PdfPageLayout.OneColumn:
|
|
432
|
-
return 'OneColumn';
|
|
433
|
-
case PdfPageLayout.TwoColumnLeft:
|
|
434
|
-
return 'TwoColumnLeft';
|
|
435
|
-
case PdfPageLayout.TwoColumnRight:
|
|
436
|
-
return 'TwoColumnRight';
|
|
437
|
-
case PdfPageLayout.TwoPageLeft:
|
|
438
|
-
return 'TwoPageLeft';
|
|
439
|
-
case PdfPageLayout.TwoPageRight:
|
|
440
|
-
return 'TwoPageRight';
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
/**
|
|
445
|
-
* Represents mode of document displaying.
|
|
446
|
-
* ```typescript
|
|
447
|
-
* // Create a new PDF document
|
|
448
|
-
* let document : PdfDocument = new PdfDocument();
|
|
449
|
-
* // Gets the viewer preferences of the document
|
|
450
|
-
* let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
|
|
451
|
-
* // Sets the page mode
|
|
452
|
-
* viewerPreferences.pageMode = PdfPageMode.UseOutlines;
|
|
453
|
-
* // Destroy the document
|
|
454
|
-
* document.destroy();
|
|
455
|
-
* ```
|
|
456
|
-
*/
|
|
457
|
-
export enum PdfPageMode {
|
|
458
|
-
/**
|
|
459
|
-
* Default value. Neither document outline nor thumbnail images visible.
|
|
460
|
-
*/
|
|
461
|
-
UseNone,
|
|
462
|
-
/**
|
|
463
|
-
* Document outline visible.
|
|
464
|
-
*/
|
|
465
|
-
UseOutlines,
|
|
466
|
-
/**
|
|
467
|
-
* Thumbnail images visible.
|
|
468
|
-
*/
|
|
469
|
-
UseThumbs,
|
|
470
|
-
/**
|
|
471
|
-
* Full-screen mode, with no menu bar, window controls, or any other window visible.
|
|
472
|
-
*/
|
|
473
|
-
FullScreen,
|
|
474
|
-
/**
|
|
475
|
-
* Optional content group panel visible.
|
|
476
|
-
*/
|
|
477
|
-
UseOC,
|
|
478
|
-
/**
|
|
479
|
-
* Attachments are visible.
|
|
480
|
-
*/
|
|
481
|
-
UseAttachments
|
|
482
|
-
}
|
|
483
|
-
/**
|
|
484
|
-
* A name object specifying the page layout to be used when the document is opened.
|
|
485
|
-
* ```typescript
|
|
486
|
-
* // Create a new PDF document
|
|
487
|
-
* let document : PdfDocument = new PdfDocument();
|
|
488
|
-
* // Gets the viewer preferences of the document
|
|
489
|
-
* let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
|
|
490
|
-
* // Sets the page layout
|
|
491
|
-
* viewerPreferences.pageLayout = PdfPageLayout.TwoColumnLeft;
|
|
492
|
-
* // Destroy the document
|
|
493
|
-
* document.destroy();
|
|
494
|
-
* ```
|
|
495
|
-
*/
|
|
496
|
-
export enum PdfPageLayout {
|
|
497
|
-
/**
|
|
498
|
-
* Default Value. Display one page at a time.
|
|
499
|
-
*/
|
|
500
|
-
SinglePage,
|
|
501
|
-
/**
|
|
502
|
-
* Display the pages in one column.
|
|
503
|
-
*/
|
|
504
|
-
OneColumn,
|
|
505
|
-
/**
|
|
506
|
-
* Display the pages in two columns, with odd numbered
|
|
507
|
-
* pages on the left.
|
|
508
|
-
*/
|
|
509
|
-
TwoColumnLeft,
|
|
510
|
-
/**
|
|
511
|
-
* Display the pages in two columns, with odd numbered
|
|
512
|
-
* pages on the right.
|
|
513
|
-
*/
|
|
514
|
-
TwoColumnRight,
|
|
515
|
-
/**
|
|
516
|
-
* Display the pages two at a time, with odd-numbered pages on the left.
|
|
517
|
-
*/
|
|
518
|
-
TwoPageLeft,
|
|
519
|
-
/**
|
|
520
|
-
* Display the pages two at a time, with odd-numbered pages on the right.
|
|
521
|
-
*/
|
|
522
|
-
TwoPageRight
|
|
523
|
-
}
|
|
524
|
-
/**
|
|
525
|
-
* The paper handling option to use when printing the file from the print dialog.
|
|
526
|
-
* ```typescript
|
|
527
|
-
* // Create a new PDF document
|
|
528
|
-
* let document : PdfDocument = new PdfDocument();
|
|
529
|
-
* // Gets the viewer preferences of the document
|
|
530
|
-
* let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
|
|
531
|
-
* // Sets the duplex
|
|
532
|
-
* viewerPreferences.duplex = DuplexMode.DuplexFlipLongEdge;
|
|
533
|
-
* // Destroy the document
|
|
534
|
-
* document.destroy();
|
|
535
|
-
* ```
|
|
536
|
-
*/
|
|
537
|
-
export enum DuplexMode {
|
|
538
|
-
/**
|
|
539
|
-
* Print single-sided.
|
|
540
|
-
*/
|
|
541
|
-
Simplex,
|
|
542
|
-
/**
|
|
543
|
-
* Duplex and flip on the short edge of the sheet.
|
|
544
|
-
*/
|
|
545
|
-
DuplexFlipShortEdge,
|
|
546
|
-
/**
|
|
547
|
-
* Duplex and flip on the long edge of the sheet.
|
|
548
|
-
*/
|
|
549
|
-
DuplexFlipLongEdge,
|
|
550
|
-
/**
|
|
551
|
-
* Default value.
|
|
552
|
-
*/
|
|
553
|
-
None
|
|
554
|
-
}
|
|
555
|
-
/**
|
|
556
|
-
* Specifies the different page scaling option that shall be selected
|
|
557
|
-
* when a print dialog is displayed for this document.
|
|
558
|
-
* ```typescript
|
|
559
|
-
* // Create a new PDF document
|
|
560
|
-
* let document : PdfDocument = new PdfDocument();
|
|
561
|
-
* // Gets the viewer preferences of the document
|
|
562
|
-
* let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
|
|
563
|
-
* // Sets the page scaling
|
|
564
|
-
* viewerPreferences.pageScaling = PageScalingMode.None;
|
|
565
|
-
* // Destroy the document
|
|
566
|
-
* document.destroy();
|
|
567
|
-
* ```
|
|
568
|
-
*/
|
|
569
|
-
export enum PageScalingMode {
|
|
570
|
-
/**
|
|
571
|
-
* Indicates the conforming reader’s default print scaling.
|
|
572
|
-
*/
|
|
573
|
-
AppDefault,
|
|
574
|
-
/**
|
|
575
|
-
* Indicates no page scaling.
|
|
576
|
-
*/
|
|
577
|
-
None
|
|
578
|
-
}
|