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.

Wed Dec 03, 2014 2:36 pm

hi

how do I set the height of my barcode?

as you can see from the image I have attached I would like the bars of the bar code touched the top border

this is my code

Code: Select all
 Spire.Barcode.BarcodeSettings barsetting = new Spire.Barcode.BarcodeSettings();
                barsetting.Unit = GraphicsUnit.Millimeter;
                barsetting.TextFont = new Font("Arial", 18.0f);
                barsetting.Type = Spire.Barcode.BarCodeType.EAN13;
                barsetting.X = 0.8f;
                barsetting.BarHeight = 25;
                barsetting.ImageHeight = 45;


br
You do not have the required permissions to view the files attached to this post.

cicciuzzo
 
Posts: 5
Joined: Wed Nov 26, 2014 4:00 pm

Thu Dec 04, 2014 2:03 am

Dear cicciuzzo,

Thanks for your inquiry.

You can set the margin of the barcode to meet the requirement, please refer to the code below:
Code: Select all
//......
barsetting.BottomMargin = 0f;
barsetting.TopMargin=5f;


Best Regards,
Burning
E-iceblue Support Team
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Return to Spire.BarCode