I need to insert one docx file into another docx file. The result is hoped to be similar with MS Word "insert text from file". Can MergeDocx do this? Can I get an evaluation copy of MergeDocx?
Thanks in advance.
It is currently Fri Feb 21, 2025 6:32 am
org.docx4j.model.PropertyResolver.hasDirectPPrFormatting
HashMap<String, String> tokens = new HashMap<String, String>();
tokens.put("TOKEN_HOLDER", MiscSiteConfig.getCurrentVAPrivacyOfficer().getName().toString());
WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage.load(new File(checkList));
MainDocumentPart mainDocumentPart = wordMLPackage.getMainDocumentPart();
org.docx4j.wml.Document wmlDocumentEl = mainDocumentPart.getJaxbElement();
String xml = XmlUtils.marshaltoString(wmlDocumentEl, true);
Document doc = (Document) XmlUtils.unmarshallFromTemplate(xml, tokens);
mainDocumentPart.setJaxbElement(doc);
Total posts 10142 • Total topics 2852 • Total members 2083