You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Alexandre Blondin Massé <al...@gmail.com> on 2011/05/27 04:17:23 UTC

Separating multiple headers and footers in Word document

Hi !

I've started using your library for reading Word documents and, so far,
everything works perfectly fine except for one thing: if my document has
multiple headers and footers that change depending on the pages, I haven't
found how to retrieve them separately.

It seems that all the headers and footers are found in the following string:

 String allHeadersAndFooters = headerStories.getRange().text();

but there doesn't seem to be any separator character to split it correctly.
For instance, between a header and a footer, there are only carriage returns
(13), which are clearly not "valid" separators.

Could anyone help or suggest another way to solve my problem?

Thank you very much!

Alexandre