Appended to this post is a Eclipse generated patch file for the JaxbXmlElement class. It adds a generic parameter for the jaxbElement property. Subclasses of that class has been changed to add a conrete class for that parameter. For example, the MainDocumentPart uses the org.docx4j.wml.Document class as parameter.
Some other classes referencing the changed property has been updated to remove compiler errors (mainly by adding casts). The changes samples has not been tested.
While creating this patch I also spoted (and corrected) an error in the iText based PDF conversion. In the inner class EndPage headerFooterPolicy.getHeader has been invoked were it should be getFooter.
Caused by my Eclipse settings, the import clauses of the modified classes may has been changed/reordered.
This patch is constributed on the basis of the document docx4j_IndividualContributor.docx provided in another post in this forum.
Regards
Holger