我是generatng条形码。现在我想在条形码标签下插入学生代码。我该怎么做?我的代码是如何在单个pdf单元格中添加两行?
foreach (GridViewRow row in grdBarcode.Rows)
{
DataList dl = (DataList)row.FindControl("datalistBarcode");
PdfContentByte cb = new PdfContentByte(writer);
PdfPTable BarCodeTable = new PdfPTable(6);
BarCodeTable.SetTotalWidth(new float[] { 100,10,100,10,100,10 });
BarCodeTable.DefaultCell.Border = PdfPCell.NO_BORDER;
Barcode128 code128 = new Barcode128();
code128.CodeType = Barcode.CODE128_UCC;
foreach (DataListItem dli in dl.Items)
{
String barcodename= ((Label)dli.FindControl("lblBarCode")).Text;
string studentcode= ((Label)dli.FindControl("lblStudCode")).Text;
code128.Code = "*" + productID1 + "*";
iTextSharp.text.Image image128 = code128.CreateImageWithBarcode(cb, null, null);
BarCodeTable.AddCell(image128);
BarCodeTable.AddCell("");
}
doc.Add(BarCodeTable);
我现在的输出是
我希望把学生代码也条形码标签下。请告诉我一种方法来实现它
或让我知道如何通过多个参数throgh pdftable.Addcell()函数..!
再次保存me..Thaaankz一个looooot亲爱的:) –