Set height of actually barcode excluding toptext

Technical support for Spire.BarCode.

Moderator: iceblue support

Set height of actually barcode excluding toptext

Postby kemnet » Fri Jul 01, 2016 3:01 pm

Hello all.

Im using this in a program and i must say...very good.
However i need help with an issue.

Looking at the attachment i uploaded, we can see the actual barcode is really long/height.
Im trying to remove alot of the height but using the code I see on the forums doesnt affect the height of the barcode SPECIFICALLY.
Rather it distorts the entire label.
Pasting my code below, grateful for any assistance.

P.S im using BarCodeType.Code128, is there a smaller one?
Code: Select all
            BarcodeSettings setting = new BarcodeSettings();
            BarcodeSettings.ApplyKey("key here");
          //  setting.Data =  id;
          //  setting.Type = BarCodeType.Code128;
            setting.X = 0.8f;
            setting.Unit = GraphicsUnit.Millimeter;

            //set the width of barcode
            setting.BarHeight = 10;

            setting.HasBorder = true;
            setting.BorderWidth = 0.5F;

            setting.Data = id;
           // setting.Data2D = "545863";
            //generate EAN-Code 128
            setting.Type = BarCodeType.Code128;
You do not have the required permissions to view the files attached to this post.
Posts: 5
Joined: Mon Aug 17, 2015 5:19 pm

Re: Set height of actually barcode excluding toptext

Postby Betsy » Mon Jul 04, 2016 2:36 am


Sorry for late reply as weekend.
Please change the setting.BarHeight number to smaller one, like this:
Code: Select all
setting.BarHeight = 5;

This will change the barcode height not effect on toptext, if there is any question, welcome to get it back to us.

E-iceblue support team
User avatar
Posts: 804
Joined: Mon Jan 19, 2015 6:14 am

Return to Spire.BarCode

Who is online

Users browsing this forum: No registered users and 0 guests