One of important requirements for converting academic documents in html and epub is pagination. It needs for readers to provide a way to create citation to that document.

Unfortunately, none of publicly available converters to html couldn't retain pagination with headers and footers.

However I found very usefull converter from odt to html and epub named Writer2Latex. It could work as an extension to LibreOffice and as a standalone jar (usefull for massive conversions). I decided to extend this converter as it distributed under GPL v.2 license and was written in Java.

Improved converter can sucessfully export ODT to HTML and EPub with correct pagination, headers and footers.

Every page saves inside div with class "pageNum" and attribute "page" with page number as a value.

To facilitate importing documents into Greenstone3 digital library converter could also add comments to create document contents with Greenstone3 import functionality.

Soures, LibreOffice extension and jar available on GitHub