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

Free Support Forum - aspose.com

Error initializing BarCodeBuilder on CentOS 7 operating system with OpenJDK

When creating a barcode on a CentOS system using OpenJDK I get the following error.

com.aspose.barcode.internal.ms.System.Drawing.Font.a(Unknown Source)
com.aspose.barcode.internal.ms.System.Drawing.Font.(Unknown Source)
com.aspose.barcode.internal.ms.System.Drawing.Font.(Unknown Source)
com.aspose.barcode.BarCodeBuilder.(Unknown Source)

I am looking into this and will share feedback with you soon.

It seems that you are using some older version of the product. You may please try the scenario by running simple code with the latest version and observe the behaviour. If the issue is still there, you may try with some known font which is installed on the system. For example if you have Veranda font, then try the following sample code.

BarcodeGenerator  generator = new BarcodeGenerator (EncodeTypes.Code128);
generator.CodeText = "Text";
generator.Parameters.Barcode.CodeTextParameters.Font.FamilyName = "Verdana";
generator.Parameters.Barcode.CodeTextParameters.Font.Size.Point = 12f;
generator.Save(dataDir + "SetCodeTextFontFamilyNameAndSize_out.bmp", BarCodeImageFormat.Bmp);

If your issue is not resolved, provide us with a simple console application which contains minimum code related to Aspose.BarCode and no extra code is there. No reference should be missing and code should be compilable without any error. We will try the scenario here and provide feedback accordingly.