Tue Mar 10, 2015 8:46 am
Hallo, I have same problem. Is there some solution to this problem?
I am sending code, which generates exception
String barcode = String.Empty;
try
{
for (UInt64 i = 1; i < 100000; i++)
{
barcode = String.Format("{0:0000}{1:00}{2:0000}{3:00000}{4:ddMMyyyyHHmm}", 1, 1, 1, i, DateTime.Now);
BarcodeSettings settings = new BarcodeSettings();
settings.Data2D = barcode;
settings.Data = barcode;
settings.Type = BarCodeType.EAN128;
settings.ShowTopText = false;
settings.TextFont = new Font(settings.TextFont.FontFamily, 14.2F);
//settings.HasBorder = true;
string font = "SimSun";
//generate the barcode use the settings
BarCodeGenerator generator = new BarCodeGenerator(settings);
Image barcodeimage = generator.GenerateImage();
Bitmap bmp = new Bitmap(barcodeimage);
Brush brush = new SolidBrush(Color.White);
Graphics gBmp = Graphics.FromImage(barcodeimage);
gBmp.FillRectangle(brush, 0, 0, 100, 20);
}
}
catch (Exception ex)
{
Console.WriteLine("{0}", barcode);
Console.WriteLine("{0}", ex.ToString());
}