Skip to content

Commit f2689b6

Browse files
SDK regenerated by CI server [ci skip]
1 parent d899c1f commit f2689b6

File tree

3 files changed

+25
-3
lines changed

3 files changed

+25
-3
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ Python Cloud SDK wraps Aspose.Words Cloud API so you could seamlessly integrate
1616
- [Convert a document to desired file format](https://docs.aspose.cloud/display/wordscloud/Convert+Document+to+Destination+Format+with+Detailed+Settings+and+Save+Result+to+Storage) along with detailed settings.
1717
- Convert an encrypted PDF document into Word document format.
1818

19+
## Enhancements in Version 22.8
20+
21+
- Added optional loadEncoding and password parameters for ConvertDocument API method.
22+
23+
1924
## Enhancements in Version 22.7
2025

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

asposewordscloud/apis/words_api.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1280,6 +1280,9 @@ def convert_document(self, request, **kwargs): # noqa: E501
12801280
:param out_path str : The path to the output document on a local storage.
12811281
:param file_name_field_value str : 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.
12821282
:param storage str : Original document storage.
1283+
:param load_encoding str : Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
1284+
:param password str : 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.
1285+
:param encrypted_password str : Password of protected Word document. Use the parameter to pass an encrypted password for direct calls of API. See SDK code for encyption details.
12831286
:param fonts_location str : Folder in filestorage with custom fonts.
12841287
:return: file
12851288
If the method is called asynchronously,

asposewordscloud/models/requests/convert_document_request.py

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,21 @@ class ConvertDocumentRequest(BaseRequestObject):
4040
:param out_path The path to the output document on a local storage.
4141
:param file_name_field_value 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.
4242
:param storage Original document storage.
43+
:param load_encoding Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
44+
:param 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.
45+
:param encrypted_password Password of protected Word document. Use the parameter to pass an encrypted password for direct calls of API. See SDK code for encyption details.
4346
:param fonts_location Folder in filestorage with custom fonts.
4447
"""
4548

46-
def __init__(self, document, format, out_path=None, file_name_field_value=None, storage=None, fonts_location=None):
49+
def __init__(self, document, format, out_path=None, file_name_field_value=None, storage=None, load_encoding=None, password=None, encrypted_password=None, fonts_location=None):
4750
self.document = document
4851
self.format = format
4952
self.out_path = out_path
5053
self.file_name_field_value = file_name_field_value
5154
self.storage = storage
55+
self.load_encoding = load_encoding
56+
self.password = password
57+
self.encrypted_password = encrypted_password
5258
self.fonts_location = fonts_location
5359

5460
def create_http_request(self, api_client):
@@ -61,6 +67,10 @@ def create_http_request(self, api_client):
6167

6268
path = '/v4.0/words/convert'
6369
path_params = {}
70+
if self.out_path is not None:
71+
path_params['outPath'] = self.out_path # noqa: E501
72+
else:
73+
path_params['outPath'] = '' # noqa: E501
6474

6575
# path parameters
6676
collection_formats = {}
@@ -80,12 +90,16 @@ def create_http_request(self, api_client):
8090
query_params = []
8191
if self.format is not None:
8292
query_params.append(('format', self.format)) # noqa: E501
83-
if self.out_path is not None:
84-
query_params.append(('outPath', self.out_path)) # noqa: E501
8593
if self.file_name_field_value is not None:
8694
query_params.append(('fileNameFieldValue', self.file_name_field_value)) # noqa: E501
8795
if self.storage is not None:
8896
query_params.append(('storage', self.storage)) # noqa: E501
97+
if self.load_encoding is not None:
98+
query_params.append(('loadEncoding', self.load_encoding)) # noqa: E501
99+
if self.password is not None:
100+
query_params.append(('password', self.password)) # noqa: E501
101+
if self.encrypted_password is not None:
102+
query_params.append(('encryptedPassword', self.encrypted_password)) # noqa: E501
89103
if self.fonts_location is not None:
90104
query_params.append(('fontsLocation', self.fonts_location)) # noqa: E501
91105

0 commit comments

Comments
 (0)