I have an existing PDF and I need to remove the footer from the PDF on every page.
I fetch all pages from PDF but I am not able to remove the footer from the PDF.
I am using iText version 5.5.0.
Document document = null;
PdfCopy writer = null;
PdfReader reader = new PdfReader("input.pdf");
int n = reader.getNumberOfPages();
outFile = "output.pdf";
document = new Document();
writer = new PdfCopy(document, new FileOutputStream(outFile));
document.open();
for (int j = 0; j < n; j++) {
PdfImportedPage page = writer.getImportedPage(reader, j);
writer.addPage(page);
}
document.close();
writer.close();
How can I remove the footer from this input.pdf file and create a new output.pdf file?