We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Too much white space below the barcode

I’ve the following code to create a barcode.

//Create barcode builder
Aspose.BarCode.BarCodeBuilder bb;
bb = new Aspose.BarCode.BarCodeBuilder();
bb.CodeText = “10000274”;
bb.BorderVisible = false;
bb.BarHeight = 15f;
bb.SymbologyType = Aspose.BarCode.Symbology.EAN8;
bb.xDimension = 0.6f;
bb.Resolution.DpiX = 300f;
bb.Resolution.DpiY = 300f;

//Save the image to your system and set its image format to Jpeg
bb.Save(“barcode.jpg”, System.Drawing.Imaging.ImageFormat.Bmp);

How is it possible to remove the empty white space below the barcode (see attachment)?
When using the image for example in Crystal Reports the sections becomes too big.


Could you please add the following statement before saving the barcode image and see if it works for you.

bb.CodeLocation = CodeLocation.None;

Yes. This is the solution.
I was not thinking about this because I thought codelocation is for the human readable characters.