Free Support Forum - aspose.com

Setting dimensions in new API


#1

Hello,
We’re migrating our aplication from the Builder API to the Generator API and we’re facing a main issue which is we can’t set up 1D Barcode dimensions properly (example, ITF): we don’t know the barcode total width but the BarWidth, but we can’t set XDimension value together with BarcodeHeight property when using AutoSizeMode to Nearest or None. How should specify the barcode height in this case? Why does it restrict the height property if I set the Autosize to None?

Thank you in advance.


#2

@albert.ruiz,

Thank you for contacting Aspose Support.

You may use the BarHeight property of BarCodeGenerator to set the height of the barcode as shown below.

barCodeGenerator.BarHeight.Pixels = 50;

Please test this using the latest version of Aspose.BarCode API. If the issue persists, please share the BarCodeBuilder code that you were using to generate the barcode and the generated barcode so that we can investigate this scenario further.

We are checking information at our end and will get back to you as soon as we have more information to share.