How can I calculate the height of the PDF document when using iTextSharp?
I’m using iTextSharp to position various images on a PDF document using Absolute Position. However I’ve noticed SetAbsolutePosition() positions the Y parameter from the bottom, so I need to calculate the height to be able to do something like:
Y = PdfHeight - i
You should be able to do that by using the PageSize, like this…
i = the position you would set Y if it was from the top of the page
elementHeight = the height of the element you are positioning (e.g. an image)