Upgrade questions from v19

Hi all,

We’re trying to upgrade to Aspose Barcode 23 from 19. So we use this in 19:

generator.Parameters.Barcode.AutoSizeMode = AutoSizeMode.Nearest;

What’s the replacement for this since AutoSizeMode no longer exists in 23?

Mike

@agadia,

I confirmed AutoSizeMode enum is there in Aspose.BarCode.Generation namespace. You may either import the namespace or use fully qualified naming when defining objects in code. I tested the following sample code using Aspose.BarCode for .NET v23.5 and it works fine:
e.g.
Sample code:

Aspose.BarCode.Generation.BarcodeGenerator gen = new Aspose.BarCode.Generation.BarcodeGenerator(Aspose.BarCode.Generation.EncodeTypes.DataMatrix, "ASPOSE");
gen.Parameters.AutoSizeMode = Aspose.BarCode.Generation.AutoSizeMode.Nearest;
gen.Parameters.ImageWidth.Pixels = 300;
gen.Parameters.ImageHeight.Pixels = 300;
gen.Parameters.Barcode.XDimension.Pixels = 3;
gen.Save("g:\\test2\\AutoSizeModeNearest.png", Aspose.BarCode.Generation.BarCodeImageFormat.Png);

Please find attached the output barcode image generated by the above code segment.
AutoSizeModeNearest.png (252 Bytes)