-
Notifications
You must be signed in to change notification settings - Fork 0
/
PdfInput.java
108 lines (94 loc) · 2.48 KB
/
PdfInput.java
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
package com.dynamicpdf.api;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Represents a pdf input.
*/
@JsonInclude(Include.NON_DEFAULT)
@JsonAutoDetect(fieldVisibility = Visibility.ANY)
public class PdfInput extends Input {
private MergeOptions mergeOptions = null;
private int startPage;
private int pageCount;
/**
* Initializes a new instance of the <code>PdfInput</code> class.
* @param resource The resource of type <code>PdfResource</code>.
* @param options The merge options for the pdf.
*/
public PdfInput(PdfResource resource, MergeOptions options) {
super(resource);
mergeOptions = options;
}
/**
* Initializes a new instance of the <code>PdfInput</code> class.
* @param resource The resource of type <code>PdfResource</code>.
*/
public PdfInput(PdfResource resource) {
super(resource);
}
/**
* Returns a <code>PdfInput</code> object containing the input pdf.
* @param cloudResourcePath The resource path in cloud resource manager.
* @param options The merge options for the pdf.
*/
public PdfInput(String cloudResourcePath, MergeOptions options) {
super(cloudResourcePath);
mergeOptions = options;
}
/**
*
* @param cloudResourcePath The resource path in cloud resource manager.
*/
public PdfInput(String cloudResourcePath) {
super(cloudResourcePath);
}
@JsonProperty("type")
InputType getType() {
return InputType.PDF;
}
/**
* Gets the merge options <code>MergeOptions</code>.
* @return The merge options <code>MergeOptions</code>.
*/
public MergeOptions getMergeOptions() {
return mergeOptions;
}
/**
* Sets the merge options <code>MergeOptions</code>.
* @param value The merge options <code>MergeOptions</code>.
*/
public void setMergeOptions(MergeOptions value) {
mergeOptions = value;
}
/**
* Gets the start page.
* @return The start page.
*/
public int getStartPage() {
return startPage;
}
/**
* Sets the start page.
* @param value The start page.
*/
public void setStartPage(int value) {
startPage = value;
}
/**
* Gets the page count.
* @return The page count.
*/
public int getPageCount() {
return pageCount;
}
/**
* Sets the page count.
* @param value The page count.
*/
public void setPageCount(int value) {
pageCount = value;
}
}