Recognize Decorated, Dot Peen Datamatrix Barcode and Export Barcode Properties to XML with Aspose.BarCode for .Net 7.6.0

Share on FacebookTweet about this on TwitterShare on LinkedIn

We are pleased to announce the release of Aspose.BarCode for .NET 7.6.0. Decorated and dot peen datamatrix barcode recognition are the top of the list in this release. Export barcode properties to XML file feature has also been incorporated in this release.

Detect Decorated Datamatrix Barcode

Aspose.BarCode for .Net provides facility to recognize decorated datamatrix barcode.

Following is the simple code illustration of the decorated datamatrix barcode detection.


string filename = @"datamatrix-stars.png";

// Initialize the BarCodeReader class by passing barcode file name and barcode type as parameters.
using (BarCodeReader reader = new BarCodeReader(filename, BarCodeReadType.DataMatrix))
{
        // Set the reader recognition mode.
	reader.RecognitionMode = RecognitionMode.ManualHints;

        // Set Manual Hint property to speed up recognition process.
	reader.ManualHints = ManualHint.SpecialFormOfCells;

	while (reader.Read())
	{
		Console.WriteLine(reader.GetReadType() + ": " + reader.GetCodeText());
	}
}

Detect Dot Peen Datamatrix Barcode

Aspose.BarCode for .Net provides support to recognize dot peen datamatrix barcode.

Following is the simple code demonstrating dot peen datamatrix barcode recognition.


string filename = @"testDotPeen.png";

// Initialize the BarCodeReader class by passing barcode file name and barcode type as parameters.
using (BarCodeReader reader = new BarCodeReader(filename, BarCodeReadType.DataMatrix))
{

        // Set the reader recognition mode.
	reader.RecognitionMode = RecognitionMode.ManualHints;

        // Set Manual Hint property to speed up recognition process.
	reader.ManualHints = ManualHint.SpecialFormOfCells;
	while (reader.Read())
	{
		Console.WriteLine(reader.GetReadType() + ": " + reader.GetCodeText());
	}
}

Export Barcode Properties To XML

Aspose.BarCode for .Net exposed a new method ExportToXml to export barcode properties to XML file.

Following is the code sample to export barcode properties to XML file.


// Initialize the BarCodeBuilder class by passing barcode text and barcode symbology as parameters.
BarCodeBuilder builder = new BarCodeBuilder("abcdefghijklmnopqrstuvwxyzabcdef", Symbology.DataMatrix);

// set various different properties/variables of the barcode.
builder.BorderVisible = true;
builder.ImageQuality = ImageQualityMode.AntiAlias;
builder.CodeLocation = CodeLocation.Above;
builder.Columns = 4;
builder.Rows = 3;

// Specify caption settings.
builder.CaptionAbove = new Caption("{Caption ABOVE}");
builder.CaptionAbove.TextAlign = System.Drawing.StringAlignment.Center;
builder.CaptionAbove.Visible = true;
builder.CaptionAbove.ForeColor = Color.Green;

builder.CaptionBelow = new Caption("{Caption BELOW}");
builder.CaptionBelow.TextAlign = System.Drawing.StringAlignment.Far;
builder.CaptionBelow.Visible = true;
builder.CaptionBelow.ForeColor = Color.Yellow;

// Specify text font settings.
builder.CodeTextFont = new Font("Courier New", 24, FontStyle.Bold | FontStyle.Italic);

string fileNameTmp = @"C:\TEMP\BarCodeBuilder.DataMatrix.xml";

// call the export to XML method to export the properties to XML file.
builder.ExportToXml(fileNameTmp);

Enhancements

Following enhancements have been introduced in this release.

  • Code39Standard and Code128 barcode recognition in win-form applications has been improved.

  • QR barcode recognition from PDF process has been improved.

  • BarCodeReader.GetAngle functionality has been improved.

  • Datamatrix barcode recognition has been improved.

Please review the release notes of Aspose.BarCode for .Net 7.6.0 for a complete list of new feature & enhancements. If you are planning to upgrade the API from any previous version, we strongly suggest you to check the Public API Changes section to know what has been changed since your current revision of the API.

Aspose.BarCode for .NET Resources

The resources, you may need to accomplish your tasks: