I want to copy the complete Header from the template docx file and replace with it the header from the main docx file.
At the moment I have no idea how to do this because I do not have much experience with docx4j.
Current code status for removing header:
final WordprocessingMLPackage wordProcessingPackageHeader = DocxUtils
.getWordProcessingPackage(DocxUtils.class.getResourceAsStream("main-document.docx"));
final RelationshipsPart relationshipsPart = wordProcessingPackageHeader.getMainDocumentPart().getRelationshipsPart();
final List<Relationship> relationships = relationshipsPart.getRelationships().getRelationship();
for (final Relationship r : relationships) {
if (r.getType().equals(Namespaces.HEADER)) { ...