Hello. I have been using docx4j and POI for a couple months now.. docx4j is great!.
my issue is setting the core properties... I basicaly have a "template.docx" file that I load and add a few custom properties and a set a few core properties. The issue is with the core props. I cannot for the life of me figure out how to satisfy the
org.docx4j.docProps.core.CoreProperties.setDescription(javax.xml.bind.JAXBElement<SimpleLiteral> value); method
I have search for 2 days and just cannot figure out how to create a javax.xml.bind.JAXBElement I jsut want to set the comments/description field and the title field.....
i found some code to "add" extended props... and tried to modify it for core props.. but was not working. as these props are strings and ints not JAXBElement
//CoreProperties props = CorePropsfactory.createCoreProperties();
//props.setApplication("Microsoft Word 12.1.0");
//props.setAppVersion("12.0256");
//extendedPart.setJaxbElement(props);`
here is a link to my code.
http://67.76.184.81/_work/docx4j/template_docx.jsp
src: http://67.76.184.81/_work/docx4j/template_docx.zip
thanks much!
nate