code: public void drawText(String text, Font font, Rectangle box, Color fontColor) {
  		template.saveState();
  		// get the font
  		DefaultFontMapper mapper = new DefaultFontMapper();
  		BaseFont bf = mapper.awtToPdf(font);
  		template.setFontAndSize(bf, font.getSize());
  
  		// calculate descent
  		float descent = 0;
  		if (text != null) {
  			descent = bf.getDescentPoint(text, font.getSize());
  		}
  
  		// calculate the fitting size
  		Rectangle fit = getTextSize(text, font);
  
  		// draw text if necessary
  		template.setColorFill(fontColor);
  		template.beginText();
  		template.showTextAligned(PdfContentByte.ALIGN_LEFT, text, origX + box.getLeft() + 0.5f
  				* (box.getWidth() - fit.getWidth()), origY + box.getBottom() + 0.5f
  				* (box.getHeight() - fit.getHeight()) - descent, 0);
  		template.endText();
  		template.restoreState();
  	}
docs: Draw text in the center of the specified box.
  
  @param text text
  @param font font
  @param box box to put text int
  @param fontColor colour