Each section in a document can have up to three headers and up to three footers (for first, even and odd pages). If you want to delete all footers in a document you need to loop through all sections and remove every footer node.
Example
Deletes all footers from all sections, but leaves headers intact.
[Java]
Document doc = new Document(getMyDir() + "HeaderFooter.RemoveFooters.doc");
for (Section section : doc.getSections())
{
// Up to three different footers are possible in a section (for first, even and odd pages).
// We check and delete all of them.
HeaderFooter footer;
footer = section.getHeadersFooters().getByHeaderFooterType(HeaderFooterType.FOOTER_FIRST);
if (footer != null)
footer.remove();
// Primary footer is the footer used for odd pages.
footer = section.getHeadersFooters().getByHeaderFooterType(HeaderFooterType.FOOTER_PRIMARY);
if (footer != null)
footer.remove();
footer = section.getHeadersFooters().getByHeaderFooterType(HeaderFooterType.FOOTER_EVEN);
if (footer != null)
footer.remove();
}
doc.save(getMyDir() + "HeaderFooter.RemoveFooters Out.doc");