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

Free Support Forum - aspose.com

Aspose Barcode CodeText is not hidden

Hi All,
i am trying below code to generate a Data matrix Code (C# ASP.NET), Data Matrix Code is getting generated and displays the CodeText in the image,

i want to hide the CodeText in the Image please help

Code:
public void GenerateNewDMCode()
{
var data = “ABCDEF123456”;
BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.DataMatrix);
generator.CodeText = data;
generator.Parameters.Barcode.DataMatrix.DataMatrixEncodeMode = DataMatrixEncodeMode.Auto;
generator.Parameters.CaptionAbove.Visible = false;
generator.Parameters.CaptionBelow.Visible = false;
generator.Save($“C:\Test\{System.Guid.NewGuid().ToString()}dataMatrix.png”);
}

Output :
BarCodeOutput.png (5.5 KB)

Update:
got this working with below Code
generator.Parameters.Barcode.CodeTextParameters.Location = CodeLocation.None;

@aparnabn,
Yes, your solution is right. Please feel free to write us back if you have any other query in this regard.