Skip to content

Commit cc4e198

Browse files
committed
Update to v20.8
1 parent 59ddc87 commit cc4e198

File tree

10 files changed

+52
-19
lines changed

10 files changed

+52
-19
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Aspose.PDF Cloud
22
- API version: 3.0
3-
- Package version: 20.7.0
3+
- Package version: 20.8.0
44

55
[Aspose.PDF Cloud](https://products.aspose.cloud/pdf) is a true REST API that enables you to perform a wide range of document processing operations including creation, manipulation, conversion and rendering of Pdf documents in the cloud.
66

asposepdfcloud/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def __init__(self, app_key, app_sid, host=None):
8383
self.rest_client = RESTClientObject()
8484
self.default_headers = {}
8585
self.default_headers['x-aspose-client'] = 'python sdk'
86-
self.default_headers['x-aspose-client-version'] = '20.7.0'
86+
self.default_headers['x-aspose-client-version'] = '20.8.0'
8787

8888
self.app_key = app_key
8989
self.app_sid = app_sid

asposepdfcloud/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,5 +199,5 @@ def to_debug_report(self):
199199
"OS: {env}\n"\
200200
"Python Version: {pyversion}\n"\
201201
"Version of the API: 3.0\n"\
202-
"SDK Package Version: 20.7.0".\
202+
"SDK Package Version: 20.8.0".\
203203
format(env=sys.platform, pyversion=sys.version)

asposepdfcloud/models/paragraph.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def wrap_mode(self, wrap_mode):
169169
def horizontal_alignment(self):
170170
"""
171171
Gets the horizontal_alignment of this Paragraph.
172-
Horizontal alignment for the text inside paragrph's rectangle.
172+
Horizontal alignment for the text inside paragraph's rectangle.
173173
174174
:return: The horizontal_alignment of this Paragraph.
175175
:rtype: TextHorizontalAlignment
@@ -180,7 +180,7 @@ def horizontal_alignment(self):
180180
def horizontal_alignment(self, horizontal_alignment):
181181
"""
182182
Sets the horizontal_alignment of this Paragraph.
183-
Horizontal alignment for the text inside paragrph's rectangle.
183+
Horizontal alignment for the text inside paragraph's rectangle.
184184
185185
:param horizontal_alignment: The horizontal_alignment of this Paragraph.
186186
:type: TextHorizontalAlignment
@@ -353,7 +353,7 @@ def subsequent_lines_indent(self, subsequent_lines_indent):
353353
def vertical_alignment(self):
354354
"""
355355
Gets the vertical_alignment of this Paragraph.
356-
Vertical alignment for the text inside paragrph's rectangle
356+
Vertical alignment for the text inside paragraph's rectangle
357357
358358
:return: The vertical_alignment of this Paragraph.
359359
:rtype: VerticalAlignment
@@ -364,7 +364,7 @@ def vertical_alignment(self):
364364
def vertical_alignment(self, vertical_alignment):
365365
"""
366366
Sets the vertical_alignment of this Paragraph.
367-
Vertical alignment for the text inside paragrph's rectangle
367+
Vertical alignment for the text inside paragraph's rectangle
368368
369369
:param vertical_alignment: The vertical_alignment of this Paragraph.
370370
:type: VerticalAlignment

asposepdfcloud/models/text_state.py

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,20 @@ class TextState(object):
5252
'font': 'str',
5353
'foreground_color': 'Color',
5454
'background_color': 'Color',
55-
'font_style': 'FontStyles'
55+
'font_style': 'FontStyles',
56+
'font_file': 'str'
5657
}
5758

5859
attribute_map = {
5960
'font_size': 'FontSize',
6061
'font': 'Font',
6162
'foreground_color': 'ForegroundColor',
6263
'background_color': 'BackgroundColor',
63-
'font_style': 'FontStyle'
64+
'font_style': 'FontStyle',
65+
'font_file': 'FontFile'
6466
}
6567

66-
def __init__(self, font_size=None, font=None, foreground_color=None, background_color=None, font_style=None):
68+
def __init__(self, font_size=None, font=None, foreground_color=None, background_color=None, font_style=None, font_file=None):
6769
"""
6870
TextState - a model defined in Swagger
6971
"""
@@ -73,6 +75,7 @@ def __init__(self, font_size=None, font=None, foreground_color=None, background_
7375
self._foreground_color = None
7476
self._background_color = None
7577
self._font_style = None
78+
self._font_file = None
7679

7780
self.font_size = font_size
7881
if font is not None:
@@ -82,6 +85,8 @@ def __init__(self, font_size=None, font=None, foreground_color=None, background_
8285
if background_color is not None:
8386
self.background_color = background_color
8487
self.font_style = font_style
88+
if font_file is not None:
89+
self.font_file = font_file
8590

8691
@property
8792
def font_size(self):
@@ -112,7 +117,7 @@ def font_size(self, font_size):
112117
def font(self):
113118
"""
114119
Gets the font of this TextState.
115-
Gets or sets font of the text.
120+
Gets or sets font name of the text.
116121
117122
:return: The font of this TextState.
118123
:rtype: str
@@ -123,7 +128,7 @@ def font(self):
123128
def font(self, font):
124129
"""
125130
Sets the font of this TextState.
126-
Gets or sets font of the text.
131+
Gets or sets font name of the text.
127132
128133
:param font: The font of this TextState.
129134
:type: str
@@ -202,6 +207,29 @@ def font_style(self, font_style):
202207

203208
self._font_style = font_style
204209

210+
@property
211+
def font_file(self):
212+
"""
213+
Gets the font_file of this TextState.
214+
Sets path of font file in storage.
215+
216+
:return: The font_file of this TextState.
217+
:rtype: str
218+
"""
219+
return self._font_file
220+
221+
@font_file.setter
222+
def font_file(self, font_file):
223+
"""
224+
Sets the font_file of this TextState.
225+
Sets path of font file in storage.
226+
227+
:param font_file: The font_file of this TextState.
228+
:type: str
229+
"""
230+
231+
self._font_file = font_file
232+
205233
def to_dict(self):
206234
"""
207235
Returns the model properties as a dict

docs/Paragraph.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**line_spacing** | [**LineSpacing**](LineSpacing.md) | Line spacing mode. | [optional]
88
**wrap_mode** | [**WrapMode**](WrapMode.md) | Word wrap mode. | [optional]
9-
**horizontal_alignment** | [**TextHorizontalAlignment**](TextHorizontalAlignment.md) | Horizontal alignment for the text inside paragrph's rectangle. | [optional]
9+
**horizontal_alignment** | [**TextHorizontalAlignment**](TextHorizontalAlignment.md) | Horizontal alignment for the text inside paragraph's rectangle. | [optional]
1010
**left_margin** | **float** | Left margin. | [optional]
1111
**right_margin** | **float** | Right margin. | [optional]
1212
**top_margin** | **float** | Top margin. | [optional]
1313
**bottom_margin** | **float** | Bottom margin. | [optional]
1414
**rectangle** | [**Rectangle**](Rectangle.md) | Rectangle of the paragraph. | [optional]
1515
**rotation** | **float** | Rotation angle in degrees. | [optional]
1616
**subsequent_lines_indent** | **float** | Subsequent lines indent value. | [optional]
17-
**vertical_alignment** | [**VerticalAlignment**](VerticalAlignment.md) | Vertical alignment for the text inside paragrph's rectangle | [optional]
17+
**vertical_alignment** | [**VerticalAlignment**](VerticalAlignment.md) | Vertical alignment for the text inside paragraph's rectangle | [optional]
1818
**lines** | [**list[TextLine]**](TextLine.md) | An array of text lines. |
1919

2020
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

docs/TextState.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ Represents a text state of a text
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**font_size** | **float** | Gets or sets font size of the text. |
8-
**font** | **str** | Gets or sets font of the text. | [optional]
8+
**font** | **str** | Gets or sets font name of the text. | [optional]
99
**foreground_color** | [**Color**](Color.md) | Gets or sets foreground color of the text. | [optional]
1010
**background_color** | [**Color**](Color.md) | Sets background color of the text. | [optional]
1111
**font_style** | [**FontStyles**](FontStyles.md) | Sets font style of the text. |
12+
**font_file** | **str** | Sets path of font file in storage. | [optional]
1213

1314
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1415

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
from setuptools import setup, find_packages
3333

3434
NAME = "asposepdfcloud"
35-
VERSION = "20.7.0"
35+
VERSION = "20.8.0"
3636
# To install the library, run the following
3737
#
3838
# python setup.py install

test/pdf_tests.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ def testPostPageTextStamps(self):
267267

268268
page_number = 1
269269

270-
text_state = asposepdfcloud.models.TextState(font_size=14, font_style=asposepdfcloud.models.FontStyles.REGULAR)
270+
text_state = asposepdfcloud.models.TextState(font_size=14, font_style=asposepdfcloud.models.FontStyles.REGULAR, font='Arial')
271271

272272
stamp = asposepdfcloud.models.TextStamp()
273273
stamp.background = True
@@ -5029,6 +5029,9 @@ def testPutAddText(self):
50295029
file_name = '4pages.pdf'
50305030
self.uploadFile(file_name)
50315031

5032+
font_file = 'Righteous-Regular.ttf'
5033+
self.uploadFile(font_file)
5034+
50325035
page_number = 1
50335036

50345037
rectangle = asposepdfcloud.models.Rectangle(100, 100, 300, 300)
@@ -5039,10 +5042,11 @@ def testPutAddText(self):
50395042

50405043
text_state = asposepdfcloud.models.TextState(
50415044
font_size=10,
5042-
font='Arial',
5045+
font='Righteous',
50435046
foreground_color=foreground_color,
50445047
background_color=background_color,
5045-
font_style=asposepdfcloud.models.FontStyles.BOLD)
5048+
font_style=asposepdfcloud.models.FontStyles.REGULAR,
5049+
font_file=self.temp_folder + '/' + font_file)
50465050

50475051
segment = asposepdfcloud.models.Segment(value='segment 1', text_state=text_state)
50485052

test_data/Righteous-Regular.ttf

39.9 KB
Binary file not shown.

0 commit comments

Comments
 (0)