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.

Mon Jul 14, 2014 4:41 am

Hi,
I can create EAN 13 barcode but i want to achieve the following two tasks:

1. To be able to set barcode Height (6.79) and Width (22.331) in millimeters.
2. To align/adjust the barcode text style in a way that it spread across the barcode width.

I am unable to attach a screenshot, so i just tried to find images online. Hope it is helpful.
Current/Default
Image

Required
Image

alimunir
 
Posts: 2
Joined: Fri Jul 11, 2014 3:01 pm

Mon Jul 14, 2014 7:50 am

Hello,

Thanks for your inquiry.
For the first requirement. Please use the below method to set the height of the barcode. Sorry that there is no method to set the width.
Code: Select all
BarcodeSettings settings = new BarcodeSettings();
settings.BarHeight=..

Regarding the second.
At present there is only the method to show the top text and align it.
Code: Select all
BarcodeSettings settings = new BarcodeSettings();
settings.TopText = "100% EAN-13 barcode";
settings.ShowTopText = true;
settings.TopTextAligment = StringAlignment.Center;

If there are any questions, welcome to get it back to us.
Thanks,
Gary
E-iceblue support team
User avatar

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

Mon Jul 14, 2014 8:15 am

Thank you very much for the reply.

For my second requirement, i was talking about the text coming under the barcode i.e. Human Readable Text (HRT). How to make its alignment center and justified?

alimunir
 
Posts: 2
Joined: Fri Jul 11, 2014 3:01 pm

Mon Jul 14, 2014 9:24 am

Hello,

Thanks for your fast reply.
Sorry that at present our product doesn't support the feature.
Sincerely,
Gary
E-iceblue support team
User avatar

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

Return to Spire.BarCode

cron