I have a pdf template. My task is to populate its fields and append table to the current page or to the new page if it doesn't fit.
I know how to add content at absolute positions, but it would be nice if I can get this values from iText
What I need is something like that
PdfStamper stamper = new PdfStamper(pdfReader, fileStream);
PdfContentByte content = stamper.GetOverContent(1);
ColumnText colText= new ColumnText(stamper.GetOverContent(1));
colText.SetSimpleColumn(pageSize.Left, pageSize.Bottom,
pageSize.Right, pageSize.Top - content.PdfWriter.GetVerticalPosition(false));
colText.AddElement(table);
The problem is content.PdfWriter.GetVerticalPosition
always returns 806
in my case. So is there any way to get content position or canvas height or something like that? Any help will be appreciated