I have added an image as an anchor to the page header but the image is large and I wanted to reduce the size of the image to fit nicely in the header below are the code snippets.
public class WordDoc {
private ObjectFactory objectFactory = new ObjectFactory();
private WordprocessingMLPackage wordMLPackage;
private Relationship relationship;
File file;
byte[] bytes;
private Integer HEADER_TOP_OFFSET = 0;
public WordDoc() throws IOException {
file = new File("src/resources/images/logo.jpg");
bytes = convertImageToByteArray(file); ...