Simarly to this question I want to find the location of the last item in a PDF document and add content at that place, more specifically I would like to add an electronic signature at a position where one would normally put a regular handwritten signature on letters.
In the question above the user is making the PDF file but I am importing an existing PDF file that can have any structure as such. Therefore, as far as I can see, I can not use the same method as I do not know if the last object made was a paragraph or some other object.
I found the following function and property on the PdfWriter class that bode well but can not find any documentation that explains the output I get when I run the programme:
PdfWriter w = _document.GetWriter();
long currentPos = w.GetCurrentPos();
long pos = w.Position;
When I run this the output I get is something like the number 84178. What unit is that? Can I use this number to calculate how much vertical space there is left on the page and if it is too small then add a page and have the signature on the next page?