Hello,
I’m using Aspose.Barcode for .NET and I’m having trouble with EAN13 barcode using Compact Framework version 17.5.
I’m using the code below to generate an EAN13 barcode, and while the output is correct when using desktop version, the same code produces a wrong code under Compact Framework. Please notice the first digit “1” is missing in the left side of the barcode.
Thank you in advance.
ean13_desktop.jpg (18.0 KB)
ean13_compact.jpg (7.3 KB)
using (BarCodeBuilder codigo = new BarCodeBuilder())
{
codigo.CodeText = "1234567890128";
codigo.GraphicsUnit = GraphicsUnit.Pixel;
codigo.Resolution = new Resolution(180, 180, ResolutionMode.Customized);
codigo.CodeTextAlignment = StringAlignment.Center;
codigo.EncodeType = EncodeTypes.EAN13;
codigo.Margins.Left = Convert.ToInt32(5 / 25.4 * 180);
codigo.Margins.Right = Convert.ToInt32(5 / 25.4 * 180);
codigo.BarHeight = Convert.ToInt32(22 / 25.4 * 180);
codigo.CodeTextFont = new Font("Verdana",9F);
codigo.xDimension = 4F;
codigo.AlwaysShowChecksum = false;
pictureBox1.Image = codigo.GenerateBarCodeImage();
}