Skip to content

Commit

Permalink
Release 24.1 (#64)
Browse files Browse the repository at this point in the history
* "types" param for multiple barcode types to read added.

mostCommonlyUsed decode type added.

* Copyright updated
  • Loading branch information
ivankamkin authored Jan 30, 2024
1 parent b8676c8 commit 213d29c
Show file tree
Hide file tree
Showing 110 changed files with 194 additions and 113 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 Aspose Pty Ltd
Copyright (c) 2024 Aspose Pty Ltd

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[![Supported PHP Versions](https://img.shields.io/packagist/dependency-v/aspose/barcode-cloud-php/php)](https://packagist.org/packages/aspose/barcode-cloud-php)

- API version: 3.0
- Package version: 23.12.0
- Package version: 24.1.0
- Supported PHP versions: ">=7.4 || >=8.0"

## Demo applications
Expand Down
12 changes: 8 additions & 4 deletions docs/Api/BarcodeApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ Name | Type | Description | Notes
[[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)

# **getBarcodeRecognize**
> \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)
> \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)
Recognize barcode from a file on server.

Expand All @@ -155,6 +155,7 @@ $apiInstance = new Aspose\BarCode\Api\BarcodeApi(
);
$name = "name_example"; // string | The image file name.
$type = "type_example"; // string | The type of barcode to read.
$types = array(new \Aspose\BarCode\Model\\Aspose\BarCode\Model\DecodeBarcodeType()); // \Aspose\BarCode\Model\DecodeBarcodeType[] | Multiple barcode types to read.
$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
$detect_encoding = true; // bool | A flag which force engine to detect codetext encoding for Unicode.
$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.
Expand Down Expand Up @@ -193,7 +194,7 @@ $storage = "storage_example"; // string | The image storage.
$folder = "folder_example"; // string | The image folder.

try {
$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);
$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);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BarcodeApi->getBarcodeRecognize: ', $e->getMessage(), PHP_EOL;
Expand All @@ -207,6 +208,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**name** | **string**| The image file name. |
**type** | **string**| The type of barcode to read. | [optional]
**types** | [**\Aspose\BarCode\Model\DecodeBarcodeType[]**](../Model/\Aspose\BarCode\Model\DecodeBarcodeType.md)| Multiple barcode types to read. | [optional]
**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]
**detect_encoding** | **bool**| A flag which force engine to detect codetext encoding for Unicode. | [optional]
**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]
Expand Down Expand Up @@ -260,7 +262,7 @@ Name | Type | Description | Notes
[[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)

# **postBarcodeRecognizeFromUrlOrContent**
> \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)
> \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)
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.

Expand All @@ -279,6 +281,7 @@ $apiInstance = new Aspose\BarCode\Api\BarcodeApi(
$config
);
$type = "type_example"; // string | The type of barcode to read.
$types = array(new \Aspose\BarCode\Model\\Aspose\BarCode\Model\DecodeBarcodeType()); // \Aspose\BarCode\Model\DecodeBarcodeType[] | Multiple barcode types to read.
$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
$detect_encoding = true; // bool | A flag which force engine to detect codetext encoding for Unicode.
$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.
Expand Down Expand Up @@ -317,7 +320,7 @@ $url = "url_example"; // string | The image file url.
$image = "/path/to/file.txt"; // \SplFileObject | Image data

try {
$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);
$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);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BarcodeApi->postBarcodeRecognizeFromUrlOrContent: ', $e->getMessage(), PHP_EOL;
Expand All @@ -330,6 +333,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**type** | **string**| The type of barcode to read. | [optional]
**types** | [**\Aspose\BarCode\Model\DecodeBarcodeType[]**](../Model/\Aspose\BarCode\Model\DecodeBarcodeType.md)| Multiple barcode types to read. | [optional]
**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]
**detect_encoding** | **bool**| A flag which force engine to detect codetext encoding for Unicode. | [optional]
**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]
Expand Down
1 change: 1 addition & 0 deletions docs/Model/DecodeBarcodeType.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ See DecodeType
* GS1_AZTEC
* GS1_COMPOSITE_BAR
* GS1_MICRO_PDF417
* MOST_COMMONLY_USED

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

Expand Down
1 change: 1 addition & 0 deletions docs/Model/ReaderParams.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Represents BarcodeReader object.
Name | Type | Description | Notes
---- | ---- | ----------- | -----
**type** | [**\Aspose\BarCode\Model\DecodeBarcodeType**](DecodeBarcodeType.md) | The type of barcode to read. | [optional]
**types** | [**\Aspose\BarCode\Model\DecodeBarcodeType[]**](DecodeBarcodeType.md) | Multiple barcode types to read. | [optional]
**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]
**detect_encoding** | **bool** | A flag which force engine to detect codetext encoding for Unicode. | [optional]
**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]
Expand Down
28 changes: 27 additions & 1 deletion src/Aspose/BarCode/BarcodeApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/**
* --------------------------------------------------------------------------------------------------------------------
* <copyright company="Aspose" file="BarcodeApi.php">
* Copyright (c) 2023 Aspose Pty Ltd
* Copyright (c) 2024 Aspose Pty Ltd
* </copyright>
* <summary>
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down Expand Up @@ -900,6 +900,19 @@ protected function GetBarcodeRecognizeRequest(Requests\GetBarcodeRecognizeReques
}
}
// query params
if (is_array($request->types)) {
$request->types = ObjectSerializer::serializeCollection($request->types, 'multi', true);
}
if (isset($request->types)) {
$localName = lcfirst('Types');
$localValue = is_bool($request->types) ? ($request->types ? 'true' : 'false') : $request->types;
if (strpos($resourcePath, '{' . $localName . '}') !== false) {
$resourcePath = str_replace('{' . $localName . '}', ObjectSerializer::toPathValue($localValue), $resourcePath);
} else {
$queryParams[$localName] = ObjectSerializer::toQueryValue($localValue);
}
}
// query params
if (isset($request->checksum_validation)) {
$localName = lcfirst('ChecksumValidation');
$localValue = is_bool($request->checksum_validation) ? ($request->checksum_validation ? 'true' : 'false') : $request->checksum_validation;
Expand Down Expand Up @@ -1507,6 +1520,19 @@ protected function PostBarcodeRecognizeFromUrlOrContentRequest(Requests\PostBarc
}
}
// query params
if (is_array($request->types)) {
$request->types = ObjectSerializer::serializeCollection($request->types, 'multi', true);
}
if (isset($request->types)) {
$localName = lcfirst('Types');
$localValue = is_bool($request->types) ? ($request->types ? 'true' : 'false') : $request->types;
if (strpos($resourcePath, '{' . $localName . '}') !== false) {
$resourcePath = str_replace('{' . $localName . '}', ObjectSerializer::toPathValue($localValue), $resourcePath);
} else {
$queryParams[$localName] = ObjectSerializer::toQueryValue($localValue);
}
}
// query params
if (isset($request->checksum_validation)) {
$localName = lcfirst('ChecksumValidation');
$localValue = is_bool($request->checksum_validation) ? ($request->checksum_validation ? 'true' : 'false') : $request->checksum_validation;
Expand Down
2 changes: 1 addition & 1 deletion src/Aspose/BarCode/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Configuration implements JsonSerializable
*
* @var string
*/
protected $clientVersion = '23.12.0';
protected $clientVersion = '24.1.0';

/**
* ClientId for API
Expand Down
2 changes: 1 addition & 1 deletion src/Aspose/BarCode/FileApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/**
* --------------------------------------------------------------------------------------------------------------------
* <copyright company="Aspose" file="FileApi.php">
* Copyright (c) 2023 Aspose Pty Ltd
* Copyright (c) 2024 Aspose Pty Ltd
* </copyright>
* <summary>
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 1 addition & 1 deletion src/Aspose/BarCode/FolderApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/**
* --------------------------------------------------------------------------------------------------------------------
* <copyright company="Aspose" file="FolderApi.php">
* Copyright (c) 2023 Aspose Pty Ltd
* Copyright (c) 2024 Aspose Pty Ltd
* </copyright>
* <summary>
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 1 addition & 1 deletion src/Aspose/BarCode/Model/ApiError.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/**
* --------------------------------------------------------------------------------------------------------------------
* <copyright company="Aspose" file="ApiError.php">
* Copyright (c) 2023 Aspose Pty Ltd
* Copyright (c) 2024 Aspose Pty Ltd
* </copyright>
* <summary>
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 1 addition & 1 deletion src/Aspose/BarCode/Model/ApiErrorResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/**
* --------------------------------------------------------------------------------------------------------------------
* <copyright company="Aspose" file="ApiErrorResponse.php">
* Copyright (c) 2023 Aspose Pty Ltd
* Copyright (c) 2024 Aspose Pty Ltd
* </copyright>
* <summary>
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
Loading

0 comments on commit 213d29c

Please sign in to comment.