Hi all. I am trying to add a block of text to an existing pdf template. I want to be able to set the left margin and right margin, but the amount of text is undetermined, so I need the box to expand in relation to the input text. I have managed to position the text area on the template and insert text, but doing it this way needs me to explicity set the bottom line location of the text area. Heres the code I have so far (pdfStamper is pre-defined):
BaseFont bf = BaseFont.CreateFont(BaseFont.COURIER, BaseFont.CP1252, BaseFont.NOT_EMBEDDED);
Font font = new Font(bf, 11, Font.NORMAL);
Phrase unicodes = new Phrase(reports.StringText, font);
PdfContentByte over;
over = pdfstamper.GetOverContent(1);
ColumnText ct = new ColumnText(over);
ct.SetSimpleColumn(unicodes, 19, 80, 575, 335, 10, Element.ALIGN_LEFT);
ct.Go();
Thanks!