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.

Sun Jan 12, 2014 10:39 am

I want to print Description data on generated BarCode Image for example Barode Data is equal to 12345 but This data is for Item called Item1
So I want the generated BarCode Image to contain 12345 at bottom of generated image and Item1 at top of generated image

I tried to use TopText property and Text property also but only Data property is printed on generated image.

Could you please help me to achieve that.

Thanks

Sherif
 
Posts: 1
Joined: Sat Dec 28, 2013 3:38 pm

Mon Jan 13, 2014 2:20 am

Hello,

Thanks for your inquiry.

We have reproduced the issue you experienced, which has been transferred to our Dev team, once there are any progress from them, we will inform you at first time. Sorry for inconvenience.

If there are any questions, welcome to get it back to us.

Sincerely,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Fri Apr 18, 2014 3:49 am

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.html
You 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
User avatar

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

Return to Spire.BarCode