It is currently Wed Dec 03, 2025 1:48 pm
News of Forums WordprocessingMLPackage wordMLPackage = Docx4J.load(new File(myTemplate));
TocGenerator tocGenerator = new TocGenerator(wordMLPackage);
tocGenerator.updateToc(false);
public static void addAltChunk(R run, String html){
String chunk = "<!DOCTYPE><html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\"><head></head><body>" + html + "</body></html>";
try {
mdp.addAltChunk(AltChunkType.Xhtml, chunk.getBytes(), run);
} catch (Exception e) {
e.printStackTrace();
}
}
Total posts 10213 • Total topics 2877 • Total members 2103