Skip to content

Commit e91d94b

Browse files
SDK regenerated by CI server [ci skip]
1 parent 5c89d7c commit e91d94b

File tree

3 files changed

+76
-2
lines changed

3 files changed

+76
-2
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ This repository contains Aspose.Words Cloud SDK for Java source code. This SDK a
1313
* Watermarks and protection
1414
* Full read & write access to Document Object Model, including sections, paragraphs, text, images, tables, headers/footers and many others
1515

16+
## Enhancements in Version 22.8
17+
18+
- Added optional loadEncoding and password parameters for ConvertDocument API method.
19+
20+
1621
## Enhancements in Version 22.7
1722

1823
- Expand 'AppendDocument' API method to support 'ImageEntryList' for directly appending images to documents and another images.

src/main/java/com/aspose/words/cloud/model/requests/ConvertDocumentRequest.java

Lines changed: 68 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,21 @@ public class ConvertDocumentRequest implements RequestIfc {
6666
*/
6767
private String storage;
6868

69+
/*
70+
* Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
71+
*/
72+
private String loadEncoding;
73+
74+
/*
75+
* Password of protected Word document. Use the parameter to pass a password via SDK. SDK encrypts it automatically. We don't recommend to use the parameter to pass a plain password for direct call of API.
76+
*/
77+
private String password;
78+
79+
/*
80+
* Password of protected Word document. Use the parameter to pass an encrypted password for direct calls of API. See SDK code for encyption details.
81+
*/
82+
private String encryptedPassword;
83+
6984
/*
7085
* Folder in filestorage with custom fonts.
7186
*/
@@ -79,14 +94,20 @@ public class ConvertDocumentRequest implements RequestIfc {
7994
* @param String outPath The path to the output document on a local storage.
8095
* @param String fileNameFieldValue The filename of the output document, that will be used when the resulting document has a dynamic field {filename}. If it is not set, the "sourceFilename" will be used instead.
8196
* @param String storage Original document storage.
97+
* @param String loadEncoding Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
98+
* @param String password Password of protected Word document. Use the parameter to pass a password via SDK. SDK encrypts it automatically. We don't recommend to use the parameter to pass a plain password for direct call of API.
99+
* @param String encryptedPassword Password of protected Word document. Use the parameter to pass an encrypted password for direct calls of API. See SDK code for encyption details.
82100
* @param String fontsLocation Folder in filestorage with custom fonts.
83101
*/
84-
public ConvertDocumentRequest(byte[] document, String format, String outPath, String fileNameFieldValue, String storage, String fontsLocation) {
102+
public ConvertDocumentRequest(byte[] document, String format, String outPath, String fileNameFieldValue, String storage, String loadEncoding, String password, String encryptedPassword, String fontsLocation) {
85103
this.document = document;
86104
this.format = format;
87105
this.outPath = outPath;
88106
this.fileNameFieldValue = fileNameFieldValue;
89107
this.storage = storage;
108+
this.loadEncoding = loadEncoding;
109+
this.password = password;
110+
this.encryptedPassword = encryptedPassword;
90111
this.fontsLocation = fontsLocation;
91112
}
92113

@@ -160,6 +181,48 @@ public void setStorage(String value) {
160181
this.storage = value;
161182
}
162183

184+
/*
185+
* Gets Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
186+
*/
187+
public String getLoadEncoding() {
188+
return this.loadEncoding;
189+
}
190+
191+
/*
192+
* Sets Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
193+
*/
194+
public void setLoadEncoding(String value) {
195+
this.loadEncoding = value;
196+
}
197+
198+
/*
199+
* Gets Password of protected Word document. Use the parameter to pass a password via SDK. SDK encrypts it automatically. We don't recommend to use the parameter to pass a plain password for direct call of API.
200+
*/
201+
public String getPassword() {
202+
return this.password;
203+
}
204+
205+
/*
206+
* Sets Password of protected Word document. Use the parameter to pass a password via SDK. SDK encrypts it automatically. We don't recommend to use the parameter to pass a plain password for direct call of API.
207+
*/
208+
public void setPassword(String value) {
209+
this.password = value;
210+
}
211+
212+
/*
213+
* Gets Password of protected Word document. Use the parameter to pass an encrypted password for direct calls of API. See SDK code for encyption details.
214+
*/
215+
public String getEncryptedPassword() {
216+
return this.encryptedPassword;
217+
}
218+
219+
/*
220+
* Sets Password of protected Word document. Use the parameter to pass an encrypted password for direct calls of API. See SDK code for encyption details.
221+
*/
222+
public void setEncryptedPassword(String value) {
223+
this.encryptedPassword = value;
224+
}
225+
163226
/*
164227
* Gets Folder in filestorage with custom fonts.
165228
*/
@@ -198,14 +261,17 @@ public Request buildHttpRequest(ApiClient apiClient, final ProgressResponseBody.
198261

199262
// create path and map variables
200263
String localVarPath = "/words/convert";
264+
localVarPath = apiClient.addParameterToPath(localVarPath, "outPath", getOutPath());
201265
localVarPath = localVarPath.replaceAll("//", "/");
202266

203267
List<Pair> localVarQueryParams = new ArrayList<Pair>();
204268
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
205269
apiClient.addParameterToQuery(localVarQueryParams, "format", getFormat());
206-
apiClient.addParameterToQuery(localVarQueryParams, "outPath", getOutPath());
207270
apiClient.addParameterToQuery(localVarQueryParams, "fileNameFieldValue", getFileNameFieldValue());
208271
apiClient.addParameterToQuery(localVarQueryParams, "storage", getStorage());
272+
apiClient.addParameterToQuery(localVarQueryParams, "loadEncoding", getLoadEncoding());
273+
apiClient.addParameterToQuery(localVarQueryParams, "password", getPassword());
274+
apiClient.addParameterToQuery(localVarQueryParams, "encryptedPassword", getEncryptedPassword());
209275
apiClient.addParameterToQuery(localVarQueryParams, "fontsLocation", getFontsLocation());
210276

211277
Map<String, String> localVarHeaderParams = new HashMap<String, String>();

src/test/java/com/aspose/words/cloud/api/document/TestConvertDocument.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,9 @@ public void testConvertDocument() throws ApiException, MessagingException, IOExc
280280
null,
281281
null,
282282
null,
283+
null,
284+
null,
285+
null,
283286
null
284287
);
285288

0 commit comments

Comments
 (0)