@syncfusion/ej2-pdf-export 21.2.10 → 22.1.37

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.
@@ -0,0 +1,624 @@
1
+ import { DictionaryProperties } from './../input-output/pdf-dictionary-properties';
2
+ import { PdfDictionary } from './../primitives/pdf-dictionary';
3
+ import { PdfBoolean } from './../primitives/pdf-boolean';
4
+ import { PdfName } from './../primitives/pdf-name';
5
+ /**
6
+ * Defines the way the document is to be presented on the screen or in print.
7
+ * ```typescript
8
+ * // Create a new PDF document
9
+ * let document : PdfDocument = new PdfDocument();
10
+ * // Gets viewer preferences
11
+ * let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
12
+ * // Destroy the document
13
+ * document.destroy();
14
+ * ```
15
+ */
16
+ var PdfViewerPreferences = /** @class */ (function () {
17
+ /**
18
+ * Initialize a new instance of `PdfViewerPreferences` class.
19
+ *
20
+ * @private
21
+ * ```
22
+ */
23
+ function PdfViewerPreferences(catalog) {
24
+ this._dictionaryProperties = new DictionaryProperties();
25
+ this._centerWindow = false;
26
+ this._fitWindow = false;
27
+ this._displayTitle = false;
28
+ this._splitWindow = false;
29
+ this._hideMenuBar = false;
30
+ this._hideToolBar = false;
31
+ this._hideWindowUI = false;
32
+ this._pageMode = PdfPageMode.UseNone;
33
+ this._pageLayout = PdfPageLayout.SinglePage;
34
+ this._dictionary = new PdfDictionary();
35
+ this._duplex = DuplexMode.None;
36
+ this._catalog = catalog;
37
+ }
38
+ Object.defineProperty(PdfViewerPreferences.prototype, "centerWindow", {
39
+ /**
40
+ * A flag specifying whether to position the document’s window in the center of the screen.
41
+ * ```typescript
42
+ * // Create a new PDF document
43
+ * let document : PdfDocument = new PdfDocument();
44
+ * // Gets the viewer preferences of the document
45
+ * let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
46
+ * // Gets the center window
47
+ * let centerWindow : boolean = viewerPreferences.centerWindow;
48
+ * // Destroy the document
49
+ * document.destroy();
50
+ * ```
51
+ */
52
+ get: function () {
53
+ return this._centerWindow;
54
+ },
55
+ /**
56
+ * A flag specifying whether to position the document’s window in the center of the screen.
57
+ * ```typescript
58
+ * // Create a new PDF document
59
+ * let document : PdfDocument = new PdfDocument();
60
+ * // Gets the viewer preferences of the document
61
+ * let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
62
+ * // Sets the center window
63
+ * viewerPreferences.centerWindow = true;
64
+ * // Destroy the document
65
+ * document.destroy();
66
+ * ```
67
+ */
68
+ set: function (value) {
69
+ this._centerWindow = value;
70
+ this._dictionary.items.setValue(this._dictionaryProperties.centerWindow, new PdfBoolean(this._centerWindow));
71
+ },
72
+ enumerable: true,
73
+ configurable: true
74
+ });
75
+ Object.defineProperty(PdfViewerPreferences.prototype, "displayTitle", {
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: function () {
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: function (value) {
110
+ this._displayTitle = value;
111
+ this._dictionary.items.setValue(this._dictionaryProperties.displayTitle, new PdfBoolean(this._displayTitle));
112
+ },
113
+ enumerable: true,
114
+ configurable: true
115
+ });
116
+ Object.defineProperty(PdfViewerPreferences.prototype, "fitWindow", {
117
+ /**
118
+ * A flag specifying whether to resize the document’s window to fit the size of the first
119
+ * displayed page.
120
+ * ```typescript
121
+ * // Create a new PDF document
122
+ * let document : PdfDocument = new PdfDocument();
123
+ * // Gets the viewer preferences of the document
124
+ * let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
125
+ * // Gets the fit window
126
+ * let fitWindow : boolean = viewerPreferences.fitWindow;
127
+ * // Destroy the document
128
+ * document.destroy();
129
+ * ```
130
+ */
131
+ get: function () {
132
+ return this._fitWindow;
133
+ },
134
+ /**
135
+ * A flag specifying whether to resize the document’s window to fit the size of the first
136
+ * displayed page.
137
+ * ```typescript
138
+ * // Create a new PDF document
139
+ * let document : PdfDocument = new PdfDocument();
140
+ * // Gets the viewer preferences of the document
141
+ * let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
142
+ * // Sets the fit window
143
+ * viewerPreferences.fitWindow = true;
144
+ * // Destroy the document
145
+ * document.destroy();
146
+ * ```
147
+ */
148
+ set: function (value) {
149
+ this._fitWindow = value;
150
+ this._dictionary.items.setValue(this._dictionaryProperties.fitWindow, new PdfBoolean(this._fitWindow));
151
+ },
152
+ enumerable: true,
153
+ configurable: true
154
+ });
155
+ Object.defineProperty(PdfViewerPreferences.prototype, "hideMenuBar", {
156
+ /**
157
+ * A flag specifying whether to hide the viewer application’s menu bar when the
158
+ * document is active.
159
+ * ```typescript
160
+ * // Create a new PDF document
161
+ * let document : PdfDocument = new PdfDocument();
162
+ * // Gets the viewer preferences of the document
163
+ * let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
164
+ * // Gets the hide menu bar
165
+ * let hideMenuBar: boolean = viewerPreferences.hideMenuBar;
166
+ * // Destroy the document
167
+ * document.destroy();
168
+ * ```
169
+ */
170
+ get: function () {
171
+ return this._hideMenuBar;
172
+ },
173
+ /**
174
+ * A flag specifying whether to hide the viewer application’s menu bar when the
175
+ * document is active.
176
+ * ```typescript
177
+ * // Create a new PDF document
178
+ * let document : PdfDocument = new PdfDocument();
179
+ * // Gets the viewer preferences of the document
180
+ * let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
181
+ * // Sets the hide menu bar
182
+ * viewerPreferences.hideMenuBar = true;
183
+ * // Destroy the document
184
+ * document.destroy();
185
+ * ```
186
+ */
187
+ set: function (value) {
188
+ this._hideMenuBar = value;
189
+ this._dictionary.items.setValue(this._dictionaryProperties.hideMenuBar, new PdfBoolean(this._hideMenuBar));
190
+ },
191
+ enumerable: true,
192
+ configurable: true
193
+ });
194
+ Object.defineProperty(PdfViewerPreferences.prototype, "hideToolBar", {
195
+ /**
196
+ * A flag specifying whether to hide the viewer application’s tool bar when the
197
+ * document is active.
198
+ * ```typescript
199
+ * // Create a new PDF document
200
+ * let document : PdfDocument = new PdfDocument();
201
+ * // Gets the viewer preferences of the document
202
+ * let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
203
+ * // Gets the hide tool bar
204
+ * let hideToolBar: boolean = viewerPreferences.hideToolBar;
205
+ * // Destroy the document
206
+ * document.destroy();
207
+ * ```
208
+ */
209
+ get: function () {
210
+ return this._hideToolBar;
211
+ },
212
+ /**
213
+ * A flag specifying whether to hide the viewer application’s tool bar when the
214
+ * document is active.
215
+ * ```typescript
216
+ * // Create a new PDF document
217
+ * let document : PdfDocument = new PdfDocument();
218
+ * // Gets the viewer preferences of the document
219
+ * let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
220
+ * // Sets the hide tool bar
221
+ * viewerPreferences.hideToolbar = true;
222
+ * // Destroy the document
223
+ * document.destroy();
224
+ * ```
225
+ */
226
+ set: function (value) {
227
+ this._hideToolBar = value;
228
+ this._dictionary.items.setValue(this._dictionaryProperties.hideToolBar, new PdfBoolean(this._hideToolBar));
229
+ },
230
+ enumerable: true,
231
+ configurable: true
232
+ });
233
+ Object.defineProperty(PdfViewerPreferences.prototype, "hideWindowUI", {
234
+ /**
235
+ * A flag specifying whether to hide user interface elements in the document’s window
236
+ * (such as scroll bars and navigation controls), leaving only the document’s contents displayed.
237
+ * ```typescript
238
+ * // Create a new PDF document
239
+ * let document : PdfDocument = new PdfDocument();
240
+ * // Gets the viewer preferences of the document
241
+ * let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
242
+ * // Gets the hide window UI
243
+ * let hideWindowUI: boolean = viewerPreferences.hideWindowUI;
244
+ * // Destroy the document
245
+ * document.destroy();
246
+ * ```
247
+ */
248
+ get: function () {
249
+ return this._hideWindowUI;
250
+ },
251
+ /**
252
+ * A flag specifying whether to hide user interface elements in the document’s window
253
+ * (such as scroll bars and navigation controls), leaving only the document’s contents displayed.
254
+ * ```typescript
255
+ * // Create a new PDF document
256
+ * let document : PdfDocument = new PdfDocument();
257
+ * // Gets the viewer preferences of the document
258
+ * let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
259
+ * // Sets the hide window UI
260
+ * viewerPreferences.hideWindowUI = true;
261
+ * // Destroy the document
262
+ * document.destroy();
263
+ * ```
264
+ */
265
+ set: function (value) {
266
+ this._hideWindowUI = value;
267
+ this._dictionary.items.setValue(this._dictionaryProperties.hideWindowUI, new PdfBoolean(this._hideWindowUI));
268
+ },
269
+ enumerable: true,
270
+ configurable: true
271
+ });
272
+ Object.defineProperty(PdfViewerPreferences.prototype, "pageMode", {
273
+ /**
274
+ * A name object specifying how the document should be displayed when opened.
275
+ * ```typescript
276
+ * // Create a new PDF document
277
+ * let document : PdfDocument = new PdfDocument();
278
+ * // Gets the viewer preferences of the document
279
+ * let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
280
+ * // Gets the page mode
281
+ * let pageMode: PdfPageMode = viewerPreferences.pageMode;
282
+ * // Destroy the document
283
+ * document.destroy();
284
+ * ```
285
+ */
286
+ get: function () {
287
+ return this._pageMode;
288
+ },
289
+ /**
290
+ * A name object specifying how the document should be displayed when opened.
291
+ * ```typescript
292
+ * // Create a new PDF document
293
+ * let document : PdfDocument = new PdfDocument();
294
+ * // Gets the viewer preferences of the document
295
+ * let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
296
+ * // Sets the page mode
297
+ * viewerPreferences.pageMode = PdfPageMode.UseOutlines;
298
+ * // Destroy the document
299
+ * document.destroy();
300
+ * ```
301
+ */
302
+ set: function (value) {
303
+ this._pageMode = value;
304
+ this._catalog.items.setValue(this._dictionaryProperties.pageMode, new PdfName(this._mapPageMode(this._pageMode)));
305
+ },
306
+ enumerable: true,
307
+ configurable: true
308
+ });
309
+ Object.defineProperty(PdfViewerPreferences.prototype, "duplex", {
310
+ /**
311
+ * Gets print duplex mode handling option to use when printing the file from the print dialog.
312
+ * ```typescript
313
+ * // Create a new PDF document
314
+ * let document : PdfDocument = new PdfDocument();
315
+ * // Gets the viewer preferences of the document
316
+ * let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
317
+ * // Gets the duplex
318
+ * let duplex : DuplexMode = viewerPreferences.duplex;
319
+ * // Destroy the document
320
+ * document.destroy();
321
+ * ```
322
+ */
323
+ get: function () {
324
+ return this._duplex;
325
+ },
326
+ /**
327
+ * Sets print duplex mode handling option to use when printing the file from the print dialog.
328
+ * ```typescript
329
+ * // Create a new PDF document
330
+ * let document : PdfDocument = new PdfDocument();
331
+ * // Gets the viewer preferences of the document
332
+ * let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
333
+ * // Sets the duplex
334
+ * viewerPreferences.duplex = DuplexMode.DuplexFlipLongEdge;
335
+ * // Destroy the document
336
+ * document.destroy();
337
+ * ```
338
+ */
339
+ set: function (value) {
340
+ this._duplex = value;
341
+ this._catalog.items.setValue(this._dictionaryProperties.duplex, new PdfName(this._mapDuplexMode(this._duplex)));
342
+ },
343
+ enumerable: true,
344
+ configurable: true
345
+ });
346
+ Object.defineProperty(PdfViewerPreferences.prototype, "pageLayout", {
347
+ /**
348
+ * A name object specifying the page layout to be used when the document is opened.
349
+ * ```typescript
350
+ * // Create a new PDF document
351
+ * let document : PdfDocument = new PdfDocument();
352
+ * // Gets the viewer preferences of the document
353
+ * let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
354
+ * // Gets the page layout
355
+ * let pageLayout : PdfPageLayout = viewerPreferences.pageLayout;
356
+ * // Destroy the document
357
+ * document.destroy();
358
+ * ```
359
+ */
360
+ get: function () {
361
+ return this._pageLayout;
362
+ },
363
+ /**
364
+ * A name object specifying the page layout to be used when the document is opened.
365
+ * ```typescript
366
+ * // Create a new PDF document
367
+ * let document : PdfDocument = new PdfDocument();
368
+ * // Gets the viewer preferences of the document
369
+ * let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
370
+ * // Sets the page layout
371
+ * viewerPreferences.pageLayout = PdfPageLayout.TwoColumnLeft;
372
+ * // Destroy the document
373
+ * document.destroy();
374
+ * ```
375
+ */
376
+ set: function (value) {
377
+ this._pageLayout = value;
378
+ this._catalog.items.setValue(this._dictionaryProperties.pageLayout, new PdfName(this._mapPageLayout(this._pageLayout)));
379
+ },
380
+ enumerable: true,
381
+ configurable: true
382
+ });
383
+ Object.defineProperty(PdfViewerPreferences.prototype, "pageScaling", {
384
+ /**
385
+ * Gets the page scaling option to be selected
386
+ * when a print dialog is displayed for this document.
387
+ * ```typescript
388
+ * // Create a new PDF document
389
+ * let document : PdfDocument = new PdfDocument();
390
+ * // Gets the viewer preferences of the document
391
+ * let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
392
+ * // Gets the page scaling
393
+ * let pageScaling : PageScalingMode = viewerPreferences.pageScaling;
394
+ * // Destroy the document
395
+ * document.destroy();
396
+ * ```
397
+ */
398
+ get: function () {
399
+ return this._pageScaling;
400
+ },
401
+ /**
402
+ * Sets the page scaling option to be selected
403
+ * when a print dialog is displayed for this document.
404
+ * ```typescript
405
+ * // Create a new PDF document
406
+ * let document : PdfDocument = new PdfDocument();
407
+ * // Gets the viewer preferences of the document
408
+ * let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
409
+ * // Sets the page scaling
410
+ * viewerPreferences.pageScaling = PageScalingMode.None;
411
+ * // Destroy the document
412
+ * document.destroy();
413
+ * ```
414
+ */
415
+ set: function (value) {
416
+ this._pageScaling = value;
417
+ if (this._pageScaling === PageScalingMode.AppDefault && this._dictionary.items.containsKey(this._dictionaryProperties.printScaling)) {
418
+ this._dictionary.items.remove(this._dictionaryProperties.printScaling);
419
+ }
420
+ else {
421
+ this._dictionary.items.setValue(this._dictionaryProperties.printScaling, new PdfName('None'));
422
+ }
423
+ },
424
+ enumerable: true,
425
+ configurable: true
426
+ });
427
+ Object.defineProperty(PdfViewerPreferences.prototype, "element", {
428
+ /**
429
+ * Primivie element
430
+ *
431
+ * @private
432
+ */
433
+ get: function () {
434
+ return this._dictionary;
435
+ },
436
+ enumerable: true,
437
+ configurable: true
438
+ });
439
+ PdfViewerPreferences.prototype._mapDuplexMode = function (mode) {
440
+ switch (mode) {
441
+ case DuplexMode.Simplex:
442
+ return 'Simplex';
443
+ case DuplexMode.DuplexFlipShortEdge:
444
+ return 'DuplexFlipShortEdge';
445
+ case DuplexMode.DuplexFlipLongEdge:
446
+ return 'DuplexFlipLongEdge';
447
+ case DuplexMode.None:
448
+ return 'None';
449
+ }
450
+ };
451
+ PdfViewerPreferences.prototype._mapPageMode = function (mode) {
452
+ switch (mode) {
453
+ case PdfPageMode.UseNone:
454
+ return 'UseNone';
455
+ case PdfPageMode.UseOutlines:
456
+ return 'UseOutlines';
457
+ case PdfPageMode.UseThumbs:
458
+ return 'UseThumbs';
459
+ case PdfPageMode.FullScreen:
460
+ return 'FullScreen';
461
+ case PdfPageMode.UseOC:
462
+ return 'UseOC';
463
+ case PdfPageMode.UseAttachments:
464
+ return 'UseAttachments';
465
+ }
466
+ };
467
+ PdfViewerPreferences.prototype._mapPageLayout = function (layout) {
468
+ switch (layout) {
469
+ case PdfPageLayout.SinglePage:
470
+ return 'SinglePage';
471
+ case PdfPageLayout.OneColumn:
472
+ return 'OneColumn';
473
+ case PdfPageLayout.TwoColumnLeft:
474
+ return 'TwoColumnLeft';
475
+ case PdfPageLayout.TwoColumnRight:
476
+ return 'TwoColumnRight';
477
+ case PdfPageLayout.TwoPageLeft:
478
+ return 'TwoPageLeft';
479
+ case PdfPageLayout.TwoPageRight:
480
+ return 'TwoPageRight';
481
+ }
482
+ };
483
+ return PdfViewerPreferences;
484
+ }());
485
+ export { PdfViewerPreferences };
486
+ /**
487
+ * Represents mode of document displaying.
488
+ * ```typescript
489
+ * // Create a new PDF document
490
+ * let document : PdfDocument = new PdfDocument();
491
+ * // Gets the viewer preferences of the document
492
+ * let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
493
+ * // Sets the page mode
494
+ * viewerPreferences.pageMode = PdfPageMode.UseOutlines;
495
+ * // Destroy the document
496
+ * document.destroy();
497
+ * ```
498
+ */
499
+ export var PdfPageMode;
500
+ (function (PdfPageMode) {
501
+ /**
502
+ * Default value. Neither document outline nor thumbnail images visible.
503
+ */
504
+ PdfPageMode[PdfPageMode["UseNone"] = 0] = "UseNone";
505
+ /**
506
+ * Document outline visible.
507
+ */
508
+ PdfPageMode[PdfPageMode["UseOutlines"] = 1] = "UseOutlines";
509
+ /**
510
+ * Thumbnail images visible.
511
+ */
512
+ PdfPageMode[PdfPageMode["UseThumbs"] = 2] = "UseThumbs";
513
+ /**
514
+ * Full-screen mode, with no menu bar, window controls, or any other window visible.
515
+ */
516
+ PdfPageMode[PdfPageMode["FullScreen"] = 3] = "FullScreen";
517
+ /**
518
+ * Optional content group panel visible.
519
+ */
520
+ PdfPageMode[PdfPageMode["UseOC"] = 4] = "UseOC";
521
+ /**
522
+ * Attachments are visible.
523
+ */
524
+ PdfPageMode[PdfPageMode["UseAttachments"] = 5] = "UseAttachments";
525
+ })(PdfPageMode || (PdfPageMode = {}));
526
+ /**
527
+ * A name object specifying the page layout to be used when the document is opened.
528
+ * ```typescript
529
+ * // Create a new PDF document
530
+ * let document : PdfDocument = new PdfDocument();
531
+ * // Gets the viewer preferences of the document
532
+ * let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
533
+ * // Sets the page layout
534
+ * viewerPreferences.pageLayout = PdfPageLayout.TwoColumnLeft;
535
+ * // Destroy the document
536
+ * document.destroy();
537
+ * ```
538
+ */
539
+ export var PdfPageLayout;
540
+ (function (PdfPageLayout) {
541
+ /**
542
+ * Default Value. Display one page at a time.
543
+ */
544
+ PdfPageLayout[PdfPageLayout["SinglePage"] = 0] = "SinglePage";
545
+ /**
546
+ * Display the pages in one column.
547
+ */
548
+ PdfPageLayout[PdfPageLayout["OneColumn"] = 1] = "OneColumn";
549
+ /**
550
+ * Display the pages in two columns, with odd numbered
551
+ * pages on the left.
552
+ */
553
+ PdfPageLayout[PdfPageLayout["TwoColumnLeft"] = 2] = "TwoColumnLeft";
554
+ /**
555
+ * Display the pages in two columns, with odd numbered
556
+ * pages on the right.
557
+ */
558
+ PdfPageLayout[PdfPageLayout["TwoColumnRight"] = 3] = "TwoColumnRight";
559
+ /**
560
+ * Display the pages two at a time, with odd-numbered pages on the left.
561
+ */
562
+ PdfPageLayout[PdfPageLayout["TwoPageLeft"] = 4] = "TwoPageLeft";
563
+ /**
564
+ * Display the pages two at a time, with odd-numbered pages on the right.
565
+ */
566
+ PdfPageLayout[PdfPageLayout["TwoPageRight"] = 5] = "TwoPageRight";
567
+ })(PdfPageLayout || (PdfPageLayout = {}));
568
+ /**
569
+ * The paper handling option to use when printing the file from the print dialog.
570
+ * ```typescript
571
+ * // Create a new PDF document
572
+ * let document : PdfDocument = new PdfDocument();
573
+ * // Gets the viewer preferences of the document
574
+ * let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
575
+ * // Sets the duplex
576
+ * viewerPreferences.duplex = DuplexMode.DuplexFlipLongEdge;
577
+ * // Destroy the document
578
+ * document.destroy();
579
+ * ```
580
+ */
581
+ export var DuplexMode;
582
+ (function (DuplexMode) {
583
+ /**
584
+ * Print single-sided.
585
+ */
586
+ DuplexMode[DuplexMode["Simplex"] = 0] = "Simplex";
587
+ /**
588
+ * Duplex and flip on the short edge of the sheet.
589
+ */
590
+ DuplexMode[DuplexMode["DuplexFlipShortEdge"] = 1] = "DuplexFlipShortEdge";
591
+ /**
592
+ * Duplex and flip on the long edge of the sheet.
593
+ */
594
+ DuplexMode[DuplexMode["DuplexFlipLongEdge"] = 2] = "DuplexFlipLongEdge";
595
+ /**
596
+ * Default value.
597
+ */
598
+ DuplexMode[DuplexMode["None"] = 3] = "None";
599
+ })(DuplexMode || (DuplexMode = {}));
600
+ /**
601
+ * Specifies the different page scaling option that shall be selected
602
+ * when a print dialog is displayed for this document.
603
+ * ```typescript
604
+ * // Create a new PDF document
605
+ * let document : PdfDocument = new PdfDocument();
606
+ * // Gets the viewer preferences of the document
607
+ * let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
608
+ * // Sets the page scaling
609
+ * viewerPreferences.pageScaling = PageScalingMode.None;
610
+ * // Destroy the document
611
+ * document.destroy();
612
+ * ```
613
+ */
614
+ export var PageScalingMode;
615
+ (function (PageScalingMode) {
616
+ /**
617
+ * Indicates the conforming reader’s default print scaling.
618
+ */
619
+ PageScalingMode[PageScalingMode["AppDefault"] = 0] = "AppDefault";
620
+ /**
621
+ * Indicates no page scaling.
622
+ */
623
+ PageScalingMode[PageScalingMode["None"] = 1] = "None";
624
+ })(PageScalingMode || (PageScalingMode = {}));
@@ -505,6 +505,61 @@ export declare class DictionaryProperties {
505
505
  * @private
506
506
  */
507
507
  readonly yStep: string;
508
+ /**
509
+ * Specifies the value of viewer preferences.
510
+ * @private
511
+ */
512
+ readonly viewerPreferences: string;
513
+ /**
514
+ * Specifies the value of center window.
515
+ * @private
516
+ */
517
+ readonly centerWindow: string;
518
+ /**
519
+ * Specifies the value of display title.
520
+ * @private
521
+ */
522
+ readonly displayTitle: string;
523
+ /**
524
+ * Specifies the value of fit window.
525
+ * @private
526
+ */
527
+ readonly fitWindow: string;
528
+ /**
529
+ * Specifies the value of hide menu bar.
530
+ * @private
531
+ */
532
+ readonly hideMenuBar: string;
533
+ /**
534
+ * Specifies the value of hide tool bar.
535
+ * @private
536
+ */
537
+ readonly hideToolBar: string;
538
+ /**
539
+ * Specifies the value of hide window UI.
540
+ * @private
541
+ */
542
+ readonly hideWindowUI: string;
543
+ /**
544
+ * Specifies the value of page mode.
545
+ * @private
546
+ */
547
+ readonly pageMode: string;
548
+ /**
549
+ * Specifies the value of page layout.
550
+ * @private
551
+ */
552
+ readonly pageLayout: string;
553
+ /**
554
+ * Specifies the value of duplex.
555
+ * @private
556
+ */
557
+ readonly duplex: string;
558
+ /**
559
+ * Specifies the value of print scaling.
560
+ * @private
561
+ */
562
+ readonly printScaling: string;
508
563
  /**
509
564
  * Initialize an instance for `PdfDictionaryProperties` class.
510
565
  * @private