-
Notifications
You must be signed in to change notification settings - Fork 0
/
PdfInput.js
40 lines (35 loc) · 1.1 KB
/
PdfInput.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import { inputType } from "./InputType.js";
import { Input } from "./Input.js";
/**
* Represents a pdf input.
*/
export class PdfInput extends Input {
/**Gets or sets the merge options `MergeOptions` */
mergeOptions;
/**Gets or sets the start page. */
startPage;
/** Gets or sets the page count.*/
pageCount;
/**
* Initializes a new instance of the `PdfInput` class.
* @param { PdfResource | string } resource The resource of type `PdfResource`. | The resource path in cloud resource manager.
* @param {MergeOptions} mergeOptions The merge options for the pdf.
*/
constructor(resource, mergeOptions = null) {
super(resource);
if (mergeOptions != null)
this.mergeOptions = mergeOptions;
this._Type = inputType.pdf;
}
toJSON() {
return {
mergeOptions: this.mergeOptions,
startPage: this.startPage,
pageCount: this.pageCount,
type: this._Type,
resourceName: this.resourceName,
templateId: this._templateId,
id: this.id
};
}
}