Spire.Barcode is a professional barcode library specially designed for .NET developers (C#, VB.NET, ASP.NET, .NET Core) and Java developers (J2SE and J2EE) to generate, read and scan 1D & 2D barcodes.

Thu Apr 17, 2014 9:11 pm

Good afternoon, download your product to do some tests, but I wonder if you can change the name tel TopText

GuzmanDiaz18
 
Posts: 1
Joined: Thu Apr 17, 2014 8:53 pm

Fri Apr 18, 2014 1:39 am

Hello,

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.html
Then you can 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 = "545865815645456187773";
barsetting.Data2D = "545865815645456187773";

//generate EAN-Code 128
barsetting.Type = BarCodeType.EAN128;

barsetting.ShowTextOnBottom = true;
barsetting.TopTextColor = Color.Green;
barsetting.TopText = "Hello";
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");

If you get any questions, welcome to get it back to us.

Regards,
Benjamin
E-iceblue support team
User avatar

Benjamin Du
 
Posts: 82
Joined: Thu Jul 25, 2013 2:38 am

Return to Spire.BarCode