Skip to content

Commit 10f84a8

Browse files
Merge branch 'master' into release
2 parents 741cc4a + fe0e7cc commit 10f84a8

File tree

13 files changed

+330
-10
lines changed

13 files changed

+330
-10
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,19 @@ 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.4
20+
21+
- Added ExportShapesAsSvg to HtmlSaveOption.
22+
- Added new endpoint '~/styles/copy_from'.
23+
24+
1925
## Enhancements in Version 22.3
2026

2127
- Online methods returns the dictionary of files with included original filename as key instead of single file content in responses.
2228
- Parameters contained sensitive data should be passed in encrypted form. Names of the parameters have 'encrypted' prefix.
2329
- Added Encrypt method to encrypt data on the API public key. Use it to prepare values for parameters required encrypted data.
2430
- GetPublicKey method is not billable.
31+
- Changed type of enumerations for members of SaveOptionsData and other inherited classes from string to enum.
2532

2633

2734
## Enhancements in Version 22.2
11.8 KB
Binary file not shown.

asposewordscloud/api_client.py

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

8484
self.pool = None
8585
self.rest_client = rest.RESTClientObject(configuration)
86-
self.default_headers = {'x-aspose-client': 'python sdk', 'x-aspose-version': '22.3'}
86+
self.default_headers = {'x-aspose-client': 'python sdk', 'x-aspose-version': '22.4'}
8787
if header_name is not None:
8888
self.default_headers[header_name] = header_value
8989
self.cookie = cookie
9090
# Set default User-Agent.
91-
self.user_agent = 'python sdk 22.3'
91+
self.user_agent = 'python sdk 22.4'
9292

9393
def __del__(self):
9494
if not self.pool is None:

asposewordscloud/apis/words_api.py

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1500,6 +1500,86 @@ def copy_style_online_with_http_info(self, request, **kwargs): # noqa: E501
15001500
_request_timeout=params.get('_request_timeout'),
15011501
collection_formats=http_params['collection_formats']))
15021502

1503+
def copy_styles_from_template(self, request, **kwargs): # noqa: E501
1504+
"""Copies styles from the origin document to the target document. # noqa: E501
1505+
1506+
This method makes a synchronous HTTP request by default. To make an
1507+
asynchronous HTTP request, please pass is_async=True
1508+
1509+
:param is_async bool
1510+
:param name str : The filename of the target document. (required)
1511+
:param template_name str : The filename of the origin document. (required)
1512+
:param folder str : Original document folder.
1513+
:param storage str : Original document storage.
1514+
:param load_encoding str : Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
1515+
: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.
1516+
: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.
1517+
:param dest_file_name str : Result path of the document after the operation. If this parameter is omitted then result of the operation will be saved as the source document.
1518+
:param revision_author str : Initials of the author to use for revisions.If you set this parameter and then make some changes to the document programmatically, save the document and later open the document in MS Word you will see these changes as revisions.
1519+
:param revision_date_time str : The date and time to use for revisions.
1520+
:return: WordsResponse
1521+
If the method is called asynchronously,
1522+
returns the request thread.
1523+
"""
1524+
try:
1525+
if kwargs.get('is_async'):
1526+
return self.copy_styles_from_template_with_http_info(request, **kwargs) # noqa: E501
1527+
data = self.copy_styles_from_template_with_http_info(request, **kwargs) # noqa: E501
1528+
return data
1529+
except ApiException as e:
1530+
if e.status == 401:
1531+
self.api_client.request_token()
1532+
if kwargs.get('is_async'):
1533+
return self.copy_styles_from_template_with_http_info(request, **kwargs) # noqa: E501
1534+
data = self.copy_styles_from_template_with_http_info(request, **kwargs) # noqa: E501
1535+
return data
1536+
1537+
def copy_styles_from_template_with_http_info(self, request, **kwargs): # noqa: E501
1538+
"""Copies styles from the origin document to the target document. # noqa: E501
1539+
1540+
This method makes a synchronous HTTP request by default. To make an
1541+
asynchronous HTTP request, please pass is_async=True
1542+
1543+
:param is_async bool
1544+
:param request CopyStylesFromTemplateRequest object with parameters
1545+
:return: WordsResponse
1546+
If the method is called asynchronously,
1547+
returns the request thread.
1548+
"""
1549+
1550+
params = locals()
1551+
params['is_async'] = ''
1552+
params['_preload_content'] = True
1553+
params['_request_timeout'] = self.timeout
1554+
for key, val in six.iteritems(params['kwargs']):
1555+
if key not in params:
1556+
raise TypeError(
1557+
"Got an unexpected keyword argument '%s'"
1558+
" to method copy_styles_from_template" % key
1559+
)
1560+
params[key] = val
1561+
del params['kwargs']
1562+
http_params = request.create_http_request(self.api_client)
1563+
1564+
# Authentication setting
1565+
auth_settings = ['JWT'] # noqa: E501
1566+
1567+
self.api_client.handle_password(http_params, self)
1568+
1569+
return request.deserialize_response(self.api_client, self.api_client.call_api(
1570+
http_params['path'],
1571+
http_params['method'],
1572+
http_params['query_params'],
1573+
http_params['header_params'],
1574+
body=http_params['body'],
1575+
post_params=http_params['form_params'],
1576+
response_type=http_params['response_type'], # noqa: E501
1577+
auth_settings=auth_settings,
1578+
is_async=params.get('is_async'),
1579+
_preload_content=params.get('_preload_content', True),
1580+
_request_timeout=params.get('_request_timeout'),
1581+
collection_formats=http_params['collection_formats']))
1582+
15031583
def create_document(self, request, **kwargs): # noqa: E501
15041584
"""Supported extensions: ".doc", ".docx", ".docm", ".dot", ".dotm", ".dotx", ".flatopc", ".fopc", ".flatopc_macro", ".fopc_macro", ".flatopc_template", ".fopc_template", ".flatopc_template_macro", ".fopc_template_macro", ".wordml", ".wml", ".rtf". # noqa: E501
15051585

asposewordscloud/configuration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,6 @@ def to_debug_report(self):
262262
return "Python SDK Debug Report:\n"\
263263
"OS: {env}\n"\
264264
"Python Version: {pyversion}\n"\
265-
"Version of the API: 22.3\n"\
266-
"SDK Package Version: 22.3".\
265+
"Version of the API: 22.4\n"\
266+
"SDK Package Version: 22.4".\
267267
format(env=sys.platform, pyversion=sys.version)

asposewordscloud/models/epub_save_options_data.py

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ class EpubSaveOptionsData(object):
7777
'export_page_setup': 'bool',
7878
'export_relative_font_size': 'bool',
7979
'export_roundtrip_information': 'bool',
80+
'export_shapes_as_svg': 'bool',
8081
'export_text_box_as_svg': 'bool',
8182
'export_text_input_form_field_as_text': 'bool',
8283
'export_toc_page_numbers': 'bool',
@@ -135,6 +136,7 @@ class EpubSaveOptionsData(object):
135136
'export_page_setup': 'ExportPageSetup',
136137
'export_relative_font_size': 'ExportRelativeFontSize',
137138
'export_roundtrip_information': 'ExportRoundtripInformation',
139+
'export_shapes_as_svg': 'ExportShapesAsSvg',
138140
'export_text_box_as_svg': 'ExportTextBoxAsSvg',
139141
'export_text_input_form_field_as_text': 'ExportTextInputFormFieldAsText',
140142
'export_toc_page_numbers': 'ExportTocPageNumbers',
@@ -158,7 +160,7 @@ class EpubSaveOptionsData(object):
158160
'save_format': 'SaveFormat'
159161
}
160162

161-
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, 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, allow_negative_indent=None, css_class_name_prefix=None, css_style_sheet_file_name=None, css_style_sheet_type=None, document_split_criteria=None, document_split_heading_level=None, encoding=None, export_document_properties=None, export_drop_down_form_field_as_text=None, export_font_resources=None, export_fonts_as_base64=None, export_headers_footers_mode=None, export_images_as_base64=None, export_language_information=None, export_list_labels=None, export_original_url_for_linked_images=None, export_page_margins=None, export_page_setup=None, export_relative_font_size=None, export_roundtrip_information=None, export_text_box_as_svg=None, export_text_input_form_field_as_text=None, export_toc_page_numbers=None, export_xhtml_transitional=None, font_resources_subsetting_size_threshold=None, fonts_folder=None, fonts_folder_alias=None, html_version=None, image_resolution=None, images_folder=None, images_folder_alias=None, metafile_format=None, office_math_output_mode=None, pretty_format=None, resolve_font_names=None, resource_folder=None, resource_folder_alias=None, scale_image_to_shape_size=None, table_width_output_mode=None, epub_navigation_map_level=None): # noqa: E501
163+
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, 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, allow_negative_indent=None, css_class_name_prefix=None, css_style_sheet_file_name=None, css_style_sheet_type=None, document_split_criteria=None, document_split_heading_level=None, encoding=None, export_document_properties=None, export_drop_down_form_field_as_text=None, export_font_resources=None, export_fonts_as_base64=None, export_headers_footers_mode=None, export_images_as_base64=None, export_language_information=None, export_list_labels=None, export_original_url_for_linked_images=None, export_page_margins=None, export_page_setup=None, export_relative_font_size=None, export_roundtrip_information=None, export_shapes_as_svg=None, export_text_box_as_svg=None, export_text_input_form_field_as_text=None, export_toc_page_numbers=None, export_xhtml_transitional=None, font_resources_subsetting_size_threshold=None, fonts_folder=None, fonts_folder_alias=None, html_version=None, image_resolution=None, images_folder=None, images_folder_alias=None, metafile_format=None, office_math_output_mode=None, pretty_format=None, resolve_font_names=None, resource_folder=None, resource_folder_alias=None, scale_image_to_shape_size=None, table_width_output_mode=None, epub_navigation_map_level=None): # noqa: E501
162164
"""EpubSaveOptionsData - a model defined in Swagger""" # noqa: E501
163165

164166
self._allow_embedding_post_script_fonts = None
@@ -195,6 +197,7 @@ def __init__(self, allow_embedding_post_script_fonts=None, custom_time_zone_info
195197
self._export_page_setup = None
196198
self._export_relative_font_size = None
197199
self._export_roundtrip_information = None
200+
self._export_shapes_as_svg = None
198201
self._export_text_box_as_svg = None
199202
self._export_text_input_form_field_as_text = None
200203
self._export_toc_page_numbers = None
@@ -286,6 +289,8 @@ def __init__(self, allow_embedding_post_script_fonts=None, custom_time_zone_info
286289
self.export_relative_font_size = export_relative_font_size
287290
if export_roundtrip_information is not None:
288291
self.export_roundtrip_information = export_roundtrip_information
292+
if export_shapes_as_svg is not None:
293+
self.export_shapes_as_svg = export_shapes_as_svg
289294
if export_text_box_as_svg is not None:
290295
self.export_text_box_as_svg = export_text_box_as_svg
291296
if export_text_input_form_field_as_text is not None:
@@ -1139,6 +1144,28 @@ def export_roundtrip_information(self, export_roundtrip_information):
11391144
"""
11401145
self._export_roundtrip_information = export_roundtrip_information
11411146

1147+
@property
1148+
def export_shapes_as_svg(self):
1149+
"""Gets the export_shapes_as_svg of this EpubSaveOptionsData. # noqa: E501
1150+
1151+
Gets or sets the flag, that controls whether Aspose.Words.Drawing.Shape nodes are converted to SVG images when saving to HTML, MHTML or EPUB. Default value is false. # noqa: E501
1152+
1153+
:return: The export_shapes_as_svg of this EpubSaveOptionsData. # noqa: E501
1154+
:rtype: bool
1155+
"""
1156+
return self._export_shapes_as_svg
1157+
1158+
@export_shapes_as_svg.setter
1159+
def export_shapes_as_svg(self, export_shapes_as_svg):
1160+
"""Sets the export_shapes_as_svg of this EpubSaveOptionsData.
1161+
1162+
Gets or sets the flag, that controls whether Aspose.Words.Drawing.Shape nodes are converted to SVG images when saving to HTML, MHTML or EPUB. Default value is false. # noqa: E501
1163+
1164+
:param export_shapes_as_svg: The export_shapes_as_svg of this EpubSaveOptionsData. # noqa: E501
1165+
:type: bool
1166+
"""
1167+
self._export_shapes_as_svg = export_shapes_as_svg
1168+
11421169
@property
11431170
def export_text_box_as_svg(self):
11441171
"""Gets the export_text_box_as_svg of this EpubSaveOptionsData. # noqa: E501

0 commit comments

Comments
 (0)