Linked to previous header and footer content is not extracted using extractPages

Hello,

I have an issue where if header/footer linkedToPrevious was set using headersFooters.linkToPrevious(HeaderFooterType, true), when extracting the page where linkedToPrevious is set using .extractPages(), the header/footer content is not extracted in the output document.

Code to reproduce the issue:

simple.docx has two sections, first section has header content, and second section has linked to previous set.

Document doc = new Document(new FileInputStream("/path/to/simple.docx"));
Document extr1 = doc.extractPages(1,1);

doc.getSections().get(1).getHeadersFooters().linkToPrevious(HeaderFooterType.HEADER_PRIMARY, true);


Document extr2 = doc.extractPages(1,1);

extr1.save("extr1.docx");
extr2.save("extr2.docx");

extr1.docx has a correct header content:

but extr2.docx header content is empty:

files used in example:
simple.docx (9.0 KB)

extr1.docx (9.0 KB)

extr2.docx (8.1 KB)

@ANDREA.FARRIS
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): WORDSNET-26652

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

The issues you have found earlier (filed as WORDSNET-26652) have been fixed in this Aspose.Words for Java 24.4 update.

The issues you have found earlier (filed as WORDSNET-26652) have been fixed in this Aspose.Words for Java 24.4 update.