tags:

views:

523

answers:

0

Hello, I am using the following code to place a PdfPTable at an absolute position:

float yAbsolutePosition = iTextDoc.bottomMargin() + iTextPdfPTable.getTotalHeight(); 
iTextPdfPTable.writeSelectedRows(0, -1, iTextDoc.leftMargin(), yAbsolutePosition, pdfWriter.getDirectContent());

However, if there is already a table or other text in that position, my iTextPdfPTable simply writes on top of the existing text. I would really like to check if there is anything already there (I really just need to know if there is anything below the yAbsolutePosition, as this should be the lowest element on the page), and if there is, start a new page and place the PdfPTable on the new page. How can I check what is already at that position?

Thanks! twcp