At the moment I have to store the image as a resource in my project and retrieve it to add it to the HeaderPart like this:
- Code: Select all
BinaryPartAbstractImage.createImagePart(wordMLPackage,
headerPart, BufferUtil.getBytesFromInputStream(WordX.class.getResourceAsStream("myimage.png")));
But I have an template docx file with a template HeaderPart and I woud like to copy the image out of the template part and add it to my main HeaderPart.
How could I copy the image resource from the template headerpart media folder to my main HeaderPart?