i use this code
using (MemoryStream memoryStream = new MemoryStream())
{
using (Bitmap bitmap = new Bitmap(orderId.ToString().Length * 40, 80))
{
using (Graphics graphics = Graphics.FromImage(bitmap))
{
Font ofont = new Font("IDAutomationHC39M", 16);
PointF point = new PointF(2f, 2f);
SolidBrush whiteBrush = new SolidBrush(Color.White);
graphics.FillRectangle(whiteBrush, 0, 0, bitmap.Width, bitmap.Height);
SolidBrush blackBrush = new SolidBrush(Color.Black);
graphics.DrawString("*" + orderId.ToString() + "*", ofont, blackBrush, point);
}
bitmap.Save(memoryStream, ImageFormat.Jpeg);
ViewBag.BarcodeImage = "data:image/png;base64," + Convert.ToBase64String(memoryStream.ToArray());
}
}
but only string generate not barcode.....