Page height is always determined by:
document.PageSize.Height // document.getPageSize().getHeight() in Java
Keep in mind that in PDF 0.0 there is a lower left corner, and the coordinates increase as you move right and up.
Inside PdfPageEvent you need to use absolute coordinates. It looks like you are either getting the current Y from the document, or just drawing the material at the current location. Do not do that.
Also, if you want to use the same exact footer on each page, you can draw everything in a PdfTemplate, and then draw this template on the different pages on which you want.
PdfTemplate footerTmpl = writer.getDirectContent().createTemplate( 0, 0, pageWidth, footerHeight ); footerTmpl.setFontAndSize( someFont, someSize ); footerTmpl.setTextMatrix( x, y ); footer.showText("blah");
Then in your PdfPageEvent you can simply add footerTempl at the bottom of the page:
writer.getDirectContent().addTemplateSimple( footerTmpl, 0, 0 );
Even if most of your footer is the same, you can use this technique to save memory, runtime, and file size.
In addition, if you do not want to interact directly with the PdfContentByte drawing PdfContentByte , you can avoid them to some extent through ColumnText . There are several SO questions tagged by iText or iTextSharp pertaining to this class. Knock, you will find them.