I am creating a word file which has two parts .
In first part , I am replacing couple of words using
- Code: Select all
Object obj = XmlUtils.unmarshallFromTemplate(xml, mappings);
documentPart.setJaxbElement((Document) obj);
In second part, I am inserting html code using
- Code: Select all
wordMLPackage.getMainDocumentPart().addAltChunk(AltChunkType.Html, htmlCode.getBytes());
Things works fine. However, a lot of white space (perhaps 7-8 blank lines) appears between first and second part. I want my html part (alternateChunk) to appear just after the first part.
Is ...