Skip to content

Commit a1a7e97

Browse files
Merge branch 'master' into release
2 parents e74c9f5 + c8baf7f commit a1a7e97

File tree

105 files changed

+6351
-1346
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+6351
-1346
lines changed

Examples/AcceptAllRevisions.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@
44
from asposewordscloud.rest import ApiException
55
from shutil import copyfile
66

7-
documents_dir = '...'
87
words_api = WordsApi(client_id = '####-####-####-####-####', client_secret = '##################')
98
file_name = 'test_doc.docx'
109

1110
# Upload original document to cloud storage.
12-
upload_file_request = asposewordscloud.models.requests.UploadFileRequest(file_content = open(os.path.join(documents_dir, file_name), 'rb'),path = file_name)
11+
my_var1 = open(file_name, 'rb')
12+
my_var2 = file_name
13+
upload_file_request = asposewordscloud.models.requests.UploadFileRequest(file_content=my_var1, path=my_var2)
1314
words_api.upload_file(upload_file_request)
1415

1516
# Calls AcceptAllRevisions method for document in cloud.
16-
request = asposewordscloud.models.requests.AcceptAllRevisionsRequest(name = file_name)
17+
my_var3 = file_name
18+
request = asposewordscloud.models.requests.AcceptAllRevisionsRequest(name=my_var3)
1719
words_api.accept_all_revisions(request)
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
documents_dir = '...'
21
words_api = WordsApi(client_id = '####-####-####-####-####', client_secret = '##################')
32
file_name = 'test_doc.docx'
43

54
# Calls AcceptAllRevisionsOnline method for document in cloud.
6-
request = asposewordscloud.models.requests.AcceptAllRevisionsOnlineRequest(document = open(os.path.join(documents_dir, file_name), 'rb'))
5+
request_document = open(file_name, 'rb')
6+
request = asposewordscloud.models.requests.AcceptAllRevisionsOnlineRequest(document=request_document)
77
accept_all_revisions_online_result = words_api.accept_all_revisions_online(request)
88
copyfile(accept_all_revisions_online_result.document, 'test_result.docx')

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@ 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 21.8
20+
21+
- Added new api methods to get, insert, update or delete custom xml parts from documents.
22+
- Added parameter 'ResultDocumentFormat' to Compare API
23+
- Added 'ExportLanguageToSpanTag' pdf save option
24+
- Added 'FlatOpcXmlMappingOnly' save option
25+
26+
1927
## Enhancements in Version 21.7
2028

2129
- ImlRenderingMode option introduced witch is used to determine how ink (InkML) objects are rendered
Binary file not shown.

asposewordscloud/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@
3636
from asposewordscloud.models.compare_data import CompareData
3737
from asposewordscloud.models.compare_options import CompareOptions
3838
from asposewordscloud.models.csv_data_load_options import CsvDataLoadOptions
39+
from asposewordscloud.models.custom_xml_part import CustomXmlPart
40+
from asposewordscloud.models.custom_xml_part_insert import CustomXmlPartInsert
41+
from asposewordscloud.models.custom_xml_part_link import CustomXmlPartLink
42+
from asposewordscloud.models.custom_xml_part_response import CustomXmlPartResponse
43+
from asposewordscloud.models.custom_xml_parts_collection import CustomXmlPartsCollection
44+
from asposewordscloud.models.custom_xml_parts_response import CustomXmlPartsResponse
45+
from asposewordscloud.models.custom_xml_part_update import CustomXmlPartUpdate
3946
from asposewordscloud.models.doc_save_options_data import DocSaveOptionsData
4047
from asposewordscloud.models.document import Document
4148
from asposewordscloud.models.document_entry import DocumentEntry

asposewordscloud/api_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,12 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
8181

8282
self.pool = None
8383
self.rest_client = rest.RESTClientObject(configuration)
84-
self.default_headers = {'x-aspose-client': 'python sdk', 'x-aspose-version': '21.7'}
84+
self.default_headers = {'x-aspose-client': 'python sdk', 'x-aspose-version': '21.8'}
8585
if header_name is not None:
8686
self.default_headers[header_name] = header_value
8787
self.cookie = cookie
8888
# Set default User-Agent.
89-
self.user_agent = 'python sdk 21.7'
89+
self.user_agent = 'python sdk 21.8'
9090

9191
def __del__(self):
9292
if not self.pool is None:

asposewordscloud/apis/words_api.py

Lines changed: 1747 additions & 825 deletions
Large diffs are not rendered by default.

asposewordscloud/configuration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,6 @@ def to_debug_report(self):
258258
return "Python SDK Debug Report:\n"\
259259
"OS: {env}\n"\
260260
"Python Version: {pyversion}\n"\
261-
"Version of the API: 21.7\n"\
262-
"SDK Package Version: 21.7".\
261+
"Version of the API: 21.8\n"\
262+
"SDK Package Version: 21.8".\
263263
format(env=sys.platform, pyversion=sys.version)

asposewordscloud/models/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@
3131
from asposewordscloud.models.compare_data import CompareData
3232
from asposewordscloud.models.compare_options import CompareOptions
3333
from asposewordscloud.models.csv_data_load_options import CsvDataLoadOptions
34+
from asposewordscloud.models.custom_xml_part import CustomXmlPart
35+
from asposewordscloud.models.custom_xml_part_insert import CustomXmlPartInsert
36+
from asposewordscloud.models.custom_xml_part_link import CustomXmlPartLink
37+
from asposewordscloud.models.custom_xml_part_response import CustomXmlPartResponse
38+
from asposewordscloud.models.custom_xml_parts_collection import CustomXmlPartsCollection
39+
from asposewordscloud.models.custom_xml_parts_response import CustomXmlPartsResponse
40+
from asposewordscloud.models.custom_xml_part_update import CustomXmlPartUpdate
3441
from asposewordscloud.models.doc_save_options_data import DocSaveOptionsData
3542
from asposewordscloud.models.document import Document
3643
from asposewordscloud.models.document_entry import DocumentEntry

asposewordscloud/models/bmp_save_options_data.py

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ class BmpSaveOptionsData(object):
4949
'dml_effects_rendering_mode': 'str',
5050
'dml_rendering_mode': 'str',
5151
'file_name': 'str',
52+
'flat_opc_xml_mapping_only': 'bool',
5253
'iml_rendering_mode': 'str',
5354
'save_format': 'str',
5455
'update_created_time_property': 'bool',
@@ -86,6 +87,7 @@ class BmpSaveOptionsData(object):
8687
'dml_effects_rendering_mode': 'DmlEffectsRenderingMode',
8788
'dml_rendering_mode': 'DmlRenderingMode',
8889
'file_name': 'FileName',
90+
'flat_opc_xml_mapping_only': 'FlatOpcXmlMappingOnly',
8991
'iml_rendering_mode': 'ImlRenderingMode',
9092
'save_format': 'SaveFormat',
9193
'update_created_time_property': 'UpdateCreatedTimeProperty',
@@ -116,7 +118,7 @@ class BmpSaveOptionsData(object):
116118
'vertical_resolution': 'VerticalResolution'
117119
}
118120

119-
def __init__(self, allow_embedding_post_script_fonts=None, custom_time_zone_info_data=None, dml3_d_effects_rendering_mode=None, dml_effects_rendering_mode=None, dml_rendering_mode=None, file_name=None, iml_rendering_mode=None, save_format=None, update_created_time_property=None, update_fields=None, update_last_printed_property=None, update_last_saved_time_property=None, update_sdt_content=None, zip_output=None, color_mode=None, jpeg_quality=None, metafile_rendering_options=None, numeral_format=None, optimize_output=None, page_count=None, page_index=None, graphics_quality_options=None, horizontal_resolution=None, image_brightness=None, image_color_mode=None, image_contrast=None, paper_color=None, pixel_format=None, resolution=None, scale=None, use_anti_aliasing=None, use_gdi_emf_renderer=None, use_high_quality_rendering=None, vertical_resolution=None): # noqa: E501
121+
def __init__(self, allow_embedding_post_script_fonts=None, custom_time_zone_info_data=None, dml3_d_effects_rendering_mode=None, dml_effects_rendering_mode=None, dml_rendering_mode=None, file_name=None, flat_opc_xml_mapping_only=None, iml_rendering_mode=None, save_format=None, update_created_time_property=None, update_fields=None, update_last_printed_property=None, update_last_saved_time_property=None, update_sdt_content=None, zip_output=None, color_mode=None, jpeg_quality=None, metafile_rendering_options=None, numeral_format=None, optimize_output=None, page_count=None, page_index=None, graphics_quality_options=None, horizontal_resolution=None, image_brightness=None, image_color_mode=None, image_contrast=None, paper_color=None, pixel_format=None, resolution=None, scale=None, use_anti_aliasing=None, use_gdi_emf_renderer=None, use_high_quality_rendering=None, vertical_resolution=None): # noqa: E501
120122
"""BmpSaveOptionsData - a model defined in Swagger""" # noqa: E501
121123

122124
self._allow_embedding_post_script_fonts = None
@@ -125,6 +127,7 @@ def __init__(self, allow_embedding_post_script_fonts=None, custom_time_zone_info
125127
self._dml_effects_rendering_mode = None
126128
self._dml_rendering_mode = None
127129
self._file_name = None
130+
self._flat_opc_xml_mapping_only = None
128131
self._iml_rendering_mode = None
129132
self._save_format = None
130133
self._update_created_time_property = None
@@ -167,6 +170,8 @@ def __init__(self, allow_embedding_post_script_fonts=None, custom_time_zone_info
167170
self.dml_rendering_mode = dml_rendering_mode
168171
if file_name is not None:
169172
self.file_name = file_name
173+
if flat_opc_xml_mapping_only is not None:
174+
self.flat_opc_xml_mapping_only = flat_opc_xml_mapping_only
170175
if iml_rendering_mode is not None:
171176
self.iml_rendering_mode = iml_rendering_mode
172177
if save_format is not None:
@@ -364,6 +369,28 @@ def file_name(self, file_name):
364369
"""
365370
self._file_name = file_name
366371

372+
@property
373+
def flat_opc_xml_mapping_only(self):
374+
"""Gets the flat_opc_xml_mapping_only of this BmpSaveOptionsData. # noqa: E501
375+
376+
Gets or sets value determining which document formats are allowed to be mapped by Aspose.Words.Markup.StructuredDocumentTag.XmlMapping. By default only Aspose.Words.LoadFormat.FlatOpc document format is allowed to be mapped. # noqa: E501
377+
378+
:return: The flat_opc_xml_mapping_only of this BmpSaveOptionsData. # noqa: E501
379+
:rtype: bool
380+
"""
381+
return self._flat_opc_xml_mapping_only
382+
383+
@flat_opc_xml_mapping_only.setter
384+
def flat_opc_xml_mapping_only(self, flat_opc_xml_mapping_only):
385+
"""Sets the flat_opc_xml_mapping_only of this BmpSaveOptionsData.
386+
387+
Gets or sets value determining which document formats are allowed to be mapped by Aspose.Words.Markup.StructuredDocumentTag.XmlMapping. By default only Aspose.Words.LoadFormat.FlatOpc document format is allowed to be mapped. # noqa: E501
388+
389+
:param flat_opc_xml_mapping_only: The flat_opc_xml_mapping_only of this BmpSaveOptionsData. # noqa: E501
390+
:type: bool
391+
"""
392+
self._flat_opc_xml_mapping_only = flat_opc_xml_mapping_only
393+
367394
@property
368395
def iml_rendering_mode(self):
369396
"""Gets the iml_rendering_mode of this BmpSaveOptionsData. # noqa: E501

0 commit comments

Comments
 (0)