Created
June 19, 2026 10:20
-
-
Save aspose-com-gists/47a7d456aa02f46a12bb0eb53ac3ae3e to your computer and use it in GitHub Desktop.
Generate High Density Data Matrix Code in .NET
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Generate High Density Data Matrix Code in .NET | |
| // Read the full guide here: https://blog.aspose.com/barcode/generate-high-density-data-matrix-code-in-dotnet/ | |
| using System; | |
| using Aspose.BarCode.Generation; | |
| namespace HighDensityDataMatrixDemo | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| // Initialise the generator for DataMatrix symbology | |
| var generator = new BarCodeGenerator(EncodeTypes.DataMatrix); | |
| // Set the data to encode | |
| generator.CodeText = "1234567890ABCDEFGHIJ"; | |
| // High‑density configuration | |
| generator.Parameters.Barcode.DataMatrixEncodeMode = DataMatrixEncodeMode.Auto; | |
| generator.Parameters.Barcode.DataMatrixSize = DataMatrixSize.Size10x10; // smallest possible | |
| generator.Parameters.ImageResolution = 300; // DPI for crisp output | |
| generator.Parameters.Barcode.QRQuietZone = 0; // minimal quiet zone | |
| generator.Parameters.ImageFormat = BarCodeImageFormat.Png; | |
| // Save the barcode image | |
| generator.Save("HighDensityDataMatrix.png"); | |
| Console.WriteLine("High density Data Matrix barcode generated successfully."); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment