endeesfritpt

FAQ

Ricerca:

Automatic size change?Link

Because we translate customer numbers to barcode, it is not always possible to know the exact lenght of the code. I sometime get a Size Error. Is it possible to auto size the barcode?
An auto size option is not available now. But you have 2 possible solutions for this.

First is to always create a bigger image. ActiveBarcode always creates the largest barcode that is possible into the dimensions of the image. So create a huge bitmap for the barcode and you'll always receive a correct barcode in the best size for that image. If you create a small barcode with less numbers the barcode will be enlarged to fit best into the image size.

Second is to use the "IsSizeOk" property. You can set the barcode dimensions and then ask the property "IsSizeOk" if the barcode fits into this dimensions. If you get true, the size is good, if you get false you have to enlarge the image. Do this in steps until you get true and you have the needed size.