@syncfusion/ej2-pdf-export 20.3.56 → 20.4.40
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 +16 -1
- package/dist/ej2-pdf-export.min.js +1 -1
- package/dist/ej2-pdf-export.umd.min.js +1 -1
- package/dist/global/ej2-pdf-export.min.js +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +8 -8
- package/dist/ts/implementation/actions/action.ts +0 -76
- package/dist/ts/implementation/actions/uri-action.ts +0 -52
- package/dist/ts/implementation/annotations/action-link-annotation.ts +0 -43
- package/dist/ts/implementation/annotations/annotation-collection.ts +0 -159
- package/dist/ts/implementation/annotations/annotation.ts +0 -241
- package/dist/ts/implementation/annotations/document-link-annotation.ts +0 -118
- package/dist/ts/implementation/annotations/link-annotation.ts +0 -32
- package/dist/ts/implementation/annotations/pdf-text-web-link.ts +0 -265
- package/dist/ts/implementation/annotations/uri-annotation.ts +0 -86
- package/dist/ts/implementation/collections/dictionary.ts +0 -150
- package/dist/ts/implementation/collections/object-object-pair/dictionary.ts +0 -125
- package/dist/ts/implementation/collections/utils.ts +0 -38
- package/dist/ts/implementation/document/automatic-fields/automatic-field-info-collection.ts +0 -39
- package/dist/ts/implementation/document/automatic-fields/automatic-field-info.ts +0 -108
- package/dist/ts/implementation/document/automatic-fields/automatic-field.ts +0 -127
- package/dist/ts/implementation/document/automatic-fields/composite-field.ts +0 -76
- package/dist/ts/implementation/document/automatic-fields/multiple-value-field.ts +0 -37
- package/dist/ts/implementation/document/automatic-fields/page-count-field.ts +0 -75
- package/dist/ts/implementation/document/automatic-fields/pdf-numbers-convertor.ts +0 -157
- 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.ts +0 -60
- package/dist/ts/implementation/document/automatic-fields/single-value-field.ts +0 -48
- package/dist/ts/implementation/document/pdf-catalog.ts +0 -52
- package/dist/ts/implementation/document/pdf-document-base.ts +0 -166
- package/dist/ts/implementation/document/pdf-document-template.ts +0 -310
- package/dist/ts/implementation/document/pdf-document.ts +0 -342
- package/dist/ts/implementation/drawing/pdf-drawing.ts +0 -218
- package/dist/ts/implementation/general/enum.ts +0 -21
- package/dist/ts/implementation/general/functions/pdf-function.ts +0 -66
- package/dist/ts/implementation/general/functions/pdf-sampled-function.ts +0 -62
- package/dist/ts/implementation/general/pdf-cache-collection.ts +0 -97
- package/dist/ts/implementation/general/pdf-collection.ts +0 -41
- package/dist/ts/implementation/general/pdf-destination.ts +0 -170
- package/dist/ts/implementation/graphics/brushes/enum.ts +0 -237
- package/dist/ts/implementation/graphics/brushes/pdf-blend.ts +0 -294
- package/dist/ts/implementation/graphics/brushes/pdf-brush.ts +0 -68
- package/dist/ts/implementation/graphics/brushes/pdf-brushes.ts +0 -2438
- package/dist/ts/implementation/graphics/brushes/pdf-color-blend.ts +0 -295
- package/dist/ts/implementation/graphics/brushes/pdf-gradient-brush.ts +0 -311
- package/dist/ts/implementation/graphics/brushes/pdf-linear-gradient-brush.ts +0 -406
- package/dist/ts/implementation/graphics/brushes/pdf-radial-gradient-brush.ts +0 -290
- package/dist/ts/implementation/graphics/brushes/pdf-solid-brush.ts +0 -107
- package/dist/ts/implementation/graphics/brushes/pdf-tiling-brush.ts +0 -304
- package/dist/ts/implementation/graphics/constants.ts +0 -31
- package/dist/ts/implementation/graphics/enum.ts +0 -413
- package/dist/ts/implementation/graphics/figures/arc.ts +0 -133
- package/dist/ts/implementation/graphics/figures/base/draw-element.ts +0 -59
- package/dist/ts/implementation/graphics/figures/base/element-layouter.ts +0 -260
- package/dist/ts/implementation/graphics/figures/base/fill-element.ts +0 -72
- package/dist/ts/implementation/graphics/figures/base/graphics-element.ts +0 -34
- package/dist/ts/implementation/graphics/figures/base/pdf-shape-element.ts +0 -69
- package/dist/ts/implementation/graphics/figures/base/shape-layouter.ts +0 -276
- package/dist/ts/implementation/graphics/figures/base/text-layouter.ts +0 -205
- package/dist/ts/implementation/graphics/figures/ellipse-part.ts +0 -76
- package/dist/ts/implementation/graphics/figures/enum.ts +0 -80
- package/dist/ts/implementation/graphics/figures/layout-element.ts +0 -132
- package/dist/ts/implementation/graphics/figures/path.ts +0 -646
- package/dist/ts/implementation/graphics/figures/pdf-template.ts +0 -205
- package/dist/ts/implementation/graphics/figures/rectangle-area.ts +0 -108
- package/dist/ts/implementation/graphics/figures/text-element.ts +0 -445
- package/dist/ts/implementation/graphics/fonts/enum.ts +0 -385
- package/dist/ts/implementation/graphics/fonts/pdf-font-metrics.ts +0 -248
- package/dist/ts/implementation/graphics/fonts/pdf-font.ts +0 -316
- package/dist/ts/implementation/graphics/fonts/pdf-standard-font-metrics-factory.ts +0 -606
- package/dist/ts/implementation/graphics/fonts/pdf-standard-font.ts +0 -243
- package/dist/ts/implementation/graphics/fonts/pdf-string-format.ts +0 -474
- package/dist/ts/implementation/graphics/fonts/pdf-true-type-font.ts +0 -165
- package/dist/ts/implementation/graphics/fonts/rtl/rtl-bidirectional.ts +0 -958
- package/dist/ts/implementation/graphics/fonts/rtl/rtl-text-shape.ts +0 -374
- package/dist/ts/implementation/graphics/fonts/rtl-renderer.ts +0 -255
- package/dist/ts/implementation/graphics/fonts/string-layouter.ts +0 -617
- package/dist/ts/implementation/graphics/fonts/string-tokenizer.ts +0 -275
- package/dist/ts/implementation/graphics/fonts/ttf-OS2-Table.ts +0 -206
- package/dist/ts/implementation/graphics/fonts/ttf-apple-cmap-sub-table.ts +0 -18
- package/dist/ts/implementation/graphics/fonts/ttf-cmap-sub-table.ts +0 -18
- package/dist/ts/implementation/graphics/fonts/ttf-cmap-table.ts +0 -14
- package/dist/ts/implementation/graphics/fonts/ttf-glyph-header.ts +0 -26
- package/dist/ts/implementation/graphics/fonts/ttf-glyph-info.ts +0 -35
- package/dist/ts/implementation/graphics/fonts/ttf-head-table.ts +0 -94
- package/dist/ts/implementation/graphics/fonts/ttf-horizontal-header-table.ts +0 -56
- package/dist/ts/implementation/graphics/fonts/ttf-loca-table.ts +0 -10
- package/dist/ts/implementation/graphics/fonts/ttf-long-hor-metric.ts +0 -14
- package/dist/ts/implementation/graphics/fonts/ttf-metrics.ts +0 -106
- package/dist/ts/implementation/graphics/fonts/ttf-microsoft-cmap-sub-table.ts +0 -58
- package/dist/ts/implementation/graphics/fonts/ttf-name-record.ts +0 -33
- package/dist/ts/implementation/graphics/fonts/ttf-name-table.ts +0 -22
- package/dist/ts/implementation/graphics/fonts/ttf-post-table.ts +0 -42
- package/dist/ts/implementation/graphics/fonts/ttf-reader.ts +0 -1254
- package/dist/ts/implementation/graphics/fonts/ttf-table-info.ts +0 -26
- package/dist/ts/implementation/graphics/fonts/ttf-trimmed-cmap-sub-table.ts +0 -26
- package/dist/ts/implementation/graphics/fonts/unicode-true-type-font.ts +0 -577
- package/dist/ts/implementation/graphics/images/byte-array.ts +0 -137
- package/dist/ts/implementation/graphics/images/image-decoder.ts +0 -437
- package/dist/ts/implementation/graphics/images/pdf-bitmap.ts +0 -110
- package/dist/ts/implementation/graphics/images/pdf-image.ts +0 -132
- package/dist/ts/implementation/graphics/pdf-color.ts +0 -478
- package/dist/ts/implementation/graphics/pdf-graphics.ts +0 -2424
- package/dist/ts/implementation/graphics/pdf-margins.ts +0 -124
- package/dist/ts/implementation/graphics/pdf-pen.ts +0 -370
- package/dist/ts/implementation/graphics/pdf-resources.ts +0 -300
- package/dist/ts/implementation/graphics/pdf-transformation-matrix.ts +0 -246
- package/dist/ts/implementation/graphics/pdf-transparency.ts +0 -93
- package/dist/ts/implementation/graphics/unit-convertor.ts +0 -96
- package/dist/ts/implementation/input-output/big-endian-writer.ts +0 -121
- package/dist/ts/implementation/input-output/cross-table.ts +0 -21
- package/dist/ts/implementation/input-output/enum.ts +0 -16
- package/dist/ts/implementation/input-output/pdf-cross-table.ts +0 -524
- package/dist/ts/implementation/input-output/pdf-dictionary-properties.ts +0 -515
- package/dist/ts/implementation/input-output/pdf-main-object-collection.ts +0 -194
- package/dist/ts/implementation/input-output/pdf-operators.ts +0 -363
- package/dist/ts/implementation/input-output/pdf-stream-writer.ts +0 -681
- package/dist/ts/implementation/input-output/pdf-writer.ts +0 -88
- package/dist/ts/implementation/pages/enum.ts +0 -201
- package/dist/ts/implementation/pages/page-added-event-arguments.ts +0 -39
- package/dist/ts/implementation/pages/pdf-document-page-collection.ts +0 -180
- package/dist/ts/implementation/pages/pdf-page-base.ts +0 -181
- package/dist/ts/implementation/pages/pdf-page-layer-collection.ts +0 -348
- package/dist/ts/implementation/pages/pdf-page-layer.ts +0 -271
- package/dist/ts/implementation/pages/pdf-page-settings.ts +0 -192
- package/dist/ts/implementation/pages/pdf-page-size.ts +0 -162
- package/dist/ts/implementation/pages/pdf-page-template-element.ts +0 -659
- package/dist/ts/implementation/pages/pdf-page.ts +0 -235
- package/dist/ts/implementation/pages/pdf-section-collection.ts +0 -187
- package/dist/ts/implementation/pages/pdf-section-page-collection.ts +0 -61
- package/dist/ts/implementation/pages/pdf-section-templates.ts +0 -96
- package/dist/ts/implementation/pages/pdf-section.ts +0 -644
- package/dist/ts/implementation/primitives/pdf-array.ts +0 -386
- package/dist/ts/implementation/primitives/pdf-boolean.ts +0 -119
- package/dist/ts/implementation/primitives/pdf-dictionary.ts +0 -513
- package/dist/ts/implementation/primitives/pdf-name.ts +0 -218
- package/dist/ts/implementation/primitives/pdf-number.ts +0 -165
- package/dist/ts/implementation/primitives/pdf-reference.ts +0 -430
- package/dist/ts/implementation/primitives/pdf-stream.ts +0 -336
- package/dist/ts/implementation/primitives/pdf-string.ts +0 -397
- package/dist/ts/implementation/structured-elements/grid/layout/grid-layouter.ts +0 -2027
- package/dist/ts/implementation/structured-elements/grid/pdf-grid-cell.ts +0 -1189
- package/dist/ts/implementation/structured-elements/grid/pdf-grid-column.ts +0 -206
- package/dist/ts/implementation/structured-elements/grid/pdf-grid-row.ts +0 -470
- package/dist/ts/implementation/structured-elements/grid/pdf-grid.ts +0 -853
- package/dist/ts/implementation/structured-elements/grid/styles/pdf-borders.ts +0 -240
- package/dist/ts/implementation/structured-elements/grid/styles/style.ts +0 -424
- package/dist/ts/implementation/structured-elements/tables/light-tables/enum.ts +0 -16
- package/dist/ts/interfaces/i-pdf-cache.ts +0 -23
- package/dist/ts/interfaces/i-pdf-changable.ts +0 -17
- package/dist/ts/interfaces/i-pdf-clonable.ts +0 -12
- package/dist/ts/interfaces/i-pdf-primitives.ts +0 -45
- package/dist/ts/interfaces/i-pdf-true-type-font.ts +0 -48
- package/dist/ts/interfaces/i-pdf-wrapper.ts +0 -13
- package/dist/ts/interfaces/i-pdf-writer.ts +0 -29
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* PdfCacheCollection.ts class for EJ2-PDF
|
|
3
|
-
*/
|
|
4
|
-
import { Dictionary } from './../collections/dictionary';
|
|
5
|
-
import { PdfFont } from './../graphics/fonts/pdf-font';
|
|
6
|
-
import { IPdfCache } from './../../interfaces/i-pdf-cache';
|
|
7
|
-
/**
|
|
8
|
-
* `Collection of the cached objects`.
|
|
9
|
-
* @private
|
|
10
|
-
*/
|
|
11
|
-
export class PdfCacheCollection {
|
|
12
|
-
// Fields
|
|
13
|
-
/**
|
|
14
|
-
* Stores the similar `objects`.
|
|
15
|
-
* @private
|
|
16
|
-
*/
|
|
17
|
-
private referenceObjects : Object[][];
|
|
18
|
-
/**
|
|
19
|
-
* Stores the references of font with GUID `objects`.
|
|
20
|
-
* @private
|
|
21
|
-
*/
|
|
22
|
-
private pdfFontCollection : Dictionary<string, PdfFont>;
|
|
23
|
-
// Constructors
|
|
24
|
-
/**
|
|
25
|
-
* Initializes a new instance of the `PdfCacheCollection` class.
|
|
26
|
-
* @private
|
|
27
|
-
*/
|
|
28
|
-
public constructor() {
|
|
29
|
-
this.referenceObjects = [];
|
|
30
|
-
this.pdfFontCollection = new Dictionary<string, PdfFont>();
|
|
31
|
-
}
|
|
32
|
-
// Public methods
|
|
33
|
-
/**
|
|
34
|
-
* `Searches` for the similar cached object. If is not found - adds the object to the cache.
|
|
35
|
-
* @private
|
|
36
|
-
*/
|
|
37
|
-
public search(obj : IPdfCache) : IPdfCache {
|
|
38
|
-
let result : IPdfCache = null;
|
|
39
|
-
let group : Object[] = this.getGroup(obj);
|
|
40
|
-
if (group == null) {
|
|
41
|
-
group = this.createNewGroup();
|
|
42
|
-
} else if (group.length > 0) {
|
|
43
|
-
result = group[0] as IPdfCache;
|
|
44
|
-
}
|
|
45
|
-
group.push(obj);
|
|
46
|
-
return result;
|
|
47
|
-
}
|
|
48
|
-
// Implementation
|
|
49
|
-
/**
|
|
50
|
-
* `Creates` a new group.
|
|
51
|
-
* @private
|
|
52
|
-
*/
|
|
53
|
-
public createNewGroup() : Object[] {
|
|
54
|
-
let group : Object[] = [];
|
|
55
|
-
this.referenceObjects.push(group);
|
|
56
|
-
return group;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* `Find and Return` a group.
|
|
60
|
-
* @private
|
|
61
|
-
*/
|
|
62
|
-
public getGroup(result : IPdfCache) : Object[] {
|
|
63
|
-
let group : Object[] = null;
|
|
64
|
-
if (result !== null) {
|
|
65
|
-
let len : number = this.referenceObjects.length;
|
|
66
|
-
for (let i : number = 0; i < len; i++) {
|
|
67
|
-
if (this.referenceObjects.length > 0) {
|
|
68
|
-
let tGroup : Object[] = this.referenceObjects[i];
|
|
69
|
-
if (tGroup.length > 0) {
|
|
70
|
-
let representative : IPdfCache = tGroup[0] as IPdfCache;
|
|
71
|
-
if (result.equalsTo(representative)) {
|
|
72
|
-
group = tGroup;
|
|
73
|
-
break;
|
|
74
|
-
}
|
|
75
|
-
} else {
|
|
76
|
-
this.removeGroup(tGroup);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
len = this.referenceObjects.length;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
return group;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Remove a group from the storage.
|
|
86
|
-
*/
|
|
87
|
-
public removeGroup(group : Object[]) : void {
|
|
88
|
-
if (group !== null) {
|
|
89
|
-
let index : number = this.referenceObjects.indexOf(group);
|
|
90
|
-
this.referenceObjects.slice(index, index + 1);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
public destroy() : void {
|
|
94
|
-
this.pdfFontCollection = undefined;
|
|
95
|
-
this.referenceObjects = undefined;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* PdfCollection.ts class for EJ2-PDF
|
|
3
|
-
* The class used to handle the collection of PdF objects.
|
|
4
|
-
*/
|
|
5
|
-
export class PdfCollection {
|
|
6
|
-
// Fields
|
|
7
|
-
/**
|
|
8
|
-
* Stores the `objects` as array.
|
|
9
|
-
* @private
|
|
10
|
-
*/
|
|
11
|
-
private collection : Object[];
|
|
12
|
-
// Constructors
|
|
13
|
-
/**
|
|
14
|
-
* Initializes a new instance of the `Collection` class.
|
|
15
|
-
* @private
|
|
16
|
-
*/
|
|
17
|
-
public constructor() {
|
|
18
|
-
//
|
|
19
|
-
}
|
|
20
|
-
// Properties
|
|
21
|
-
/**
|
|
22
|
-
* Gets the `Count` of stored objects.
|
|
23
|
-
* @private
|
|
24
|
-
*/
|
|
25
|
-
public get count() : number {
|
|
26
|
-
if (typeof this.collection === 'undefined') {
|
|
27
|
-
this.collection = [];
|
|
28
|
-
}
|
|
29
|
-
return this.collection.length;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Gets the `list` of stored objects.
|
|
33
|
-
* @private
|
|
34
|
-
*/
|
|
35
|
-
public get list() : Object[] {
|
|
36
|
-
if (typeof this.collection === 'undefined') {
|
|
37
|
-
this.collection = [];
|
|
38
|
-
}
|
|
39
|
-
return this.collection;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* PdfDestination.ts class for EJ2-PDF
|
|
3
|
-
*/
|
|
4
|
-
import { IPdfWrapper } from './../../interfaces/i-pdf-wrapper';
|
|
5
|
-
import { IPdfPrimitive } from './../../interfaces/i-pdf-primitives';
|
|
6
|
-
import { PointF, RectangleF } from './../drawing/pdf-drawing';
|
|
7
|
-
import { PdfPageBase } from './../pages/pdf-page-base';
|
|
8
|
-
import { PdfArray } from './../primitives/pdf-array';
|
|
9
|
-
import { PdfPage } from './../pages/pdf-page';
|
|
10
|
-
import { PdfPageRotateAngle } from './../pages/enum';
|
|
11
|
-
import { PdfDestinationMode } from './../general/enum';
|
|
12
|
-
import { PdfSection } from './../pages/pdf-section';
|
|
13
|
-
import { PdfReferenceHolder } from './../primitives/pdf-reference';
|
|
14
|
-
import { PdfName } from './../primitives/pdf-name';
|
|
15
|
-
import { PdfNumber } from './../primitives/pdf-number';
|
|
16
|
-
import { DictionaryProperties } from './../input-output/pdf-dictionary-properties';
|
|
17
|
-
/**
|
|
18
|
-
* `PdfDestination` class represents an anchor in the document
|
|
19
|
-
* where bookmarks or annotations can direct when clicked.
|
|
20
|
-
*/
|
|
21
|
-
export class PdfDestination implements IPdfWrapper {
|
|
22
|
-
// Fields
|
|
23
|
-
/**
|
|
24
|
-
* Internal variable for accessing fields from `DictionryProperties` class.
|
|
25
|
-
* @private
|
|
26
|
-
*/
|
|
27
|
-
protected dictionaryProperties : DictionaryProperties = new DictionaryProperties();
|
|
28
|
-
/**
|
|
29
|
-
* Type of the `destination`.
|
|
30
|
-
* @private
|
|
31
|
-
*/
|
|
32
|
-
private destinationMode : PdfDestinationMode = PdfDestinationMode.Location;
|
|
33
|
-
/**
|
|
34
|
-
* `Zoom` factor.
|
|
35
|
-
* @private
|
|
36
|
-
* @default 0
|
|
37
|
-
*/
|
|
38
|
-
private zoomFactor : number = 0;
|
|
39
|
-
/**
|
|
40
|
-
* `Location` of the destination.
|
|
41
|
-
* @default new PointF() with 0 ,0 as co-ordinates
|
|
42
|
-
* @private
|
|
43
|
-
*/
|
|
44
|
-
private destinationLocation : PointF = new PointF(0, 0);
|
|
45
|
-
/**
|
|
46
|
-
* `Bounds` of the destination as RectangleF.
|
|
47
|
-
* @default RectangleF.Empty
|
|
48
|
-
* @private
|
|
49
|
-
*/
|
|
50
|
-
private bounds : RectangleF = new RectangleF();
|
|
51
|
-
/**
|
|
52
|
-
* Parent `page` reference.
|
|
53
|
-
* @private
|
|
54
|
-
*/
|
|
55
|
-
private pdfPage : PdfPageBase;
|
|
56
|
-
/**
|
|
57
|
-
* Pdf primitive representing `this` object.
|
|
58
|
-
* @private
|
|
59
|
-
*/
|
|
60
|
-
private array : PdfArray = new PdfArray();
|
|
61
|
-
// Constructors
|
|
62
|
-
/**
|
|
63
|
-
* Initializes a new instance of the `PdfDestination` class with page object.
|
|
64
|
-
* @private
|
|
65
|
-
*/
|
|
66
|
-
public constructor(page : PdfPageBase)
|
|
67
|
-
/**
|
|
68
|
-
* Initializes a new instance of the `PdfDestination` class with page object and location.
|
|
69
|
-
* @private
|
|
70
|
-
*/
|
|
71
|
-
public constructor(page : PdfPageBase, location : PointF)
|
|
72
|
-
/**
|
|
73
|
-
* Initializes a new instance of the `PdfDestination` class with page object and bounds.
|
|
74
|
-
* @private
|
|
75
|
-
*/
|
|
76
|
-
public constructor(page : PdfPageBase, rectangle : RectangleF)
|
|
77
|
-
public constructor(arg1 : PdfPageBase, arg2 ?: RectangleF | PointF) {
|
|
78
|
-
let angle : PdfPageRotateAngle = PdfPageRotateAngle.RotateAngle0;
|
|
79
|
-
this.destinationLocation = new PointF(0, this.destinationLocation.y);
|
|
80
|
-
this.pdfPage = arg1;
|
|
81
|
-
if (arg2 instanceof PointF) {
|
|
82
|
-
this.destinationLocation = arg2;
|
|
83
|
-
} else {
|
|
84
|
-
this.bounds = arg2;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
// Properties
|
|
88
|
-
/**
|
|
89
|
-
* Gets and Sets the `zoom` factor.
|
|
90
|
-
* @private
|
|
91
|
-
*/
|
|
92
|
-
public get zoom() : number {
|
|
93
|
-
return this.zoomFactor;
|
|
94
|
-
}
|
|
95
|
-
public set zoom(value : number) {
|
|
96
|
-
this.zoomFactor = value;
|
|
97
|
-
this.initializePrimitive();
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* Gets and Sets the `page` object.
|
|
101
|
-
* @private
|
|
102
|
-
*/
|
|
103
|
-
public get page() : PdfPageBase {
|
|
104
|
-
return this.pdfPage;
|
|
105
|
-
}
|
|
106
|
-
public set page(value : PdfPageBase) {
|
|
107
|
-
this.pdfPage = value;
|
|
108
|
-
this.initializePrimitive();
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* Gets and Sets the destination `mode`.
|
|
112
|
-
* @private
|
|
113
|
-
*/
|
|
114
|
-
public get mode() : PdfDestinationMode {
|
|
115
|
-
return this. destinationMode;
|
|
116
|
-
}
|
|
117
|
-
public set mode(value : PdfDestinationMode) {
|
|
118
|
-
this.destinationMode = value;
|
|
119
|
-
this.initializePrimitive();
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Gets and Sets the `location`.
|
|
123
|
-
* @private
|
|
124
|
-
*/
|
|
125
|
-
public get location() : PointF {
|
|
126
|
-
return this.destinationLocation;
|
|
127
|
-
}
|
|
128
|
-
public set location(value : PointF) {
|
|
129
|
-
this.destinationLocation = value;
|
|
130
|
-
this.initializePrimitive();
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* `Translates` co-ordinates to PDF co-ordinate system (lower/left).
|
|
134
|
-
* @private
|
|
135
|
-
*/
|
|
136
|
-
private pointToNativePdf(page : PdfPage, point : PointF) : PointF {
|
|
137
|
-
let section : PdfSection = page.section;
|
|
138
|
-
return section.pointToNativePdf(page, point);
|
|
139
|
-
}
|
|
140
|
-
/**
|
|
141
|
-
* `In fills` array by correct values.
|
|
142
|
-
* @private
|
|
143
|
-
*/
|
|
144
|
-
private initializePrimitive() : void {
|
|
145
|
-
this.array.clear();
|
|
146
|
-
this.array.add(new PdfReferenceHolder(this.pdfPage));
|
|
147
|
-
switch (this.destinationMode) {
|
|
148
|
-
case PdfDestinationMode.Location:
|
|
149
|
-
let simplePage : PdfPage = this.pdfPage as PdfPage;
|
|
150
|
-
let point : PointF = new PointF();
|
|
151
|
-
point = this.pointToNativePdf(simplePage, this.destinationLocation);
|
|
152
|
-
this.array.add(new PdfName(this.dictionaryProperties.xyz));
|
|
153
|
-
this.array.add(new PdfNumber(point.x));
|
|
154
|
-
this.array.add(new PdfNumber(point.y));
|
|
155
|
-
this.array.add(new PdfNumber(this.zoomFactor));
|
|
156
|
-
break;
|
|
157
|
-
case PdfDestinationMode.FitToPage:
|
|
158
|
-
this.array.add(new PdfName(this.dictionaryProperties.fit));
|
|
159
|
-
break;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
/**
|
|
163
|
-
* Gets the `element` representing this object.
|
|
164
|
-
* @private
|
|
165
|
-
*/
|
|
166
|
-
public get element() : IPdfPrimitive {
|
|
167
|
-
this.initializePrimitive();
|
|
168
|
-
return this.array;
|
|
169
|
-
}
|
|
170
|
-
}
|
|
@@ -1,237 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* Specifies the constant values specifying whether to extend the shading
|
|
4
|
-
* beyond the starting and ending points of the axis.
|
|
5
|
-
*/
|
|
6
|
-
export enum PdfExtend {
|
|
7
|
-
/**
|
|
8
|
-
* Do not extend any point.
|
|
9
|
-
*/
|
|
10
|
-
None = 0,
|
|
11
|
-
/**
|
|
12
|
-
* Extend start point.
|
|
13
|
-
*/
|
|
14
|
-
Start = 1,
|
|
15
|
-
/**
|
|
16
|
-
* Extend end point.
|
|
17
|
-
*/
|
|
18
|
-
End = 2,
|
|
19
|
-
/**
|
|
20
|
-
* Extend both start and end points.
|
|
21
|
-
*/
|
|
22
|
-
Both = Start | End,
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Specifies the gradient direction of the linear gradient brush.
|
|
26
|
-
*/
|
|
27
|
-
export enum PdfLinearGradientMode {
|
|
28
|
-
/**
|
|
29
|
-
* Specifies a gradient from upper right to lower left.
|
|
30
|
-
*/
|
|
31
|
-
BackwardDiagonal,
|
|
32
|
-
/**
|
|
33
|
-
* Specifies a gradient from upper left to lower right.
|
|
34
|
-
*/
|
|
35
|
-
ForwardDiagonal,
|
|
36
|
-
/**
|
|
37
|
-
* Specifies a gradient from left to right.
|
|
38
|
-
*/
|
|
39
|
-
Horizontal,
|
|
40
|
-
/**
|
|
41
|
-
* Specifies a gradient from top to bottom.
|
|
42
|
-
*/
|
|
43
|
-
Vertical,
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Shading type constants.
|
|
47
|
-
*/
|
|
48
|
-
export enum ShadingType {
|
|
49
|
-
/**
|
|
50
|
-
* Function-based shading.
|
|
51
|
-
*/
|
|
52
|
-
Function = 1,
|
|
53
|
-
/**
|
|
54
|
-
* Axial shading.
|
|
55
|
-
*/
|
|
56
|
-
Axial = 2,
|
|
57
|
-
/**
|
|
58
|
-
* Radial shading.
|
|
59
|
-
*/
|
|
60
|
-
Radial = 3
|
|
61
|
-
}
|
|
62
|
-
export enum KnownColor {
|
|
63
|
-
ActiveBorder = 1,
|
|
64
|
-
ActiveCaption = 2,
|
|
65
|
-
ActiveCaptionText = 3,
|
|
66
|
-
AppWorkspace = 4,
|
|
67
|
-
Control = 5,
|
|
68
|
-
ControlDark = 6,
|
|
69
|
-
ControlDarkDark = 7,
|
|
70
|
-
ControlLight = 8,
|
|
71
|
-
ControlLightLight = 9,
|
|
72
|
-
ControlText = 10,
|
|
73
|
-
Desktop = 11,
|
|
74
|
-
GrayText = 12,
|
|
75
|
-
Highlight = 13,
|
|
76
|
-
HighlightText = 14,
|
|
77
|
-
HotTrack = 15,
|
|
78
|
-
InactiveBorder = 16,
|
|
79
|
-
InactiveCaption = 17,
|
|
80
|
-
InactiveCaptionText = 18,
|
|
81
|
-
Info = 19,
|
|
82
|
-
InfoText = 20,
|
|
83
|
-
Menu = 21,
|
|
84
|
-
MenuText = 22,
|
|
85
|
-
ScrollBar = 23,
|
|
86
|
-
Window = 24,
|
|
87
|
-
WindowFrame = 25,
|
|
88
|
-
WindowText = 26,
|
|
89
|
-
Transparent = 27,
|
|
90
|
-
AliceBlue = 28,
|
|
91
|
-
AntiqueWhite = 29,
|
|
92
|
-
Aqua = 30,
|
|
93
|
-
Aquamarine = 31,
|
|
94
|
-
Azure = 32,
|
|
95
|
-
Beige = 33,
|
|
96
|
-
Bisque = 34,
|
|
97
|
-
Black = 35,
|
|
98
|
-
BlanchedAlmond = 36,
|
|
99
|
-
Blue = 37,
|
|
100
|
-
BlueViolet = 38,
|
|
101
|
-
Brown = 39,
|
|
102
|
-
BurlyWood = 40,
|
|
103
|
-
CadetBlue = 41,
|
|
104
|
-
Chartreuse = 42,
|
|
105
|
-
Chocolate = 43,
|
|
106
|
-
Coral = 44,
|
|
107
|
-
CornflowerBlue = 45,
|
|
108
|
-
Cornsilk = 46,
|
|
109
|
-
Crimson = 47,
|
|
110
|
-
Cyan = 48,
|
|
111
|
-
DarkBlue = 49,
|
|
112
|
-
DarkCyan = 50,
|
|
113
|
-
DarkGoldenrod = 51,
|
|
114
|
-
DarkGray = 52,
|
|
115
|
-
DarkGreen = 53,
|
|
116
|
-
DarkKhaki = 54,
|
|
117
|
-
DarkMagenta = 55,
|
|
118
|
-
DarkOliveGreen = 56,
|
|
119
|
-
DarkOrange = 57,
|
|
120
|
-
DarkOrchid = 58,
|
|
121
|
-
DarkRed = 59,
|
|
122
|
-
DarkSalmon = 60,
|
|
123
|
-
DarkSeaGreen = 61,
|
|
124
|
-
DarkSlateBlue = 62,
|
|
125
|
-
DarkSlateGray = 63,
|
|
126
|
-
DarkTurquoise = 64,
|
|
127
|
-
DarkViolet = 65,
|
|
128
|
-
DeepPink = 66,
|
|
129
|
-
DeepSkyBlue = 67,
|
|
130
|
-
DimGray = 68,
|
|
131
|
-
DodgerBlue = 69,
|
|
132
|
-
Firebrick = 70,
|
|
133
|
-
FloralWhite = 71,
|
|
134
|
-
ForestGreen = 72,
|
|
135
|
-
Fuchsia = 73,
|
|
136
|
-
Gainsboro = 74,
|
|
137
|
-
GhostWhite = 75,
|
|
138
|
-
Gold = 76,
|
|
139
|
-
Goldenrod = 77,
|
|
140
|
-
Gray = 78,
|
|
141
|
-
Green = 79,
|
|
142
|
-
GreenYellow = 80,
|
|
143
|
-
Honeydew = 81,
|
|
144
|
-
HotPink = 82,
|
|
145
|
-
IndianRed = 83,
|
|
146
|
-
Indigo = 84,
|
|
147
|
-
Ivory = 85,
|
|
148
|
-
Khaki = 86,
|
|
149
|
-
Lavender = 87,
|
|
150
|
-
LavenderBlush = 88,
|
|
151
|
-
LawnGreen = 89,
|
|
152
|
-
LemonChiffon = 90,
|
|
153
|
-
LightBlue = 91,
|
|
154
|
-
LightCoral = 92,
|
|
155
|
-
LightCyan = 93,
|
|
156
|
-
LightGoldenrodYellow = 94,
|
|
157
|
-
LightGray = 95,
|
|
158
|
-
LightGreen = 96,
|
|
159
|
-
LightPink = 97,
|
|
160
|
-
LightSalmon = 98,
|
|
161
|
-
LightSeaGreen = 99,
|
|
162
|
-
LightSkyBlue = 100,
|
|
163
|
-
LightSlateGray = 101,
|
|
164
|
-
LightSteelBlue = 102,
|
|
165
|
-
LightYellow = 103,
|
|
166
|
-
Lime = 104,
|
|
167
|
-
LimeGreen = 105,
|
|
168
|
-
Linen = 106,
|
|
169
|
-
Magenta = 107,
|
|
170
|
-
Maroon = 108,
|
|
171
|
-
MediumAquamarine = 109,
|
|
172
|
-
MediumBlue = 110,
|
|
173
|
-
MediumOrchid = 111,
|
|
174
|
-
MediumPurple = 112,
|
|
175
|
-
MediumSeaGreen = 113,
|
|
176
|
-
MediumSlateBlue = 114,
|
|
177
|
-
MediumSpringGreen = 115,
|
|
178
|
-
MediumTurquoise = 116,
|
|
179
|
-
MediumVioletRed = 117,
|
|
180
|
-
MidnightBlue = 118,
|
|
181
|
-
MintCream = 119,
|
|
182
|
-
MistyRose = 120,
|
|
183
|
-
Moccasin = 121,
|
|
184
|
-
NavajoWhite = 122,
|
|
185
|
-
Navy = 123,
|
|
186
|
-
OldLace = 124,
|
|
187
|
-
Olive = 125,
|
|
188
|
-
OliveDrab = 126,
|
|
189
|
-
Orange = 127,
|
|
190
|
-
OrangeRed = 128,
|
|
191
|
-
Orchid = 129,
|
|
192
|
-
PaleGoldenrod = 130,
|
|
193
|
-
PaleGreen = 131,
|
|
194
|
-
PaleTurquoise = 132,
|
|
195
|
-
PaleVioletRed = 133,
|
|
196
|
-
PapayaWhip = 134,
|
|
197
|
-
PeachPuff = 135,
|
|
198
|
-
Peru = 136,
|
|
199
|
-
Pink = 137,
|
|
200
|
-
Plum = 138,
|
|
201
|
-
PowderBlue = 139,
|
|
202
|
-
Purple = 140,
|
|
203
|
-
Red = 141,
|
|
204
|
-
RosyBrown = 142,
|
|
205
|
-
RoyalBlue = 143,
|
|
206
|
-
SaddleBrown = 144,
|
|
207
|
-
Salmon = 145,
|
|
208
|
-
SandyBrown = 146,
|
|
209
|
-
SeaGreen = 147,
|
|
210
|
-
SeaShell = 148,
|
|
211
|
-
Sienna = 149,
|
|
212
|
-
Silver = 150,
|
|
213
|
-
SkyBlue = 151,
|
|
214
|
-
SlateBlue = 152,
|
|
215
|
-
SlateGray = 153,
|
|
216
|
-
Snow = 154,
|
|
217
|
-
SpringGreen = 155,
|
|
218
|
-
SteelBlue = 156,
|
|
219
|
-
Tan = 157,
|
|
220
|
-
Teal = 158,
|
|
221
|
-
Thistle = 159,
|
|
222
|
-
Tomato = 160,
|
|
223
|
-
Turquoise = 161,
|
|
224
|
-
Violet = 162,
|
|
225
|
-
Wheat = 163,
|
|
226
|
-
White = 164,
|
|
227
|
-
WhiteSmoke = 165,
|
|
228
|
-
Yellow = 166,
|
|
229
|
-
YellowGreen = 167,
|
|
230
|
-
ButtonFace = 168,
|
|
231
|
-
ButtonHighlight = 169,
|
|
232
|
-
ButtonShadow = 170,
|
|
233
|
-
GradientActiveCaption = 171,
|
|
234
|
-
GradientInactiveCaption = 172,
|
|
235
|
-
MenuBar = 173,
|
|
236
|
-
MenuHighlight = 174
|
|
237
|
-
}
|