diff --git a/CHANGELOG.md b/CHANGELOG.md index f4fba96..2e618af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # CHANGELOG +## 1.24.9 + +* Update documentation + +* Add checksumValidation to Scan + +* Add tests for Code39 type without checksum + ## 1.24.8 * August 2024 Release diff --git a/Code39.jpg b/Code39.jpg new file mode 100644 index 0000000..8d11c87 Binary files /dev/null and b/Code39.jpg differ diff --git a/README.md b/README.md index 0905b3a..5d27ccf 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Dart test](https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-dart/actions/workflows/dart.yml/badge.svg?branch=main)](https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-dart/actions/workflows/dart.yml) - API version: 3.0 -- SDK version: 1.24.8 +- SDK version: 1.24.9 This SDK allows you to work with Aspose.BarCode for Cloud REST APIs in your Dart or Flutter applications quickly and easily @@ -34,7 +34,7 @@ Add this dependency to your *pubspec.yaml*: ```yaml dependencies: - aspose_barcode_cloud: 1.24.8 + aspose_barcode_cloud: 1.24.9 ``` ## Sample usage diff --git a/doc/api/BarcodeApi.md b/doc/api/BarcodeApi.md index 45b51af..d5cc75f 100644 --- a/doc/api/BarcodeApi.md +++ b/doc/api/BarcodeApi.md @@ -20,7 +20,7 @@ Method | HTTP request | Description # **getBarcodeGenerate** -> MultipartFile getBarcodeGenerate(type, text, twoDDisplayText, textLocation, textAlignment, textColor, fontSizeMode, noWrap, resolution, resolutionX, resolutionY, dimensionX, textSpace, units, sizeMode, barHeight, imageHeight, imageWidth, rotationAngle, backColor, barColor, borderColor, borderWidth, borderDashStyle, borderVisible, enableChecksum, enableEscape, filledBars, alwaysShowChecksum, wideNarrowRatio, validateText, supplementData, supplementSpace, barWidthReduction, useAntiAlias, format) +> MultipartFile getBarcodeGenerate(type, text, twoDDisplayText, textLocation, textAlignment, textColor, noWrap, resolution, resolutionX, resolutionY, dimensionX, textSpace, units, sizeMode, barHeight, imageHeight, imageWidth, rotationAngle, backColor, barColor, borderColor, borderWidth, borderDashStyle, borderVisible, enableChecksum, enableEscape, filledBars, alwaysShowChecksum, wideNarrowRatio, validateText, supplementData, supplementSpace, barWidthReduction, useAntiAlias, format) Generate barcode. @@ -36,8 +36,7 @@ final text = text_example; // String | Text to encode. final twoDDisplayText = twoDDisplayText_example; // String | Text that will be displayed instead of codetext in 2D barcodes. Used for: Aztec, Pdf417, DataMatrix, QR, MaxiCode, DotCode final textLocation = textLocation_example; // String | Specify the displaying Text Location, set to CodeLocation.None to hide CodeText. Default value: CodeLocation.Below. final textAlignment = textAlignment_example; // String | Text alignment. -final textColor = textColor_example; // String | Specify the displaying CodeText's Color. Default value: Color.Black. -final fontSizeMode = fontSizeMode_example; // String | 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. +final textColor = textColor_example; // String | Specify the displaying CodeText's Color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF final noWrap = true; // bool | Specify word wraps (line breaks) within text. Default value: false. final resolution = 1.2; // double | Resolution of the BarCode image. One value for both dimensions. Default value: 96 dpi. final resolutionX = 1.2; // double | DEPRECATED: Use 'Resolution' instead. @@ -50,9 +49,9 @@ final barHeight = 1.2; // double | Height of the barcode in given units. Default final imageHeight = 1.2; // double | Height of the barcode image in given units. Default units: pixel. final imageWidth = 1.2; // double | Width of the barcode image in given units. Default units: pixel. final rotationAngle = 1.2; // double | 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. -final backColor = backColor_example; // String | Background color of the barcode image. Default value: Color.White. -final barColor = barColor_example; // String | Bars color. Default value: Color.Black. -final borderColor = borderColor_example; // String | Border color. Default value: Color.Black. +final backColor = backColor_example; // String | Background color of the barcode image. Default value: white. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF +final barColor = barColor_example; // String | Bars color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF +final borderColor = borderColor_example; // String | Border color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF final borderWidth = 1.2; // double | Border width. Default value: 0. Ignored if Visible is set to false. final borderDashStyle = borderDashStyle_example; // String | Border dash style. Default value: BorderDashStyle.Solid. final borderVisible = true; // bool | Border visibility. If false than parameter Width is always ignored (0). Default value: false. @@ -69,7 +68,7 @@ final useAntiAlias = true; // bool | Indicates whether is used anti-aliasing mod final format = format_example; // String | Result image format. try { - final result = api_instance.getBarcodeGenerate(type, text, twoDDisplayText, textLocation, textAlignment, textColor, fontSizeMode, noWrap, resolution, resolutionX, resolutionY, dimensionX, textSpace, units, sizeMode, barHeight, imageHeight, imageWidth, rotationAngle, backColor, barColor, borderColor, borderWidth, borderDashStyle, borderVisible, enableChecksum, enableEscape, filledBars, alwaysShowChecksum, wideNarrowRatio, validateText, supplementData, supplementSpace, barWidthReduction, useAntiAlias, format); + final result = api_instance.getBarcodeGenerate(type, text, twoDDisplayText, textLocation, textAlignment, textColor, noWrap, resolution, resolutionX, resolutionY, dimensionX, textSpace, units, sizeMode, barHeight, imageHeight, imageWidth, rotationAngle, backColor, barColor, borderColor, borderWidth, borderDashStyle, borderVisible, enableChecksum, enableEscape, filledBars, alwaysShowChecksum, wideNarrowRatio, validateText, supplementData, supplementSpace, barWidthReduction, useAntiAlias, format); print(result); } catch (e) { print("Exception when calling BarcodeApi->getBarcodeGenerate: $e\n"); @@ -85,8 +84,7 @@ Name | Type | Description | Notes **twoDDisplayText** | **String**| Text that will be displayed instead of codetext in 2D barcodes. Used for: Aztec, Pdf417, DataMatrix, QR, MaxiCode, DotCode | [optional] **textLocation** | **String**| Specify the displaying Text Location, set to CodeLocation.None to hide CodeText. Default value: CodeLocation.Below. | [optional] **textAlignment** | **String**| Text alignment. | [optional] - **textColor** | **String**| Specify the displaying CodeText's Color. Default value: Color.Black. | [optional] - **fontSizeMode** | **String**| 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. | [optional] + **textColor** | **String**| Specify the displaying CodeText's Color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF | [optional] **noWrap** | **bool**| Specify word wraps (line breaks) within text. Default value: false. | [optional] **resolution** | **double**| Resolution of the BarCode image. One value for both dimensions. Default value: 96 dpi. | [optional] **resolutionX** | **double**| DEPRECATED: Use 'Resolution' instead. | [optional] @@ -99,9 +97,9 @@ Name | Type | Description | Notes **imageHeight** | **double**| Height of the barcode image in given units. Default units: pixel. | [optional] **imageWidth** | **double**| Width of the barcode image in given units. Default units: pixel. | [optional] **rotationAngle** | **double**| 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. | [optional] - **backColor** | **String**| Background color of the barcode image. Default value: Color.White. | [optional] - **barColor** | **String**| Bars color. Default value: Color.Black. | [optional] - **borderColor** | **String**| Border color. Default value: Color.Black. | [optional] + **backColor** | **String**| Background color of the barcode image. Default value: white. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF | [optional] + **barColor** | **String**| Bars color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF | [optional] + **borderColor** | **String**| Border color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF | [optional] **borderWidth** | **double**| Border width. Default value: 0. Ignored if Visible is set to false. | [optional] **borderDashStyle** | **String**| Border dash style. Default value: BorderDashStyle.Solid. | [optional] **borderVisible** | **bool**| Border visibility. If false than parameter Width is always ignored (0). Default value: false. | [optional] @@ -410,7 +408,7 @@ Name | Type | Description | Notes # **putBarcodeGenerateFile** -> ResultImageInfo putBarcodeGenerateFile(name, type, text, twoDDisplayText, textLocation, textAlignment, textColor, fontSizeMode, noWrap, resolution, resolutionX, resolutionY, dimensionX, textSpace, units, sizeMode, barHeight, imageHeight, imageWidth, rotationAngle, backColor, barColor, borderColor, borderWidth, borderDashStyle, borderVisible, enableChecksum, enableEscape, filledBars, alwaysShowChecksum, wideNarrowRatio, validateText, supplementData, supplementSpace, barWidthReduction, useAntiAlias, storage, folder, format) +> ResultImageInfo putBarcodeGenerateFile(name, type, text, twoDDisplayText, textLocation, textAlignment, textColor, noWrap, resolution, resolutionX, resolutionY, dimensionX, textSpace, units, sizeMode, barHeight, imageHeight, imageWidth, rotationAngle, backColor, barColor, borderColor, borderWidth, borderDashStyle, borderVisible, enableChecksum, enableEscape, filledBars, alwaysShowChecksum, wideNarrowRatio, validateText, supplementData, supplementSpace, barWidthReduction, useAntiAlias, storage, folder, format) Generate barcode and save on server (from query params or from file with json or xml content) @@ -427,8 +425,7 @@ final text = text_example; // String | Text to encode. final twoDDisplayText = twoDDisplayText_example; // String | Text that will be displayed instead of codetext in 2D barcodes. Used for: Aztec, Pdf417, DataMatrix, QR, MaxiCode, DotCode final textLocation = textLocation_example; // String | Specify the displaying Text Location, set to CodeLocation.None to hide CodeText. Default value: CodeLocation.Below. final textAlignment = textAlignment_example; // String | Text alignment. -final textColor = textColor_example; // String | Specify the displaying CodeText's Color. Default value: Color.Black. -final fontSizeMode = fontSizeMode_example; // String | 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. +final textColor = textColor_example; // String | Specify the displaying CodeText's Color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF final noWrap = true; // bool | Specify word wraps (line breaks) within text. Default value: false. final resolution = 1.2; // double | Resolution of the BarCode image. One value for both dimensions. Default value: 96 dpi. final resolutionX = 1.2; // double | DEPRECATED: Use 'Resolution' instead. @@ -441,9 +438,9 @@ final barHeight = 1.2; // double | Height of the barcode in given units. Default final imageHeight = 1.2; // double | Height of the barcode image in given units. Default units: pixel. final imageWidth = 1.2; // double | Width of the barcode image in given units. Default units: pixel. final rotationAngle = 1.2; // double | 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. -final backColor = backColor_example; // String | Background color of the barcode image. Default value: Color.White. -final barColor = barColor_example; // String | Bars color. Default value: Color.Black. -final borderColor = borderColor_example; // String | Border color. Default value: Color.Black. +final backColor = backColor_example; // String | Background color of the barcode image. Default value: white. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF +final barColor = barColor_example; // String | Bars color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF +final borderColor = borderColor_example; // String | Border color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF final borderWidth = 1.2; // double | Border width. Default value: 0. Ignored if Visible is set to false. final borderDashStyle = borderDashStyle_example; // String | Border dash style. Default value: BorderDashStyle.Solid. final borderVisible = true; // bool | Border visibility. If false than parameter Width is always ignored (0). Default value: false. @@ -462,7 +459,7 @@ final folder = folder_example; // String | Image's folder. final format = format_example; // String | The image format. try { - final result = api_instance.putBarcodeGenerateFile(name, type, text, twoDDisplayText, textLocation, textAlignment, textColor, fontSizeMode, noWrap, resolution, resolutionX, resolutionY, dimensionX, textSpace, units, sizeMode, barHeight, imageHeight, imageWidth, rotationAngle, backColor, barColor, borderColor, borderWidth, borderDashStyle, borderVisible, enableChecksum, enableEscape, filledBars, alwaysShowChecksum, wideNarrowRatio, validateText, supplementData, supplementSpace, barWidthReduction, useAntiAlias, storage, folder, format); + final result = api_instance.putBarcodeGenerateFile(name, type, text, twoDDisplayText, textLocation, textAlignment, textColor, noWrap, resolution, resolutionX, resolutionY, dimensionX, textSpace, units, sizeMode, barHeight, imageHeight, imageWidth, rotationAngle, backColor, barColor, borderColor, borderWidth, borderDashStyle, borderVisible, enableChecksum, enableEscape, filledBars, alwaysShowChecksum, wideNarrowRatio, validateText, supplementData, supplementSpace, barWidthReduction, useAntiAlias, storage, folder, format); print(result); } catch (e) { print("Exception when calling BarcodeApi->putBarcodeGenerateFile: $e\n"); @@ -479,8 +476,7 @@ Name | Type | Description | Notes **twoDDisplayText** | **String**| Text that will be displayed instead of codetext in 2D barcodes. Used for: Aztec, Pdf417, DataMatrix, QR, MaxiCode, DotCode | [optional] **textLocation** | **String**| Specify the displaying Text Location, set to CodeLocation.None to hide CodeText. Default value: CodeLocation.Below. | [optional] **textAlignment** | **String**| Text alignment. | [optional] - **textColor** | **String**| Specify the displaying CodeText's Color. Default value: Color.Black. | [optional] - **fontSizeMode** | **String**| 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. | [optional] + **textColor** | **String**| Specify the displaying CodeText's Color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF | [optional] **noWrap** | **bool**| Specify word wraps (line breaks) within text. Default value: false. | [optional] **resolution** | **double**| Resolution of the BarCode image. One value for both dimensions. Default value: 96 dpi. | [optional] **resolutionX** | **double**| DEPRECATED: Use 'Resolution' instead. | [optional] @@ -493,9 +489,9 @@ Name | Type | Description | Notes **imageHeight** | **double**| Height of the barcode image in given units. Default units: pixel. | [optional] **imageWidth** | **double**| Width of the barcode image in given units. Default units: pixel. | [optional] **rotationAngle** | **double**| 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. | [optional] - **backColor** | **String**| Background color of the barcode image. Default value: Color.White. | [optional] - **barColor** | **String**| Bars color. Default value: Color.Black. | [optional] - **borderColor** | **String**| Border color. Default value: Color.Black. | [optional] + **backColor** | **String**| Background color of the barcode image. Default value: white. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF | [optional] + **barColor** | **String**| Bars color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF | [optional] + **borderColor** | **String**| Border color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF | [optional] **borderWidth** | **double**| Border width. Default value: 0. Ignored if Visible is set to false. | [optional] **borderDashStyle** | **String**| Border dash style. Default value: BorderDashStyle.Solid. | [optional] **borderVisible** | **bool**| Border visibility. If false than parameter Width is always ignored (0). Default value: false. | [optional] @@ -628,7 +624,7 @@ Name | Type | Description | Notes # **scanBarcode** -> BarcodeResponseList scanBarcode(imageFile, decodeTypes, timeout) +> BarcodeResponseList scanBarcode(imageFile, decodeTypes, timeout, checksumValidation) Quickly scan a barcode from an image. @@ -642,9 +638,10 @@ final api_instance = BarcodeApi(); final imageFile = /path/to/file.txt; // MultipartFile | Image as file final decodeTypes = []; // List | Types of barcode to recognize final timeout = 56; // int | 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. +final checksumValidation = checksumValidation_example; // String | Checksum validation setting. Default is ON. try { - final result = api_instance.scanBarcode(imageFile, decodeTypes, timeout); + final result = api_instance.scanBarcode(imageFile, decodeTypes, timeout, checksumValidation); print(result); } catch (e) { print("Exception when calling BarcodeApi->scanBarcode: $e\n"); @@ -658,6 +655,7 @@ Name | Type | Description | Notes **imageFile** | **MultipartFile**| Image as file | **decodeTypes** | [**List<DecodeBarcodeType>**](DecodeBarcodeType.md)| Types of barcode to recognize | [optional] **timeout** | **int**| 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. | [optional] + **checksumValidation** | **String**| Checksum validation setting. Default is ON. | [optional] ### Return type diff --git a/doc/models/CaptionParams.md b/doc/models/CaptionParams.md index 3b75af5..3f73ca6 100644 --- a/doc/models/CaptionParams.md +++ b/doc/models/CaptionParams.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes ---- | ---- | ----------- | ----- **text** | **String** | Caption text. | [optional] [default to null] **alignment** | [**TextAlignment**](TextAlignment.md) | Text alignment. | [optional] [default to null] -**color** | **String** | Text color. | [optional] [default to null] +**color** | **String** | Text color. Default value: black Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF | [optional] [default to null] **visible** | **bool** | Is caption visible. | [optional] [default to null] **font** | [**FontParams**](FontParams.md) | Font. | [optional] [default to null] **padding** | [**Padding**](Padding.md) | Padding. | [optional] [default to null] diff --git a/doc/models/GeneratorParams.md b/doc/models/GeneratorParams.md index 0cdb59a..8ff6f03 100644 --- a/doc/models/GeneratorParams.md +++ b/doc/models/GeneratorParams.md @@ -16,7 +16,7 @@ Name | Type | Description | Notes **twoDDisplayText** | **String** | Text that will be displayed instead of codetext in 2D barcodes. Used for: Aztec, Pdf417, DataMatrix, QR, MaxiCode, DotCode | [optional] [default to null] **textLocation** | [**CodeLocation**](CodeLocation.md) | Specify the displaying Text Location, set to CodeLocation.None to hide CodeText. Default value: CodeLocation.Below. | [optional] [default to null] **textAlignment** | [**TextAlignment**](TextAlignment.md) | Text alignment. | [optional] [default to null] -**textColor** | **String** | Specify the displaying CodeText's Color. Default value: Color.Black. | [optional] [default to null] +**textColor** | **String** | Specify the displaying CodeText's Color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF | [optional] [default to null] **font** | [**FontParams**](FontParams.md) | Specify the displaying Text's font. Default value: Arial 5pt regular. Ignored if FontSizeMode is set to FontSizeMode.Auto. | [optional] [default to null] **fontSizeMode** | [**FontMode**](FontMode.md) | 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. | [optional] [default to null] **noWrap** | **bool** | Specify word wraps (line breaks) within text. Default value: false. | [optional] [default to null] @@ -34,9 +34,9 @@ Name | Type | Description | Notes **padding** | [**Padding**](Padding.md) | Barcode paddings. Default value: 5pt 5pt 5pt 5pt. | [optional] [default to null] **captionAbove** | [**CaptionParams**](CaptionParams.md) | Additional caption above barcode. | [optional] [default to null] **captionBelow** | [**CaptionParams**](CaptionParams.md) | Additional caption below barcode. | [optional] [default to null] -**backColor** | **String** | Background color of the barcode image. Default value: Color.White. | [optional] [default to null] -**barColor** | **String** | Bars color. Default value: Color.Black. | [optional] [default to null] -**borderColor** | **String** | Border color. Default value: Color.Black. | [optional] [default to null] +**backColor** | **String** | Background color of the barcode image. Default value: white. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF | [optional] [default to null] +**barColor** | **String** | Bars color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF | [optional] [default to null] +**borderColor** | **String** | Border color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF | [optional] [default to null] **borderWidth** | **double** | Border width. Default value: 0. Ignored if Visible is set to false. | [optional] [default to null] **borderDashStyle** | [**BorderDashStyle**](BorderDashStyle.md) | Border dash style. Default value: BorderDashStyle.Solid. | [optional] [default to null] **borderVisible** | **bool** | Border visibility. If false than parameter Width is always ignored (0). Default value: false. | [optional] [default to null] @@ -65,6 +65,6 @@ Name | Type | Description | Notes **postal** | [**PostalParams**](PostalParams.md) | Postal params. | [optional] [default to null] **QR** | [**QrParams**](QrParams.md) | QR params. | [optional] [default to null] **patchCode** | [**PatchCodeParams**](PatchCodeParams.md) | PatchCode params. | [optional] [default to null] -**code128** | [**Code128Params**](Code128Params.md) | Code128 params. | [optional] [default to null] +**code128** | [**Code128Params**](Code128Params.md) | Code128 parameters | [optional] [default to null] **hanXin** | [**HanXinParams**](HanXinParams.md) | HanXin params. | [optional] [default to null] diff --git a/lib/src/api/barcode_api.dart b/lib/src/api/barcode_api.dart index 89716fc..70aaf67 100644 --- a/lib/src/api/barcode_api.dart +++ b/lib/src/api/barcode_api.dart @@ -21,7 +21,6 @@ class BarcodeApi { String? textLocation, String? textAlignment, String? textColor, - String? fontSizeMode, bool? noWrap, double? resolution, double? resolutionX, @@ -80,10 +79,6 @@ class BarcodeApi { queryParams.addAll( convertParametersForCollectionFormat("", "TextColor", textColor)); } - if (fontSizeMode != null) { - queryParams.addAll(convertParametersForCollectionFormat( - "", "FontSizeMode", fontSizeMode)); - } if (noWrap != null) { queryParams .addAll(convertParametersForCollectionFormat("", "NoWrap", noWrap)); @@ -751,7 +746,6 @@ class BarcodeApi { String? textLocation, String? textAlignment, String? textColor, - String? fontSizeMode, bool? noWrap, double? resolution, double? resolutionX, @@ -813,10 +807,6 @@ class BarcodeApi { queryParams.addAll( convertParametersForCollectionFormat("", "TextColor", textColor)); } - if (fontSizeMode != null) { - queryParams.addAll(convertParametersForCollectionFormat( - "", "FontSizeMode", fontSizeMode)); - } if (noWrap != null) { queryParams .addAll(convertParametersForCollectionFormat("", "NoWrap", noWrap)); @@ -1064,7 +1054,9 @@ class BarcodeApi { /// Quickly scan a barcode from an image. /// Future scanBarcode(MultipartFile imageFile, - {List? decodeTypes, int? timeout}) async { + {List? decodeTypes, + int? timeout, + String? checksumValidation}) async { // ignore: prefer_final_locals Object? postBody; @@ -1102,6 +1094,13 @@ class BarcodeApi { mp.fields['timeout'] = [parameterToString(timeout)]; } + if (checksumValidation != null) { + hasFields = true; + mp.fields['checksumValidation'] = [ + parameterToString(checksumValidation) + ]; + } + if (hasFields) { postBody = mp; } @@ -1112,6 +1111,10 @@ class BarcodeApi { if (timeout != null) { formParams['timeout'] = parameterToString(timeout); } + if (checksumValidation != null) { + formParams['checksumValidation'] = + parameterToString(checksumValidation); + } } final response = await _apiClient.invokeAPI( diff --git a/lib/src/api_client.dart b/lib/src/api_client.dart index 0cb839d..7fe2c87 100644 --- a/lib/src/api_client.dart +++ b/lib/src/api_client.dart @@ -10,7 +10,7 @@ import 'api_helper.dart'; import 'auth/authentication.dart'; /// Current SDK Version -const SDK_VERSION = "1.24.8"; +const SDK_VERSION = "1.24.9"; /// ApiClient is responsible for making HTTP requests to the API. class ApiClient { diff --git a/lib/src/model/caption_params.dart b/lib/src/model/caption_params.dart index 72afe19..bfa8c15 100644 --- a/lib/src/model/caption_params.dart +++ b/lib/src/model/caption_params.dart @@ -10,7 +10,7 @@ class CaptionParams { /// Text alignment. TextAlignment? alignment; - /// Text color. + /// Text color. Default value: black Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF String? color; /// Is caption visible. diff --git a/lib/src/model/generator_params.dart b/lib/src/model/generator_params.dart index 8feba23..2c10b61 100644 --- a/lib/src/model/generator_params.dart +++ b/lib/src/model/generator_params.dart @@ -19,7 +19,7 @@ class GeneratorParams { /// Text alignment. TextAlignment? textAlignment; - /// Specify the displaying CodeText's Color. Default value: Color.Black. + /// Specify the displaying CodeText's Color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF String? textColor; /// Specify the displaying Text's font. Default value: Arial 5pt regular. Ignored if FontSizeMode is set to FontSizeMode.Auto. @@ -73,13 +73,13 @@ class GeneratorParams { /// Additional caption below barcode. CaptionParams? captionBelow; - /// Background color of the barcode image. Default value: Color.White. + /// Background color of the barcode image. Default value: white. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF String? backColor; - /// Bars color. Default value: Color.Black. + /// Bars color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF String? barColor; - /// Border color. Default value: Color.Black. + /// Border color. Default value: black. Use named colors like: red, green, blue Or HTML colors like: #FF0000, #00FF00, #0000FF String? borderColor; /// Border width. Default value: 0. Ignored if Visible is set to false. @@ -166,7 +166,7 @@ class GeneratorParams { /// PatchCode params. PatchCodeParams? patchCode; - /// Code128 params. + /// Code128 parameters Code128Params? code128; /// HanXin params. diff --git a/pubspec.yaml b/pubspec.yaml index bf3d769..b97ab6e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: aspose_barcode_cloud description: This SDK allows you to work with Aspose.BarCode for Cloud REST APIs in your Dart or Flutter applications quickly and easily -version: 1.24.8 +version: 1.24.9 homepage: https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-dart platforms: diff --git a/test/scan_test.dart b/test/scan_test.dart index c3e0cad..5117b9d 100644 --- a/test/scan_test.dart +++ b/test/scan_test.dart @@ -30,4 +30,24 @@ void main() { expect(recognized.barcodes![1].barcodeValue, equals('Code128 text')); }, ); + + test( + '.scanBarcodes can scan Code39', + () async { + final barcode = await MultipartFile.fromPath("ImageFile", "Code39.jpg"); + final BarcodeResponseList recognized = + await TestConfig.barcodeApi.scanBarcode( + barcode, + decodeTypes: [DecodeBarcodeType.Code39Extended], + checksumValidation: ChecksumValidation.Off.toString(), + ); + + expect(recognized, isNotNull); + expect(recognized.barcodes, isNotEmpty); + expect(recognized.barcodes!.length, equals(1)); + + expect(recognized.barcodes![0].type, equals('Code39Extended')); + expect(recognized.barcodes![0].barcodeValue, equals('8M93')); + }, + ); }