Skip to content

Commit 76df3b8

Browse files
authored
Release 24.9 (#80)
* Update documentation * Add checksumValidation * Add test for Code39 type without checksum * Update version to 24.9.0
1 parent d7192b9 commit 76df3b8

File tree

12 files changed

+99
-80
lines changed

12 files changed

+99
-80
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![PyPI](https://img.shields.io/pypi/v/aspose-barcode-cloud)](https://pypi.org/project/aspose-barcode-cloud/)
66

77
- API version: 3.0
8-
- Package version: 24.8.0
8+
- Package version: 24.9.0
99

1010
## Demo applications
1111

aspose_barcode_cloud/api/barcode_api.py

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ def get_barcode_generate(
2626
text_location=None,
2727
text_alignment=None,
2828
text_color=None,
29-
font_size_mode=None,
3029
no_wrap=None,
3130
resolution=None,
3231
resolution_x=None,
@@ -71,8 +70,7 @@ def get_barcode_generate(
7170
:param str two_d_display_text: Text that will be displayed instead of codetext in 2D barcodes. Used for: Aztec, Pdf417, DataMatrix, QR, MaxiCode, DotCode # noqa: E501
7271
:param str text_location: Specify the displaying Text Location, set to CodeLocation.None to hide CodeText. Default value: CodeLocation.Below. # noqa: E501
7372
:param str text_alignment: Text alignment. # noqa: E501
74-
:param str text_color: Specify the displaying CodeText's Color. Default value: Color.Black. # noqa: E501
75-
:param str font_size_mode: Specify FontSizeMode. If FontSizeMode is set to Auto, font size will be calculated automatically based on xDimension value. It is recommended to use FontSizeMode.Auto especially in AutoSizeMode.Nearest or AutoSizeMode.Interpolation. Default value: FontSizeMode.Auto. # noqa: E501
73+
:param str text_color: Specify the displaying CodeText's Color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF # noqa: E501
7674
:param bool no_wrap: Specify word wraps (line breaks) within text. Default value: false. # noqa: E501
7775
:param float resolution: Resolution of the BarCode image. One value for both dimensions. Default value: 96 dpi. # noqa: E501
7876
:param float resolution_x: DEPRECATED: Use 'Resolution' instead. # noqa: E501
@@ -85,9 +83,9 @@ def get_barcode_generate(
8583
:param float image_height: Height of the barcode image in given units. Default units: pixel. # noqa: E501
8684
:param float image_width: Width of the barcode image in given units. Default units: pixel. # noqa: E501
8785
:param float rotation_angle: BarCode image rotation angle, measured in degree, e.g. RotationAngle = 0 or RotationAngle = 360 means no rotation. If RotationAngle NOT equal to 90, 180, 270 or 0, it may increase the difficulty for the scanner to read the image. Default value: 0. # noqa: E501
88-
:param str back_color: Background color of the barcode image. Default value: Color.White. # noqa: E501
89-
:param str bar_color: Bars color. Default value: Color.Black. # noqa: E501
90-
:param str border_color: Border color. Default value: Color.Black. # noqa: E501
86+
:param str back_color: Background color of the barcode image. Default value: white. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF # noqa: E501
87+
:param str bar_color: Bars color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF # noqa: E501
88+
:param str border_color: Border color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF # noqa: E501
9189
:param float border_width: Border width. Default value: 0. Ignored if Visible is set to false. # noqa: E501
9290
:param str border_dash_style: Border dash style. Default value: BorderDashStyle.Solid. # noqa: E501
9391
:param bool border_visible: Border visibility. If false than parameter Width is always ignored (0). Default value: false. # noqa: E501
@@ -116,7 +114,6 @@ def get_barcode_generate(
116114
text_location=text_location,
117115
text_alignment=text_alignment,
118116
text_color=text_color,
119-
font_size_mode=font_size_mode,
120117
no_wrap=no_wrap,
121118
resolution=resolution,
122119
resolution_x=resolution_x,
@@ -156,7 +153,6 @@ def get_barcode_generate(
156153
text_location=text_location,
157154
text_alignment=text_alignment,
158155
text_color=text_color,
159-
font_size_mode=font_size_mode,
160156
no_wrap=no_wrap,
161157
resolution=resolution,
162158
resolution_x=resolution_x,
@@ -212,7 +208,6 @@ def get_barcode_generate_with_http_info(self, type, text, **kwargs):
212208
"text_location",
213209
"text_alignment",
214210
"text_color",
215-
"font_size_mode",
216211
"no_wrap",
217212
"resolution",
218213
"resolution_x",
@@ -281,8 +276,6 @@ def get_barcode_generate_with_http_info(self, type, text, **kwargs):
281276
query_params.append(("TextAlignment", params["text_alignment"]))
282277
if "text_color" in params:
283278
query_params.append(("TextColor", params["text_color"]))
284-
if "font_size_mode" in params:
285-
query_params.append(("FontSizeMode", params["font_size_mode"]))
286279
if "no_wrap" in params:
287280
query_params.append(("NoWrap", params["no_wrap"]))
288281
if "resolution" in params:
@@ -1240,7 +1233,6 @@ def put_barcode_generate_file(
12401233
text_location=None,
12411234
text_alignment=None,
12421235
text_color=None,
1243-
font_size_mode=None,
12441236
no_wrap=None,
12451237
resolution=None,
12461238
resolution_x=None,
@@ -1288,8 +1280,7 @@ def put_barcode_generate_file(
12881280
:param str two_d_display_text: Text that will be displayed instead of codetext in 2D barcodes. Used for: Aztec, Pdf417, DataMatrix, QR, MaxiCode, DotCode # noqa: E501
12891281
:param str text_location: Specify the displaying Text Location, set to CodeLocation.None to hide CodeText. Default value: CodeLocation.Below. # noqa: E501
12901282
:param str text_alignment: Text alignment. # noqa: E501
1291-
:param str text_color: Specify the displaying CodeText's Color. Default value: Color.Black. # noqa: E501
1292-
:param str font_size_mode: Specify FontSizeMode. If FontSizeMode is set to Auto, font size will be calculated automatically based on xDimension value. It is recommended to use FontSizeMode.Auto especially in AutoSizeMode.Nearest or AutoSizeMode.Interpolation. Default value: FontSizeMode.Auto. # noqa: E501
1283+
:param str text_color: Specify the displaying CodeText's Color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF # noqa: E501
12931284
:param bool no_wrap: Specify word wraps (line breaks) within text. Default value: false. # noqa: E501
12941285
:param float resolution: Resolution of the BarCode image. One value for both dimensions. Default value: 96 dpi. # noqa: E501
12951286
:param float resolution_x: DEPRECATED: Use 'Resolution' instead. # noqa: E501
@@ -1302,9 +1293,9 @@ def put_barcode_generate_file(
13021293
:param float image_height: Height of the barcode image in given units. Default units: pixel. # noqa: E501
13031294
:param float image_width: Width of the barcode image in given units. Default units: pixel. # noqa: E501
13041295
:param float rotation_angle: BarCode image rotation angle, measured in degree, e.g. RotationAngle = 0 or RotationAngle = 360 means no rotation. If RotationAngle NOT equal to 90, 180, 270 or 0, it may increase the difficulty for the scanner to read the image. Default value: 0. # noqa: E501
1305-
:param str back_color: Background color of the barcode image. Default value: Color.White. # noqa: E501
1306-
:param str bar_color: Bars color. Default value: Color.Black. # noqa: E501
1307-
:param str border_color: Border color. Default value: Color.Black. # noqa: E501
1296+
:param str back_color: Background color of the barcode image. Default value: white. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF # noqa: E501
1297+
:param str bar_color: Bars color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF # noqa: E501
1298+
:param str border_color: Border color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF # noqa: E501
13081299
:param float border_width: Border width. Default value: 0. Ignored if Visible is set to false. # noqa: E501
13091300
:param str border_dash_style: Border dash style. Default value: BorderDashStyle.Solid. # noqa: E501
13101301
:param bool border_visible: Border visibility. If false than parameter Width is always ignored (0). Default value: false. # noqa: E501
@@ -1336,7 +1327,6 @@ def put_barcode_generate_file(
13361327
text_location=text_location,
13371328
text_alignment=text_alignment,
13381329
text_color=text_color,
1339-
font_size_mode=font_size_mode,
13401330
no_wrap=no_wrap,
13411331
resolution=resolution,
13421332
resolution_x=resolution_x,
@@ -1379,7 +1369,6 @@ def put_barcode_generate_file(
13791369
text_location=text_location,
13801370
text_alignment=text_alignment,
13811371
text_color=text_color,
1382-
font_size_mode=font_size_mode,
13831372
no_wrap=no_wrap,
13841373
resolution=resolution,
13851374
resolution_x=resolution_x,
@@ -1439,7 +1428,6 @@ def put_barcode_generate_file_with_http_info(self, name, type, text, **kwargs):
14391428
"text_location",
14401429
"text_alignment",
14411430
"text_color",
1442-
"font_size_mode",
14431431
"no_wrap",
14441432
"resolution",
14451433
"resolution_x",
@@ -1515,8 +1503,6 @@ def put_barcode_generate_file_with_http_info(self, name, type, text, **kwargs):
15151503
query_params.append(("TextAlignment", params["text_alignment"]))
15161504
if "text_color" in params:
15171505
query_params.append(("TextColor", params["text_color"]))
1518-
if "font_size_mode" in params:
1519-
query_params.append(("FontSizeMode", params["font_size_mode"]))
15201506
if "no_wrap" in params:
15211507
query_params.append(("NoWrap", params["no_wrap"]))
15221508
if "resolution" in params:
@@ -1857,7 +1843,9 @@ def put_generate_multiple_with_http_info(self, name, generator_params_list, **kw
18571843
collection_formats=collection_formats,
18581844
)
18591845

1860-
def scan_barcode(self, image_file, decode_types=None, timeout=None, async_req=False, **kwargs):
1846+
def scan_barcode(
1847+
self, image_file, decode_types=None, timeout=None, checksum_validation=None, async_req=False, **kwargs
1848+
):
18611849
"""Quickly scan a barcode from an image.
18621850
18631851
This method makes a synchronous HTTP request by default. To make an
@@ -1868,16 +1856,29 @@ def scan_barcode(self, image_file, decode_types=None, timeout=None, async_req=Fa
18681856
:param file image_file: Image as file # noqa: E501
18691857
:param list[DecodeBarcodeType] decode_types: Types of barcode to recognize # noqa: E501
18701858
:param int timeout: Timeout of recognition process in milliseconds. Default value is 15_000 (15 seconds). Maximum value is 30_000 (1/2 minute). In case of a timeout RequestTimeout (408) status will be returned. Try reducing the image size to avoid timeout. # noqa: E501
1859+
:param str checksum_validation: Checksum validation setting. Default is ON. # noqa: E501
18711860
:param async_req bool
18721861
:return: BarcodeResponseList
18731862
If the method is called asynchronously,
18741863
returns the request thread.
18751864
"""
18761865
kwargs["_return_http_data_only"] = True
18771866
if async_req:
1878-
return self.scan_barcode_with_http_info(image_file, decode_types=decode_types, timeout=timeout, **kwargs)
1867+
return self.scan_barcode_with_http_info(
1868+
image_file,
1869+
decode_types=decode_types,
1870+
timeout=timeout,
1871+
checksum_validation=checksum_validation,
1872+
**kwargs
1873+
)
18791874
else:
1880-
(data) = self.scan_barcode_with_http_info(image_file, decode_types=decode_types, timeout=timeout, **kwargs)
1875+
(data) = self.scan_barcode_with_http_info(
1876+
image_file,
1877+
decode_types=decode_types,
1878+
timeout=timeout,
1879+
checksum_validation=checksum_validation,
1880+
**kwargs
1881+
)
18811882
return data
18821883

18831884
def scan_barcode_with_http_info(self, image_file, **kwargs):
@@ -1894,7 +1895,7 @@ def scan_barcode_with_http_info(self, image_file, **kwargs):
18941895
returns the request thread.
18951896
"""
18961897

1897-
all_params = {"image_file", "decode_types", "timeout"}
1898+
all_params = {"image_file", "decode_types", "timeout", "checksum_validation"}
18981899
all_params.add("async_req")
18991900
all_params.add("_return_http_data_only")
19001901
all_params.add("_preload_content")
@@ -1930,6 +1931,8 @@ def scan_barcode_with_http_info(self, image_file, **kwargs):
19301931
collection_formats["decodeTypes"] = "multi"
19311932
if "timeout" in params:
19321933
form_params.append(("timeout", params["timeout"]))
1934+
if "checksum_validation" in params:
1935+
form_params.append(("checksumValidation", params["checksum_validation"]))
19331936

19341937
body_params = None
19351938
# HTTP header "Accept"

aspose_barcode_cloud/api_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@ def __init__(self, configuration=None, header_name=None, header_value=None, cook
6060
self.rest_client = RESTClientObject(configuration)
6161
self.default_headers = {
6262
"x-aspose-client": "python sdk",
63-
"x-aspose-client-version": "24.8.0",
63+
"x-aspose-client-version": "24.9.0",
6464
}
6565
if header_name is not None:
6666
self.default_headers[header_name] = header_value
6767
self.cookie = cookie
6868
# Set default User-Agent.
69-
self.user_agent = "Aspose-Barcode-SDK/24.8.0/python"
69+
self.user_agent = "Aspose-Barcode-SDK/24.9.0/python"
7070

7171
def __del__(self):
7272
self.rest_client.close()

aspose_barcode_cloud/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ def to_debug_report(self):
258258
"OS: {env}\n"
259259
"Python Version: {pyversion}\n"
260260
"Version of the API: 3.0\n"
261-
"SDK Package Version: 24.8.0".format(env=sys.platform, pyversion=sys.version)
261+
"SDK Package Version: 24.9.0".format(env=sys.platform, pyversion=sys.version)
262262
)
263263

264264
@staticmethod

aspose_barcode_cloud/models/caption_params.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def alignment(self, alignment):
117117
def color(self):
118118
"""Gets the color of this CaptionParams. # noqa: E501
119119
120-
Text color. # noqa: E501
120+
Text color. Default value: black Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF # noqa: E501
121121
122122
:return: The color of this CaptionParams. # noqa: E501
123123
:rtype: str
@@ -128,7 +128,7 @@ def color(self):
128128
def color(self, color):
129129
"""Sets the color of this CaptionParams.
130130
131-
Text color. # noqa: E501
131+
Text color. Default value: black Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF # noqa: E501
132132
133133
:param color: The color of this CaptionParams. # noqa: E501
134134
:type: str

aspose_barcode_cloud/models/generator_params.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ def text_alignment(self, text_alignment):
489489
def text_color(self):
490490
"""Gets the text_color of this GeneratorParams. # noqa: E501
491491
492-
Specify the displaying CodeText's Color. Default value: Color.Black. # noqa: E501
492+
Specify the displaying CodeText's Color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF # noqa: E501
493493
494494
:return: The text_color of this GeneratorParams. # noqa: E501
495495
:rtype: str
@@ -500,7 +500,7 @@ def text_color(self):
500500
def text_color(self, text_color):
501501
"""Sets the text_color of this GeneratorParams.
502502
503-
Specify the displaying CodeText's Color. Default value: Color.Black. # noqa: E501
503+
Specify the displaying CodeText's Color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF # noqa: E501
504504
505505
:param text_color: The text_color of this GeneratorParams. # noqa: E501
506506
:type: str
@@ -911,7 +911,7 @@ def caption_below(self, caption_below):
911911
def back_color(self):
912912
"""Gets the back_color of this GeneratorParams. # noqa: E501
913913
914-
Background color of the barcode image. Default value: Color.White. # noqa: E501
914+
Background color of the barcode image. Default value: white. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF # noqa: E501
915915
916916
:return: The back_color of this GeneratorParams. # noqa: E501
917917
:rtype: str
@@ -922,7 +922,7 @@ def back_color(self):
922922
def back_color(self, back_color):
923923
"""Sets the back_color of this GeneratorParams.
924924
925-
Background color of the barcode image. Default value: Color.White. # noqa: E501
925+
Background color of the barcode image. Default value: white. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF # noqa: E501
926926
927927
:param back_color: The back_color of this GeneratorParams. # noqa: E501
928928
:type: str
@@ -934,7 +934,7 @@ def back_color(self, back_color):
934934
def bar_color(self):
935935
"""Gets the bar_color of this GeneratorParams. # noqa: E501
936936
937-
Bars color. Default value: Color.Black. # noqa: E501
937+
Bars color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF # noqa: E501
938938
939939
:return: The bar_color of this GeneratorParams. # noqa: E501
940940
:rtype: str
@@ -945,7 +945,7 @@ def bar_color(self):
945945
def bar_color(self, bar_color):
946946
"""Sets the bar_color of this GeneratorParams.
947947
948-
Bars color. Default value: Color.Black. # noqa: E501
948+
Bars color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF # noqa: E501
949949
950950
:param bar_color: The bar_color of this GeneratorParams. # noqa: E501
951951
:type: str
@@ -957,7 +957,7 @@ def bar_color(self, bar_color):
957957
def border_color(self):
958958
"""Gets the border_color of this GeneratorParams. # noqa: E501
959959
960-
Border color. Default value: Color.Black. # noqa: E501
960+
Border color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF # noqa: E501
961961
962962
:return: The border_color of this GeneratorParams. # noqa: E501
963963
:rtype: str
@@ -968,7 +968,7 @@ def border_color(self):
968968
def border_color(self, border_color):
969969
"""Sets the border_color of this GeneratorParams.
970970
971-
Border color. Default value: Color.Black. # noqa: E501
971+
Border color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF # noqa: E501
972972
973973
:param border_color: The border_color of this GeneratorParams. # noqa: E501
974974
:type: str
@@ -1624,7 +1624,7 @@ def patch_code(self, patch_code):
16241624
def code128(self):
16251625
"""Gets the code128 of this GeneratorParams. # noqa: E501
16261626
1627-
Code128 params. # noqa: E501
1627+
Code128 parameters # noqa: E501
16281628
16291629
:return: The code128 of this GeneratorParams. # noqa: E501
16301630
:rtype: Code128Params
@@ -1635,7 +1635,7 @@ def code128(self):
16351635
def code128(self, code128):
16361636
"""Sets the code128 of this GeneratorParams.
16371637
1638-
Code128 params. # noqa: E501
1638+
Code128 parameters # noqa: E501
16391639
16401640
:param code128: The code128 of this GeneratorParams. # noqa: E501
16411641
:type: Code128Params

0 commit comments

Comments
 (0)