Hello,
Sorry for the long delay.
To show the TopText, you have to remove the logo “E-ICEBLUE” first. Please refer to this to remove it:
http://www.e-iceblue.com/Misc/how-to-re ... rcode.htmlYou are welcome to download the newest version Spire.BarCode(hotfix) for .NET version:1.2.3 to test the following code to do your work:
- Code: Select all
//Spire.Barcode.BarcodeSettings.ApplyKey("…");
BarcodeSettings barsetting = new BarcodeSettings();
barsetting.HasBorder = true;
barsetting.BorderWidth = 0.5F;
barsetting.Data = "12345";
barsetting.Data2D = "12345";
//generate EAN-Code 128
barsetting.Type = BarCodeType.EAN128;
barsetting.ShowTextOnBottom = true;
barsetting.TopTextColor = Color.Green;
barsetting.TopText = "Item 1";
barsetting.TopTextAligment = StringAlignment.Center;
barsetting.ShowTopText = true;
BarCodeGenerator bargenerator = new BarCodeGenerator(barsetting);
Image barcodeimage = bargenerator.GenerateImage();
barcodeimage.Save("barcode.png");
System.Diagnostics.Process.Start("barcode.png");
The result "barcode.png" is in the attachment.
If you get any questions, welcome to get it back to us.
Thanks and Regards,
Benjamin
E-iceblue support team
Login to view the files attached to this post.