code: public PdfTemplate createTemplateWithBarcode(PdfContentByte cb, Color barColor, Color textColor) {
          PdfTemplate tp = cb.createTemplate(0, 0);
          Rectangle rect = placeBarcode(tp, barColor, textColor);
          tp.setBoundingBox(rect);
          return tp;
      }
docs: Creates a template with the barcode.
  @param cb the <CODE>PdfContentByte</CODE> to create the template. It
  serves no other use
  @param barColor the color of the bars. It can be <CODE>null</CODE>
  @param textColor the color of the text. It can be <CODE>null</CODE>
  @return the template
  @see #placeBarcode(PdfContentByte cb, Color barColor, Color textColor)