iText 7 - Different footer on last page - Null pointer in PdfDictionary
问题 I am trying to implement a footer in iText7 , the footer should be different on the last page of the document, I have added an event handler which is called when the document is closed but trying to then loop over the pages causes a null pointer exception: java.lang.NullPointerException at com.itextpdf.kernel.pdf.PdfDictionary.get(PdfDictionary.java:482) at com.itextpdf.kernel.pdf.PdfDictionary.get(PdfDictionary.java:152) at com.itextpdf.kernel.pdf.PdfPage.newContentStream(PdfPage.java:777)