I am writing content to a PdfContentByte
object directly using PdfContentByte.showTextAligned
, I\'d like to know how I can stop the text overflowing a
Use this:
int status = ColumnText.START_COLUMN;
ColumnText ct = new ColumnText(cb);
ct.setSimpleColumn(rectangle);
status = ct.go();
Make sure that you define rectangle
in a way so that only one line fits, use ColumnText.hasMoreText(status)
to find out if you need to add an ellipsis character.