We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

PDF header footer existence check using Apose.PDF Java


We have a PDF file generated from a word document using Adobe LC Server.

We are currently using aspose.pdf 9.7.0 version jar file in our Java application to modify the PDF.

In this PDF file I want to check whether header/footer exists or not, to implement this I have wrote a source code sample using Aspose.PDFjava api.

With this topic I have uploaded a source code in (TestHeaderFooterPDF.java) and sample PDF and word document.

But the code failed to identify header and footer from Test.pdf file.

Please help us to resolve the issue.

Test.pdf (223.0 KB)
HeaderFooterExtractionPDFWord.zip (302.0 KB)


Thanks for contacting support.

I have tested the scenario with latest version of the API while using following line of code to extract/get header information from PDF pages and I was able to notice that API was not reading headers as expected.

com.aspose.pdf.HeaderFooter header = page.getHeader();

However, for the sake of correction, I have logged an issue as PDFJAVA-36956 in our issue tracking system. We will further look into the details of the issue and keep you posted with the status of its correction. Please be patient and spare us little time.

We are sorry for the inconvenience.


Thanks for contacting support.

We have further investigated the earlier logged issue and as per investigation by our product team, this is not an issue or error. Please note that Headers/Footers context is actually on the stage of PDF generation and once PDF file has been generated, there is no difference/separation between Header/Footer and main content of the document. In that case, one cannot extract only Header/Footer information from opened document.

In case you need any further assistance, please feel free to let us know.