Skip to content

Commit 213d29c

Browse files
authored
Release 24.1 (#64)
* "types" param for multiple barcode types to read added. mostCommonlyUsed decode type added. * Copyright updated
1 parent b8676c8 commit 213d29c

File tree

110 files changed

+194
-113
lines changed

Some content is hidden

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

110 files changed

+194
-113
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2023 Aspose Pty Ltd
3+
Copyright (c) 2024 Aspose Pty Ltd
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[![Supported PHP Versions](https://img.shields.io/packagist/dependency-v/aspose/barcode-cloud-php/php)](https://packagist.org/packages/aspose/barcode-cloud-php)
77

88
- API version: 3.0
9-
- Package version: 23.12.0
9+
- Package version: 24.1.0
1010
- Supported PHP versions: ">=7.4 || >=8.0"
1111

1212
## Demo applications

docs/Api/BarcodeApi.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ Name | Type | Description | Notes
135135
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
136136

137137
# **getBarcodeRecognize**
138-
> \Aspose\BarCode\Model\BarcodeResponseList getBarcodeRecognize($name, $type, $checksum_validation, $detect_encoding, $preset, $rect_x, $rect_y, $rect_width, $rect_height, $strip_fnc, $timeout, $median_smoothing_window_size, $allow_median_smoothing, $allow_complex_background, $allow_datamatrix_industrial_barcodes, $allow_decreased_image, $allow_detect_scan_gap, $allow_incorrect_barcodes, $allow_invert_image, $allow_micro_white_spots_removing, $allow_one_d_fast_barcodes_detector, $allow_one_d_wiped_bars_restoration, $allow_qr_micro_qr_restoration, $allow_regular_image, $allow_salt_and_pepper_filtering, $allow_white_spots_removing, $check_more1_d_variants, $fast_scan_only, $allow_additional_restorations, $region_likelihood_threshold_percent, $scan_window_sizes, $similarity, $skip_diagonal_search, $read_tiny_barcodes, $australian_post_encoding_table, $ignore_ending_filling_patterns_for_c_table, $storage, $folder)
138+
> \Aspose\BarCode\Model\BarcodeResponseList getBarcodeRecognize($name, $type, $types, $checksum_validation, $detect_encoding, $preset, $rect_x, $rect_y, $rect_width, $rect_height, $strip_fnc, $timeout, $median_smoothing_window_size, $allow_median_smoothing, $allow_complex_background, $allow_datamatrix_industrial_barcodes, $allow_decreased_image, $allow_detect_scan_gap, $allow_incorrect_barcodes, $allow_invert_image, $allow_micro_white_spots_removing, $allow_one_d_fast_barcodes_detector, $allow_one_d_wiped_bars_restoration, $allow_qr_micro_qr_restoration, $allow_regular_image, $allow_salt_and_pepper_filtering, $allow_white_spots_removing, $check_more1_d_variants, $fast_scan_only, $allow_additional_restorations, $region_likelihood_threshold_percent, $scan_window_sizes, $similarity, $skip_diagonal_search, $read_tiny_barcodes, $australian_post_encoding_table, $ignore_ending_filling_patterns_for_c_table, $storage, $folder)
139139
140140
Recognize barcode from a file on server.
141141

@@ -155,6 +155,7 @@ $apiInstance = new Aspose\BarCode\Api\BarcodeApi(
155155
);
156156
$name = "name_example"; // string | The image file name.
157157
$type = "type_example"; // string | The type of barcode to read.
158+
$types = array(new \Aspose\BarCode\Model\\Aspose\BarCode\Model\DecodeBarcodeType()); // \Aspose\BarCode\Model\DecodeBarcodeType[] | Multiple barcode types to read.
158159
$checksum_validation = "checksum_validation_example"; // string | Enable checksum validation during recognition for 1D barcodes. Default is treated as Yes for symbologies which must contain checksum, as No where checksum only possible. Checksum never used: Codabar Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN Checksum always used: Rest symbologies
159160
$detect_encoding = true; // bool | A flag which force engine to detect codetext encoding for Unicode.
160161
$preset = "preset_example"; // string | Preset allows to configure recognition quality and speed manually. You can quickly set up Preset by embedded presets: HighPerformance, NormalQuality, HighQuality, MaxBarCodes or you can manually configure separate options. Default value of Preset is NormalQuality.
@@ -193,7 +194,7 @@ $storage = "storage_example"; // string | The image storage.
193194
$folder = "folder_example"; // string | The image folder.
194195

195196
try {
196-
$result = $apiInstance->getBarcodeRecognize($name, $type, $checksum_validation, $detect_encoding, $preset, $rect_x, $rect_y, $rect_width, $rect_height, $strip_fnc, $timeout, $median_smoothing_window_size, $allow_median_smoothing, $allow_complex_background, $allow_datamatrix_industrial_barcodes, $allow_decreased_image, $allow_detect_scan_gap, $allow_incorrect_barcodes, $allow_invert_image, $allow_micro_white_spots_removing, $allow_one_d_fast_barcodes_detector, $allow_one_d_wiped_bars_restoration, $allow_qr_micro_qr_restoration, $allow_regular_image, $allow_salt_and_pepper_filtering, $allow_white_spots_removing, $check_more1_d_variants, $fast_scan_only, $allow_additional_restorations, $region_likelihood_threshold_percent, $scan_window_sizes, $similarity, $skip_diagonal_search, $read_tiny_barcodes, $australian_post_encoding_table, $ignore_ending_filling_patterns_for_c_table, $storage, $folder);
197+
$result = $apiInstance->getBarcodeRecognize($name, $type, $types, $checksum_validation, $detect_encoding, $preset, $rect_x, $rect_y, $rect_width, $rect_height, $strip_fnc, $timeout, $median_smoothing_window_size, $allow_median_smoothing, $allow_complex_background, $allow_datamatrix_industrial_barcodes, $allow_decreased_image, $allow_detect_scan_gap, $allow_incorrect_barcodes, $allow_invert_image, $allow_micro_white_spots_removing, $allow_one_d_fast_barcodes_detector, $allow_one_d_wiped_bars_restoration, $allow_qr_micro_qr_restoration, $allow_regular_image, $allow_salt_and_pepper_filtering, $allow_white_spots_removing, $check_more1_d_variants, $fast_scan_only, $allow_additional_restorations, $region_likelihood_threshold_percent, $scan_window_sizes, $similarity, $skip_diagonal_search, $read_tiny_barcodes, $australian_post_encoding_table, $ignore_ending_filling_patterns_for_c_table, $storage, $folder);
197198
print_r($result);
198199
} catch (Exception $e) {
199200
echo 'Exception when calling BarcodeApi->getBarcodeRecognize: ', $e->getMessage(), PHP_EOL;
@@ -207,6 +208,7 @@ Name | Type | Description | Notes
207208
------------- | ------------- | ------------- | -------------
208209
**name** | **string**| The image file name. |
209210
**type** | **string**| The type of barcode to read. | [optional]
211+
**types** | [**\Aspose\BarCode\Model\DecodeBarcodeType[]**](../Model/\Aspose\BarCode\Model\DecodeBarcodeType.md)| Multiple barcode types to read. | [optional]
210212
**checksum_validation** | **string**| Enable checksum validation during recognition for 1D barcodes. Default is treated as Yes for symbologies which must contain checksum, as No where checksum only possible. Checksum never used: Codabar Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN Checksum always used: Rest symbologies | [optional]
211213
**detect_encoding** | **bool**| A flag which force engine to detect codetext encoding for Unicode. | [optional]
212214
**preset** | **string**| Preset allows to configure recognition quality and speed manually. You can quickly set up Preset by embedded presets: HighPerformance, NormalQuality, HighQuality, MaxBarCodes or you can manually configure separate options. Default value of Preset is NormalQuality. | [optional]
@@ -260,7 +262,7 @@ Name | Type | Description | Notes
260262
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
261263

262264
# **postBarcodeRecognizeFromUrlOrContent**
263-
> \Aspose\BarCode\Model\BarcodeResponseList postBarcodeRecognizeFromUrlOrContent($type, $checksum_validation, $detect_encoding, $preset, $rect_x, $rect_y, $rect_width, $rect_height, $strip_fnc, $timeout, $median_smoothing_window_size, $allow_median_smoothing, $allow_complex_background, $allow_datamatrix_industrial_barcodes, $allow_decreased_image, $allow_detect_scan_gap, $allow_incorrect_barcodes, $allow_invert_image, $allow_micro_white_spots_removing, $allow_one_d_fast_barcodes_detector, $allow_one_d_wiped_bars_restoration, $allow_qr_micro_qr_restoration, $allow_regular_image, $allow_salt_and_pepper_filtering, $allow_white_spots_removing, $check_more1_d_variants, $fast_scan_only, $allow_additional_restorations, $region_likelihood_threshold_percent, $scan_window_sizes, $similarity, $skip_diagonal_search, $read_tiny_barcodes, $australian_post_encoding_table, $ignore_ending_filling_patterns_for_c_table, $url, $image)
265+
> \Aspose\BarCode\Model\BarcodeResponseList postBarcodeRecognizeFromUrlOrContent($type, $types, $checksum_validation, $detect_encoding, $preset, $rect_x, $rect_y, $rect_width, $rect_height, $strip_fnc, $timeout, $median_smoothing_window_size, $allow_median_smoothing, $allow_complex_background, $allow_datamatrix_industrial_barcodes, $allow_decreased_image, $allow_detect_scan_gap, $allow_incorrect_barcodes, $allow_invert_image, $allow_micro_white_spots_removing, $allow_one_d_fast_barcodes_detector, $allow_one_d_wiped_bars_restoration, $allow_qr_micro_qr_restoration, $allow_regular_image, $allow_salt_and_pepper_filtering, $allow_white_spots_removing, $check_more1_d_variants, $fast_scan_only, $allow_additional_restorations, $region_likelihood_threshold_percent, $scan_window_sizes, $similarity, $skip_diagonal_search, $read_tiny_barcodes, $australian_post_encoding_table, $ignore_ending_filling_patterns_for_c_table, $url, $image)
264266
265267
Recognize barcode from an url or from request body. Request body can contain raw data bytes of the image with content-type \"application/octet-stream\". An image can also be passed as a form field.
266268

@@ -279,6 +281,7 @@ $apiInstance = new Aspose\BarCode\Api\BarcodeApi(
279281
$config
280282
);
281283
$type = "type_example"; // string | The type of barcode to read.
284+
$types = array(new \Aspose\BarCode\Model\\Aspose\BarCode\Model\DecodeBarcodeType()); // \Aspose\BarCode\Model\DecodeBarcodeType[] | Multiple barcode types to read.
282285
$checksum_validation = "checksum_validation_example"; // string | Enable checksum validation during recognition for 1D barcodes. Default is treated as Yes for symbologies which must contain checksum, as No where checksum only possible. Checksum never used: Codabar Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN Checksum always used: Rest symbologies
283286
$detect_encoding = true; // bool | A flag which force engine to detect codetext encoding for Unicode.
284287
$preset = "preset_example"; // string | Preset allows to configure recognition quality and speed manually. You can quickly set up Preset by embedded presets: HighPerformance, NormalQuality, HighQuality, MaxBarCodes or you can manually configure separate options. Default value of Preset is NormalQuality.
@@ -317,7 +320,7 @@ $url = "url_example"; // string | The image file url.
317320
$image = "/path/to/file.txt"; // \SplFileObject | Image data
318321

319322
try {
320-
$result = $apiInstance->postBarcodeRecognizeFromUrlOrContent($type, $checksum_validation, $detect_encoding, $preset, $rect_x, $rect_y, $rect_width, $rect_height, $strip_fnc, $timeout, $median_smoothing_window_size, $allow_median_smoothing, $allow_complex_background, $allow_datamatrix_industrial_barcodes, $allow_decreased_image, $allow_detect_scan_gap, $allow_incorrect_barcodes, $allow_invert_image, $allow_micro_white_spots_removing, $allow_one_d_fast_barcodes_detector, $allow_one_d_wiped_bars_restoration, $allow_qr_micro_qr_restoration, $allow_regular_image, $allow_salt_and_pepper_filtering, $allow_white_spots_removing, $check_more1_d_variants, $fast_scan_only, $allow_additional_restorations, $region_likelihood_threshold_percent, $scan_window_sizes, $similarity, $skip_diagonal_search, $read_tiny_barcodes, $australian_post_encoding_table, $ignore_ending_filling_patterns_for_c_table, $url, $image);
323+
$result = $apiInstance->postBarcodeRecognizeFromUrlOrContent($type, $types, $checksum_validation, $detect_encoding, $preset, $rect_x, $rect_y, $rect_width, $rect_height, $strip_fnc, $timeout, $median_smoothing_window_size, $allow_median_smoothing, $allow_complex_background, $allow_datamatrix_industrial_barcodes, $allow_decreased_image, $allow_detect_scan_gap, $allow_incorrect_barcodes, $allow_invert_image, $allow_micro_white_spots_removing, $allow_one_d_fast_barcodes_detector, $allow_one_d_wiped_bars_restoration, $allow_qr_micro_qr_restoration, $allow_regular_image, $allow_salt_and_pepper_filtering, $allow_white_spots_removing, $check_more1_d_variants, $fast_scan_only, $allow_additional_restorations, $region_likelihood_threshold_percent, $scan_window_sizes, $similarity, $skip_diagonal_search, $read_tiny_barcodes, $australian_post_encoding_table, $ignore_ending_filling_patterns_for_c_table, $url, $image);
321324
print_r($result);
322325
} catch (Exception $e) {
323326
echo 'Exception when calling BarcodeApi->postBarcodeRecognizeFromUrlOrContent: ', $e->getMessage(), PHP_EOL;
@@ -330,6 +333,7 @@ try {
330333
Name | Type | Description | Notes
331334
------------- | ------------- | ------------- | -------------
332335
**type** | **string**| The type of barcode to read. | [optional]
336+
**types** | [**\Aspose\BarCode\Model\DecodeBarcodeType[]**](../Model/\Aspose\BarCode\Model\DecodeBarcodeType.md)| Multiple barcode types to read. | [optional]
333337
**checksum_validation** | **string**| Enable checksum validation during recognition for 1D barcodes. Default is treated as Yes for symbologies which must contain checksum, as No where checksum only possible. Checksum never used: Codabar Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN Checksum always used: Rest symbologies | [optional]
334338
**detect_encoding** | **bool**| A flag which force engine to detect codetext encoding for Unicode. | [optional]
335339
**preset** | **string**| Preset allows to configure recognition quality and speed manually. You can quickly set up Preset by embedded presets: HighPerformance, NormalQuality, HighQuality, MaxBarCodes or you can manually configure separate options. Default value of Preset is NormalQuality. | [optional]

docs/Model/DecodeBarcodeType.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ See DecodeType
8787
* GS1_AZTEC
8888
* GS1_COMPOSITE_BAR
8989
* GS1_MICRO_PDF417
90+
* MOST_COMMONLY_USED
9091

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

docs/Model/ReaderParams.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Represents BarcodeReader object.
66
Name | Type | Description | Notes
77
---- | ---- | ----------- | -----
88
**type** | [**\Aspose\BarCode\Model\DecodeBarcodeType**](DecodeBarcodeType.md) | The type of barcode to read. | [optional]
9+
**types** | [**\Aspose\BarCode\Model\DecodeBarcodeType[]**](DecodeBarcodeType.md) | Multiple barcode types to read. | [optional]
910
**checksum_validation** | [**\Aspose\BarCode\Model\ChecksumValidation**](ChecksumValidation.md) | Enable checksum validation during recognition for 1D barcodes. Default is treated as Yes for symbologies which must contain checksum, as No where checksum only possible. Checksum never used: Codabar Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN Checksum always used: Rest symbologies | [optional]
1011
**detect_encoding** | **bool** | A flag which force engine to detect codetext encoding for Unicode. | [optional]
1112
**preset** | [**\Aspose\BarCode\Model\PresetType**](PresetType.md) | Preset allows to configure recognition quality and speed manually. You can quickly set up Preset by embedded presets: HighPerformance, NormalQuality, HighQuality, MaxBarCodes or you can manually configure separate options. Default value of Preset is NormalQuality. | [optional]

src/Aspose/BarCode/BarcodeApi.php

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
/**
55
* --------------------------------------------------------------------------------------------------------------------
66
* <copyright company="Aspose" file="BarcodeApi.php">
7-
* Copyright (c) 2023 Aspose Pty Ltd
7+
* Copyright (c) 2024 Aspose Pty Ltd
88
* </copyright>
99
* <summary>
1010
* Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -900,6 +900,19 @@ protected function GetBarcodeRecognizeRequest(Requests\GetBarcodeRecognizeReques
900900
}
901901
}
902902
// query params
903+
if (is_array($request->types)) {
904+
$request->types = ObjectSerializer::serializeCollection($request->types, 'multi', true);
905+
}
906+
if (isset($request->types)) {
907+
$localName = lcfirst('Types');
908+
$localValue = is_bool($request->types) ? ($request->types ? 'true' : 'false') : $request->types;
909+
if (strpos($resourcePath, '{' . $localName . '}') !== false) {
910+
$resourcePath = str_replace('{' . $localName . '}', ObjectSerializer::toPathValue($localValue), $resourcePath);
911+
} else {
912+
$queryParams[$localName] = ObjectSerializer::toQueryValue($localValue);
913+
}
914+
}
915+
// query params
903916
if (isset($request->checksum_validation)) {
904917
$localName = lcfirst('ChecksumValidation');
905918
$localValue = is_bool($request->checksum_validation) ? ($request->checksum_validation ? 'true' : 'false') : $request->checksum_validation;
@@ -1507,6 +1520,19 @@ protected function PostBarcodeRecognizeFromUrlOrContentRequest(Requests\PostBarc
15071520
}
15081521
}
15091522
// query params
1523+
if (is_array($request->types)) {
1524+
$request->types = ObjectSerializer::serializeCollection($request->types, 'multi', true);
1525+
}
1526+
if (isset($request->types)) {
1527+
$localName = lcfirst('Types');
1528+
$localValue = is_bool($request->types) ? ($request->types ? 'true' : 'false') : $request->types;
1529+
if (strpos($resourcePath, '{' . $localName . '}') !== false) {
1530+
$resourcePath = str_replace('{' . $localName . '}', ObjectSerializer::toPathValue($localValue), $resourcePath);
1531+
} else {
1532+
$queryParams[$localName] = ObjectSerializer::toQueryValue($localValue);
1533+
}
1534+
}
1535+
// query params
15101536
if (isset($request->checksum_validation)) {
15111537
$localName = lcfirst('ChecksumValidation');
15121538
$localValue = is_bool($request->checksum_validation) ? ($request->checksum_validation ? 'true' : 'false') : $request->checksum_validation;

src/Aspose/BarCode/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class Configuration implements JsonSerializable
2323
*
2424
* @var string
2525
*/
26-
protected $clientVersion = '23.12.0';
26+
protected $clientVersion = '24.1.0';
2727

2828
/**
2929
* ClientId for API

src/Aspose/BarCode/FileApi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
/**
55
* --------------------------------------------------------------------------------------------------------------------
66
* <copyright company="Aspose" file="FileApi.php">
7-
* Copyright (c) 2023 Aspose Pty Ltd
7+
* Copyright (c) 2024 Aspose Pty Ltd
88
* </copyright>
99
* <summary>
1010
* Permission is hereby granted, free of charge, to any person obtaining a copy

src/Aspose/BarCode/FolderApi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
/**
55
* --------------------------------------------------------------------------------------------------------------------
66
* <copyright company="Aspose" file="FolderApi.php">
7-
* Copyright (c) 2023 Aspose Pty Ltd
7+
* Copyright (c) 2024 Aspose Pty Ltd
88
* </copyright>
99
* <summary>
1010
* Permission is hereby granted, free of charge, to any person obtaining a copy

src/Aspose/BarCode/Model/ApiError.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
/**
55
* --------------------------------------------------------------------------------------------------------------------
66
* <copyright company="Aspose" file="ApiError.php">
7-
* Copyright (c) 2023 Aspose Pty Ltd
7+
* Copyright (c) 2024 Aspose Pty Ltd
88
* </copyright>
99
* <summary>
1010
* Permission is hereby granted, free of charge, to any person obtaining a copy

0 commit comments

Comments
 (0)