We're sorry AsposeCloud doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.cloud

Scan Data Matrix Barcode with Aspose.BarCode REST API Free Trail Plan

Hello, I would like to try out the datamatrix decoding in Aspose Barcode for cloud. The trial only allows me to try Code39 barcodes which does not apply to my scenario.
My barcodes are printed, and before buying, I need to make sure that the service can decode the captures made with my camera device.

Thanks in advance,
Luc

@thelemmings,

We are working on your inquiry. We will update you soon about our findings.

@thelemmings,

This is to update you that the limitation mentioned by you exists. Trial version does not allow recognition of Datamatrix barcode. Please forward us your sample Datamatrix barcode image. We will evaluate it and update you accordingly.

@thelemmings

We want to share that, the latest release of Aspose.BarCode Cloud API is not limited to a specific Barcode in Free Trial Plan. You can create or scan all supported Barcode types from images (JPEG, TIFF, PNG, BMP, GIF, EXIF) using Aspose.Barcode Cloud API. The Free Trial Plan has only 150 monthly free API calls limit.

I have scanned a PNG image with Data Matrix Barcode from a local drive using Aspose.BarCode Cloud SDK for Python in Free Trail Plan and unable to notice any issue. You can use Aspose.Barcode Cloud using any SDK of your preferred programming language from GitHub or via some REST Client to scan the Data Matrix Barcode.

Steps to Scan Data Matrix Barcode in Python

  1. Sign up with Aspose.Cloud and get credentials
  2. Install Aspose.BarCode Cloud SDK for Python from PIP
  3. Create a Python script file for the code
  4. Import Aspose.BarCode Cloud SDK for Python module and initialize the API
  5. Scan an image from local drive for Data Matrix Barcode using PostBarcodeRecognizeFromUrlOrContent API method, it reads the Barcode and returns data in the API response

Code to Scan Data Matrix Barcode in Python

# For complete examples and data files, please go to https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-python
# Import module
import aspose_barcode_cloud
from aspose_barcode_cloud.rest import ApiException

# Get your client ID and Client Secret at https://dashboard.aspose.cloud (free registration is required).
configuration = aspose_barcode_cloud.Configuration(
    client_id="xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx",
    client_secret="xxxxxxxxxxxxxxxxxxxxxxxx"
)

# create an instance of the API class
api = aspose_barcode_cloud.BarcodeApi(aspose_barcode_cloud.ApiClient(configuration))
image_path = 'C:/Temp/datamatrix.png'

try:
    # Recognize barcode
    response = api.post_barcode_recognize_from_url_or_content(image=image_path,type = aspose_barcode_cloud.EncodeBarcodeType.DATAMATRIX, preset=aspose_barcode_cloud.PresetType.HIGHPERFORMANCE)
    print(response)
    print("Barcode scanned successfully")
except ApiException as e:
    print("Exception when calling BarcodeApi->post_barcode_recognize_from_url_or_content: %s\n" % e)

While scanning images for Barcode, It is recommended to use explicit Barcode type hints as it increases the barcode recognition performance.