LwgPdfPCell info = new LwgPdfPCell(new LwgPhrase("Barcode EAN 128"));
info.setBorder(LwgRectangle.NO_BORDER);
pageTot.add(info);
Barcode128 shipBarCode = new Barcode128();
shipBarCode.setX(0.75f);
shipBarCode.setN(1.5f);
shipBarCode.setChecksumText(true);
shipBarCode.setGenerateChecksum(true);
shipBarCode.setSize(10f);
shipBarCode.setTextAlignment(LwgElement.ALIGN_CENTER);
shipBarCode.setBaseline(10f);
shipBarCode.setCode(data);
shipBarCode.setBarHeight(50f);
LwgImage imgShipBarCode = shipBarCode.createImageWithBarcode(cb, Color.black, Color.blue);
LwgPdfPCell shipment = new LwgPdfPCell(new LwgPhrase(
new Chunk(imgShipBarCode, 0, 0)));
shipment.setFixedHeight(shipBarCode.getBarcodeSize().getHeight() + 16f);
shipment.setPaddingTop(5f);
shipment.setPaddingBottom(10f);
shipment.setBorder(LwgRectangle.BOX);
shipment.setVerticalAlignment(LwgElement.ALIGN_TOP);
shipment.setHorizontalAlignment(LwgElement.ALIGN_CENTER);