Hi. The latest version for docx4j is 6.1.2, but the latest version for docx4j-MOXy-JAXBContext is still at 6.0.0 in the Central Repository.
Is there a reason for this?
Thanks.
-- Vikram
It is currently Tue Jun 17, 2025 9:38 pm
WordprocessingMLPackage wordprocessingMLPackage = Docx4J.load(new File(System.getProperty("user.dir") + "/uploads/chartCopy.docx"));
Relationship rel = relationshipsPart.getRelationshipByType(Namespaces.SPREADSHEETML_CHART);
Part part = relationshipsPart.getPart(rel);
System.out.println(part.getPartName().getName() );
wordprocessingMLPackage.getMainDocumentPart().addTargetPart(part, RelationshipsPart.AddPartBehaviour.RENAME_IF_NAME_EXISTS);
wordprocessingMLPackage.save(new File(System.getProperty("user.dir") + "/uploads/chartCopyNew.docx"));
WordprocessingMLPackage wordPackage = WordprocessingMLPackage.createPackage();
MainDocumentPart mainDocumentPart = wordPackage.getMainDocumentPart();
mainDocumentPart.addStyledParagraphOfText("Title", "Hello World!");
mainDocumentPart.addParagraphOfText("Test");
File exportFile = new File("hello.docx");
wordPackage.save(exportFile);
Total posts 10181 • Total topics 2864 • Total members 2095