following is the code which is working and generating barcode properly but i have a problem that is i want to add text under the barcode and i was unable to get this thing please help what code should i use to get this thing possible:
private static void CreateBarcode(string codes1)
{
var myBitmap = new Bitmap(150, 50);
var g = Graphics.FromImage(myBitmap);
var jgpEncoder = GetEncoder(ImageFormat.Png);
g.Clear(Color.White);
var strFormat = new StringFormat { Alignment = StringAlignment.Center };
g.DrawString(codes1, new Font("Free 3 of 9", 21), Brushes.Black, new RectangleF(0, 0, 150, 40), strFormat);
var myEncoder = System.Drawing.Imaging.Encoder.Quality;
var myEncoderParameters = new EncoderParameters(1);
var myEncoderParameter = new EncoderParameter(myEncoder, 00L);
myEncoderParameters.Param[0] = myEncoderParameter;
//BarcodePrinter bcp = new BarcodePrinter(BarcodeData:codes1);
//bcp.Print();
myBitmap.Save(@"E:\Barcode1.png", jgpEncoder, myEncoderParameters);
}