How can i extract all charts from docx file and save it into localstore as images.
Is this possible using docx4j api (java)?
can anybody provide me code for this.
It is currently Tue Jun 16, 2026 3:01 pm
News of docx4jWordprocessingMLPackage wordMLPackage;
try {
wordMLPackage = WordprocessingMLPackage.load(template);
MainDocumentPart documentPart = wordMLPackage.getMainDocumentPart();
Document wmlDocumentEl = documentPart.getJaxbElement(); // failing on this line with several NumberFormatExceptions
Body body = wmlDocumentEl.getBody(); // wmlDocumentEl is null
MergeDoc returned an error:Source 1 is unsupported document - contains reference to NULL imageTotal posts 10225 • Total topics 2883 • Total members 2107