// offsets the y co-ordinate by 15 units
float y = -im.getScaledHeight() + 15;
x = x + (signatureRect.getWidth() - im.getScaledWidth()) / 2;
y = y - (signatureRect.getHeight() - im.getScaledHeight()) / 2;
p.add(new Chunk(im, x + (signatureRect.getWidth() - im.getScaledWidth()) / 2, y, false));
ct2.addElement(p);
ct2.go();
break;
case GRAPHIC:
ct2 = new ColumnText(t);
ct2.setRunDirection(runDirection);
ct2.setSimpleColumn(signatureRect.getLeft(), signatureRect.getBottom(), signatureRect.getRight(), signatureRect.getTop(), 0, Element.ALIGN_RIGHT);
im = Image.getInstance(signatureGraphic);
im.scaleToFit(signatureRect.getWidth(), signatureRect.getHeight());
p = new Paragraph(signatureRect.getHeight());
// must calculate the point to draw from to make image appear in middle of column
x = (signatureRect.getWidth() - im.getScaledWidth()) / 2;
y = (signatureRect.getHeight() - im.getScaledHeight()) / 2;
p.add(new Chunk(im, x, y, false));
ct2.addElement(p);
ct2.go();
break;
default:
}