You add the Image object directly to PdfPCell as follows:
iTextSharp.text.Image image128 = code128.CreateImageWithBarcode(cb, null, null); BarCodeTable.AddCell(image128);
The second line is a short abbreviation for what looks like this:
PdfPCell cell = new PdfPCell(); cell.SetImage(image128); BarCodeTable.AddCEll(cell);
This cell contains nothing more than an image. There is no room for text.
If you want to combine image and text, you need something like this:
PdfPCell cell = new PdfPCell(); cell.AddElement(image128); Paragraph p = new Paragraph("Student name"); p.Alignment = Element.ALIGN_CENTER; cell.AddElement(p); BarCodeTable.AddCEll(cell);
source share