Skip to content

Commit 90d890e

Browse files
committed
Updated sources
1 parent 18bc196 commit 90d890e

File tree

5 files changed

+101
-8
lines changed

5 files changed

+101
-8
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Add following repository and dependency to your project's POM
2424
<dependency>
2525
<groupId>com.groupdocs</groupId>
2626
<artifactId>groupdocs-conversion-cloud</artifactId>
27-
<version>21.9</version>
27+
<version>21.10</version>
2828
<scope>compile</scope>
2929
</dependency>
3030
```
@@ -43,7 +43,7 @@ repositories {
4343
...
4444
dependencies {
4545
...
46-
implementation 'com.groupdocs:groupdocs-conversion-cloud:21.9'
46+
implementation 'com.groupdocs:groupdocs-conversion-cloud:21.10'
4747
}
4848
```
4949

@@ -100,7 +100,7 @@ mvn package -D maven.test.skip=true
100100

101101
Then manually install the following JARs:
102102

103-
* target/groupdocs-conversion-cloud-21.9.jar
103+
* target/groupdocs-conversion-cloud-21.10.jar
104104
* target/lib/*.jar
105105

106106
## Licensing

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<artifactId>groupdocs-conversion-cloud</artifactId>
66
<packaging>jar</packaging>
77
<name>groupdocs-conversion-cloud</name>
8-
<version>21.9</version>
8+
<version>21.10</version>
99
<url>https://github.com/groupdocs-conversion-cloud/groupdocs-conversion-cloud-java</url>
1010
<description>Java library for communicating with the GroupDocs.Conversion Cloud API</description>
1111
<scm>

src/main/java/com/groupdocs/cloud/conversion/client/ApiClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public ApiClient(Configuration configuration) {
9797
this.json = new JSON();
9898

9999
// Set default User-Agent.
100-
setUserAgent("java-sdk/21.9");
100+
setUserAgent("java-sdk/21.10");
101101

102102
// Set connection timeout
103103
setConnectTimeout(configuration.getTimeout());

src/main/java/com/groupdocs/cloud/conversion/model/WatermarkOptions.java

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ public class WatermarkOptions {
8484
@SerializedName("image")
8585
private String image = null;
8686

87+
@SerializedName("autoAlign")
88+
private Boolean autoAlign = null;
89+
8790
public WatermarkOptions text(String text) {
8891
this.text = text;
8992
return this;
@@ -336,6 +339,24 @@ public void setImage(String image) {
336339
this.image = image;
337340
}
338341

342+
public WatermarkOptions autoAlign(Boolean autoAlign) {
343+
this.autoAlign = autoAlign;
344+
return this;
345+
}
346+
347+
/**
348+
* Auto scale the watermark. If the value is true the font size and the position is automatically calculated to fit the page size.
349+
* @return autoAlign
350+
**/
351+
@ApiModelProperty(required = true, value = "Auto scale the watermark. If the value is true the font size and the position is automatically calculated to fit the page size.")
352+
public Boolean getAutoAlign() {
353+
return autoAlign;
354+
}
355+
356+
public void setAutoAlign(Boolean autoAlign) {
357+
this.autoAlign = autoAlign;
358+
}
359+
339360

340361
@Override
341362
public boolean equals(java.lang.Object o) {
@@ -359,12 +380,13 @@ public boolean equals(java.lang.Object o) {
359380
Objects.equals(this.rotationAngle, watermarkOptions.rotationAngle) &&
360381
Objects.equals(this.transparency, watermarkOptions.transparency) &&
361382
Objects.equals(this.background, watermarkOptions.background) &&
362-
Objects.equals(this.image, watermarkOptions.image);
383+
Objects.equals(this.image, watermarkOptions.image) &&
384+
Objects.equals(this.autoAlign, watermarkOptions.autoAlign);
363385
}
364386

365387
@Override
366388
public int hashCode() {
367-
return Objects.hash(text, fontName, fontSize, bold, italic, color, width, height, top, left, rotationAngle, transparency, background, image);
389+
return Objects.hash(text, fontName, fontSize, bold, italic, color, width, height, top, left, rotationAngle, transparency, background, image, autoAlign);
368390
}
369391

370392

@@ -387,6 +409,7 @@ public String toString() {
387409
sb.append(" transparency: ").append(toIndentedString(transparency)).append("\n");
388410
sb.append(" background: ").append(toIndentedString(background)).append("\n");
389411
sb.append(" image: ").append(toIndentedString(image)).append("\n");
412+
sb.append(" autoAlign: ").append(toIndentedString(autoAlign)).append("\n");
390413
sb.append("}");
391414
return sb.toString();
392415
}

src/main/java/com/groupdocs/cloud/conversion/model/WordProcessingConvertOptions.java

Lines changed: 71 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,56 @@ public class WordProcessingConvertOptions extends ConvertOptions {
6363
@SerializedName("watermarkOptions")
6464
private WatermarkOptions watermarkOptions = null;
6565

66+
/**
67+
* Recognition mode when converting from pdf
68+
*/
69+
@JsonAdapter(PdfRecognitionModeEnum.Adapter.class)
70+
public enum PdfRecognitionModeEnum {
71+
TEXTBOX("Textbox"),
72+
73+
FLOW("Flow");
74+
75+
private String value;
76+
77+
PdfRecognitionModeEnum(String value) {
78+
this.value = value;
79+
}
80+
81+
public String getValue() {
82+
return value;
83+
}
84+
85+
@Override
86+
public String toString() {
87+
return String.valueOf(value);
88+
}
89+
90+
public static PdfRecognitionModeEnum fromValue(String text) {
91+
for (PdfRecognitionModeEnum b : PdfRecognitionModeEnum.values()) {
92+
if (String.valueOf(b.value).equals(text)) {
93+
return b;
94+
}
95+
}
96+
return null;
97+
}
98+
99+
public static class Adapter extends TypeAdapter<PdfRecognitionModeEnum> {
100+
@Override
101+
public void write(final JsonWriter jsonWriter, final PdfRecognitionModeEnum enumeration) throws IOException {
102+
jsonWriter.value(enumeration.getValue());
103+
}
104+
105+
@Override
106+
public PdfRecognitionModeEnum read(final JsonReader jsonReader) throws IOException {
107+
String value = jsonReader.nextString();
108+
return PdfRecognitionModeEnum.fromValue(String.valueOf(value));
109+
}
110+
}
111+
}
112+
113+
@SerializedName("pdfRecognitionMode")
114+
private PdfRecognitionModeEnum pdfRecognitionMode = null;
115+
66116
public WordProcessingConvertOptions width(Integer width) {
67117
this.width = width;
68118
return this;
@@ -171,6 +221,24 @@ public void setWatermarkOptions(WatermarkOptions watermarkOptions) {
171221
this.watermarkOptions = watermarkOptions;
172222
}
173223

224+
public WordProcessingConvertOptions pdfRecognitionMode(PdfRecognitionModeEnum pdfRecognitionMode) {
225+
this.pdfRecognitionMode = pdfRecognitionMode;
226+
return this;
227+
}
228+
229+
/**
230+
* Recognition mode when converting from pdf
231+
* @return pdfRecognitionMode
232+
**/
233+
@ApiModelProperty(required = true, value = "Recognition mode when converting from pdf")
234+
public PdfRecognitionModeEnum getPdfRecognitionMode() {
235+
return pdfRecognitionMode;
236+
}
237+
238+
public void setPdfRecognitionMode(PdfRecognitionModeEnum pdfRecognitionMode) {
239+
this.pdfRecognitionMode = pdfRecognitionMode;
240+
}
241+
174242

175243
@Override
176244
public boolean equals(java.lang.Object o) {
@@ -187,12 +255,13 @@ public boolean equals(java.lang.Object o) {
187255
Objects.equals(this.password, wordProcessingConvertOptions.password) &&
188256
Objects.equals(this.zoom, wordProcessingConvertOptions.zoom) &&
189257
Objects.equals(this.watermarkOptions, wordProcessingConvertOptions.watermarkOptions) &&
258+
Objects.equals(this.pdfRecognitionMode, wordProcessingConvertOptions.pdfRecognitionMode) &&
190259
super.equals(o);
191260
}
192261

193262
@Override
194263
public int hashCode() {
195-
return Objects.hash(width, height, dpi, password, zoom, watermarkOptions, super.hashCode());
264+
return Objects.hash(width, height, dpi, password, zoom, watermarkOptions, pdfRecognitionMode, super.hashCode());
196265
}
197266

198267

@@ -207,6 +276,7 @@ public String toString() {
207276
sb.append(" password: ").append(toIndentedString(password)).append("\n");
208277
sb.append(" zoom: ").append(toIndentedString(zoom)).append("\n");
209278
sb.append(" watermarkOptions: ").append(toIndentedString(watermarkOptions)).append("\n");
279+
sb.append(" pdfRecognitionMode: ").append(toIndentedString(pdfRecognitionMode)).append("\n");
210280
sb.append("}");
211281
return sb.toString();
212282
}

0 commit comments

Comments
 (0)