Just a quick note that I'll be in London Mon 5 Dec to Wed 7 Dec, and have some time available to meet docx4j users to discuss any Word document challenges/issues face to face.
If you are interested, email me (jason) at plutext.org
It is currently Tue Aug 26, 2025 11:46 pm
org.docx4j.openpackaging.parts.WordprocessingML.ImageJpegPart
File img = new File("logo.jpeg");
InputStream is = new BufferedInputStream(new FileInputStream(img));
ImageJpegPart imgJpgPart = new ImageJpegPart(new PartName("/word/media/image1.jpeg"));
imgJpgPart.setBinaryData(is);
wordMLPackage.getParts().put(imgJpegPart);
org.docx4j.Docx4J.toPDF(wordMLPackage, fos);
TocGenerator tocGenerator = new TocGenerator(wordMLPackage);
tocGenerator.updateToc(false, true);
org.docx4j.toc.TocException: No ToC content control found
at org.docx4j.toc.TocGenerator.updateToc(TocGenerator.java:494)
Total posts 10189 • Total topics 2867 • Total members 2097