Skip to content

Commit 653ea77

Browse files
Merge branch 'master' into release
2 parents 8ef4314 + d20eba9 commit 653ea77

24 files changed

+1887
-173
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +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.6
20+
21+
- Added 'DeleteBookmark' and 'DeleteBookmarkOnline' API methods for delete bookmarks by name from the document.
22+
- Added 'DeleteBookmarks' and 'DeleteBookmarksOnline' API methods for delete all bookmarks from the document.
23+
- Added 'InsertBookmark' and 'InsertBookmarkOnline' API methods for create new bookmarks in the document.
24+
- Support all save formats for 'CreateDocument' operation.
25+
26+
27+
## Enhancements in Version 22.5
28+
29+
- Internal API fixes and improvments.
30+
31+
1932
## Enhancements in Version 22.4
2033

2134
- Added ExportShapesAsSvg to HtmlSaveOption.
15.3 KB
Binary file not shown.

asposewordscloud/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
from asposewordscloud.models.bmp_save_options_data import BmpSaveOptionsData
1616
from asposewordscloud.models.bookmark import Bookmark
1717
from asposewordscloud.models.bookmark_data import BookmarkData
18+
from asposewordscloud.models.bookmark_insert import BookmarkInsert
1819
from asposewordscloud.models.bookmark_response import BookmarkResponse
1920
from asposewordscloud.models.bookmarks import Bookmarks
2021
from asposewordscloud.models.bookmarks_outline_level_data import BookmarksOutlineLevelData

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.5'}
86+
self.default_headers = {'x-aspose-client': 'python sdk', 'x-aspose-version': '22.6'}
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.5'
91+
self.user_agent = 'python sdk 22.6'
9292

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

asposewordscloud/apis/words_api.py

Lines changed: 567 additions & 2 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
@@ -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.5\n"\
266-
"SDK Package Version: 22.5".\
265+
"Version of the API: 22.6\n"\
266+
"SDK Package Version: 22.6".\
267267
format(env=sys.platform, pyversion=sys.version)

asposewordscloud/models/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from asposewordscloud.models.bmp_save_options_data import BmpSaveOptionsData
1111
from asposewordscloud.models.bookmark import Bookmark
1212
from asposewordscloud.models.bookmark_data import BookmarkData
13+
from asposewordscloud.models.bookmark_insert import BookmarkInsert
1314
from asposewordscloud.models.bookmark_response import BookmarkResponse
1415
from asposewordscloud.models.bookmarks import Bookmarks
1516
from asposewordscloud.models.bookmarks_outline_level_data import BookmarksOutlineLevelData
Lines changed: 237 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,237 @@
1+
# coding: utf-8
2+
# -----------------------------------------------------------------------------------
3+
# <copyright company="Aspose" file="bookmark_insert.py">
4+
# Copyright (c) 2022 Aspose.Words for Cloud
5+
# </copyright>
6+
# <summary>
7+
# Permission is hereby granted, free of charge, to any person obtaining a copy
8+
# of this software and associated documentation files (the "Software"), to deal
9+
# in the Software without restriction, including without limitation the rights
10+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
# copies of the Software, and to permit persons to whom the Software is
12+
# furnished to do so, subject to the following conditions:
13+
#
14+
# The above copyright notice and this permission notice shall be included in all
15+
# copies or substantial portions of the Software.
16+
#
17+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23+
# SOFTWARE.
24+
# </summary>
25+
# -----------------------------------------------------------------------------------
26+
import pprint
27+
import re # noqa: F401
28+
29+
import datetime
30+
import six
31+
import json
32+
33+
34+
class BookmarkInsert(object):
35+
"""Represents a bookmark to insert.
36+
"""
37+
38+
"""
39+
Attributes:
40+
swagger_types (dict): The key is attribute name
41+
and the value is attribute type.
42+
attribute_map (dict): The key is attribute name
43+
and the value is json key in definition.
44+
"""
45+
swagger_types = {
46+
'name': 'str',
47+
'text': 'str',
48+
'end_range': 'DocumentPosition',
49+
'start_range': 'DocumentPosition'
50+
}
51+
52+
attribute_map = {
53+
'name': 'Name',
54+
'text': 'Text',
55+
'end_range': 'EndRange',
56+
'start_range': 'StartRange'
57+
}
58+
59+
def __init__(self, name=None, text=None, end_range=None, start_range=None): # noqa: E501
60+
"""BookmarkInsert - a model defined in Swagger""" # noqa: E501
61+
62+
self._name = None
63+
self._text = None
64+
self._end_range = None
65+
self._start_range = None
66+
self.discriminator = None
67+
68+
if name is not None:
69+
self.name = name
70+
if text is not None:
71+
self.text = text
72+
if end_range is not None:
73+
self.end_range = end_range
74+
if start_range is not None:
75+
self.start_range = start_range
76+
77+
@property
78+
def name(self):
79+
"""Gets the name of this BookmarkInsert. # noqa: E501
80+
81+
Gets or sets the name of the bookmark. # noqa: E501
82+
83+
:return: The name of this BookmarkInsert. # noqa: E501
84+
:rtype: str
85+
"""
86+
return self._name
87+
88+
@name.setter
89+
def name(self, name):
90+
"""Sets the name of this BookmarkInsert.
91+
92+
Gets or sets the name of the bookmark. # noqa: E501
93+
94+
:param name: The name of this BookmarkInsert. # noqa: E501
95+
:type: str
96+
"""
97+
self._name = name
98+
99+
@property
100+
def text(self):
101+
"""Gets the text of this BookmarkInsert. # noqa: E501
102+
103+
Gets or sets text, enclosed in the bookmark. # noqa: E501
104+
105+
:return: The text of this BookmarkInsert. # noqa: E501
106+
:rtype: str
107+
"""
108+
return self._text
109+
110+
@text.setter
111+
def text(self, text):
112+
"""Sets the text of this BookmarkInsert.
113+
114+
Gets or sets text, enclosed in the bookmark. # noqa: E501
115+
116+
:param text: The text of this BookmarkInsert. # noqa: E501
117+
:type: str
118+
"""
119+
self._text = text
120+
121+
@property
122+
def end_range(self):
123+
"""Gets the end_range of this BookmarkInsert. # noqa: E501
124+
125+
Gets or sets the link to end bookmark node. # noqa: E501
126+
127+
:return: The end_range of this BookmarkInsert. # noqa: E501
128+
:rtype: DocumentPosition
129+
"""
130+
return self._end_range
131+
132+
@end_range.setter
133+
def end_range(self, end_range):
134+
"""Sets the end_range of this BookmarkInsert.
135+
136+
Gets or sets the link to end bookmark node. # noqa: E501
137+
138+
:param end_range: The end_range of this BookmarkInsert. # noqa: E501
139+
:type: DocumentPosition
140+
"""
141+
self._end_range = end_range
142+
143+
@property
144+
def start_range(self):
145+
"""Gets the start_range of this BookmarkInsert. # noqa: E501
146+
147+
Gets or sets the link to start bookmark node. # noqa: E501
148+
149+
:return: The start_range of this BookmarkInsert. # noqa: E501
150+
:rtype: DocumentPosition
151+
"""
152+
return self._start_range
153+
154+
@start_range.setter
155+
def start_range(self, start_range):
156+
"""Sets the start_range of this BookmarkInsert.
157+
158+
Gets or sets the link to start bookmark node. # noqa: E501
159+
160+
:param start_range: The start_range of this BookmarkInsert. # noqa: E501
161+
:type: DocumentPosition
162+
"""
163+
self._start_range = start_range
164+
165+
166+
def to_dict(self):
167+
"""Returns the model properties as a dict"""
168+
result = {}
169+
170+
for attr, _ in six.iteritems(self.swagger_types):
171+
value = getattr(self, attr)
172+
if value is None:
173+
continue
174+
if isinstance(value, list):
175+
result[self.attribute_map[attr]] = list(map(
176+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
177+
value
178+
))
179+
elif hasattr(value, "to_dict"):
180+
result[self.attribute_map[attr]] = value.to_dict()
181+
elif isinstance(value, dict):
182+
result[self.attribute_map[attr]] = dict(map(
183+
lambda item: (item[0], item[1].to_dict())
184+
if hasattr(item[1], "to_dict") else item,
185+
value.items()
186+
))
187+
elif isinstance(value, (datetime.datetime, datetime.date)):
188+
result[self.attribute_map[attr]] = value.isoformat()
189+
else:
190+
result[self.attribute_map[attr]] = value
191+
192+
return result
193+
194+
def to_json(self):
195+
"""Returns the model properties as a dict"""
196+
result = {}
197+
198+
for attr, _ in six.iteritems(self.swagger_types):
199+
value = getattr(self, attr)
200+
if isinstance(value, list):
201+
result[self.attribute_map[attr]] = list(map(
202+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
203+
value
204+
))
205+
elif hasattr(value, "to_dict"):
206+
result[self.attribute_map[attr]] = value.to_dict()
207+
elif isinstance(value, dict):
208+
result[self.attribute_map[attr]] = dict(map(
209+
lambda item: (item[0], item[1].to_dict())
210+
if hasattr(item[1], "to_dict") else item,
211+
value.items()
212+
))
213+
elif isinstance(value, (datetime.datetime, datetime.date)):
214+
result[self.attribute_map[attr]] = value.isoformat()
215+
else:
216+
result[self.attribute_map[attr]] = value
217+
218+
return json.dumps(result)
219+
220+
def to_str(self):
221+
"""Returns the string representation of the model"""
222+
return pprint.pformat(self.to_dict())
223+
224+
def __repr__(self):
225+
"""For `print` and `pprint`"""
226+
return self.to_str()
227+
228+
def __eq__(self, other):
229+
"""Returns true if both objects are equal"""
230+
if not isinstance(other, BookmarkInsert):
231+
return False
232+
233+
return self.__dict__ == other.__dict__
234+
235+
def __ne__(self, other):
236+
"""Returns true if both objects are not equal"""
237+
return not self == other

asposewordscloud/models/epub_save_options_data.py

Lines changed: 1 addition & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ 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',
81-
'export_text_box_as_svg': 'bool',
8280
'export_text_input_form_field_as_text': 'bool',
8381
'export_toc_page_numbers': 'bool',
8482
'export_xhtml_transitional': 'bool',
@@ -136,8 +134,6 @@ class EpubSaveOptionsData(object):
136134
'export_page_setup': 'ExportPageSetup',
137135
'export_relative_font_size': 'ExportRelativeFontSize',
138136
'export_roundtrip_information': 'ExportRoundtripInformation',
139-
'export_shapes_as_svg': 'ExportShapesAsSvg',
140-
'export_text_box_as_svg': 'ExportTextBoxAsSvg',
141137
'export_text_input_form_field_as_text': 'ExportTextInputFormFieldAsText',
142138
'export_toc_page_numbers': 'ExportTocPageNumbers',
143139
'export_xhtml_transitional': 'ExportXhtmlTransitional',
@@ -160,7 +156,7 @@ class EpubSaveOptionsData(object):
160156
'save_format': 'SaveFormat'
161157
}
162158

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
159+
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_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
164160
"""EpubSaveOptionsData - a model defined in Swagger""" # noqa: E501
165161

166162
self._allow_embedding_post_script_fonts = None
@@ -197,8 +193,6 @@ def __init__(self, allow_embedding_post_script_fonts=None, custom_time_zone_info
197193
self._export_page_setup = None
198194
self._export_relative_font_size = None
199195
self._export_roundtrip_information = None
200-
self._export_shapes_as_svg = None
201-
self._export_text_box_as_svg = None
202196
self._export_text_input_form_field_as_text = None
203197
self._export_toc_page_numbers = None
204198
self._export_xhtml_transitional = None
@@ -289,10 +283,6 @@ def __init__(self, allow_embedding_post_script_fonts=None, custom_time_zone_info
289283
self.export_relative_font_size = export_relative_font_size
290284
if export_roundtrip_information is not None:
291285
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
294-
if export_text_box_as_svg is not None:
295-
self.export_text_box_as_svg = export_text_box_as_svg
296286
if export_text_input_form_field_as_text is not None:
297287
self.export_text_input_form_field_as_text = export_text_input_form_field_as_text
298288
if export_toc_page_numbers is not None:
@@ -1144,50 +1134,6 @@ def export_roundtrip_information(self, export_roundtrip_information):
11441134
"""
11451135
self._export_roundtrip_information = export_roundtrip_information
11461136

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-
1169-
@property
1170-
def export_text_box_as_svg(self):
1171-
"""Gets the export_text_box_as_svg of this EpubSaveOptionsData. # noqa: E501
1172-
1173-
Gets or sets the flag, that controls how textboxes represented by Aspose.Words.Drawing.Shape are saved to HTML, MHTML or EPUB. The default value is false. When set to true, exports textboxes as inline "svg" elements. When false, exports as "image" elements. # noqa: E501
1174-
1175-
:return: The export_text_box_as_svg of this EpubSaveOptionsData. # noqa: E501
1176-
:rtype: bool
1177-
"""
1178-
return self._export_text_box_as_svg
1179-
1180-
@export_text_box_as_svg.setter
1181-
def export_text_box_as_svg(self, export_text_box_as_svg):
1182-
"""Sets the export_text_box_as_svg of this EpubSaveOptionsData.
1183-
1184-
Gets or sets the flag, that controls how textboxes represented by Aspose.Words.Drawing.Shape are saved to HTML, MHTML or EPUB. The default value is false. When set to true, exports textboxes as inline "svg" elements. When false, exports as "image" elements. # noqa: E501
1185-
1186-
:param export_text_box_as_svg: The export_text_box_as_svg of this EpubSaveOptionsData. # noqa: E501
1187-
:type: bool
1188-
"""
1189-
self._export_text_box_as_svg = export_text_box_as_svg
1190-
11911137
@property
11921138
def export_text_input_form_field_as_text(self):
11931139
"""Gets the export_text_input_form_field_as_text of this EpubSaveOptionsData. # noqa: E501

0 commit comments

Comments
 (0)