We have a requirement to change the template(.potx file) of a given .pptx file at runtime. Please provide pointers to the docx4J API's which can be used to achieve this.
Thanks
It is currently Tue Aug 04, 2026 10:52 pm
News of Forums DocumentSettingsPart dsp = documentPart.getDocumentSettingsPart();
CTSettings objCTSettings = dsp.getJaxbElement();
ObjectFactory factory = Context.getWmlObjectFactory();
CTView ctView = factory.createCTView();
ctView.setVal(STView.PRINT);
objCTSettings.setView(ctView);
BooleanDefaultTrue b = new BooleanDefaultTrue();
b.setVal(true);
objCTSettings.setUpdateFields(b);
dsp.setJaxbElement(objCTSettings);
documentPart.addTargetPart(dsp);Ftr footerPart = (Ftr) XmlUtils.unmarshalString(footerXML);Total posts 10234 • Total topics 2888 • Total members 2109