wordinator icon indicating copy to clipboard operation
wordinator copied to clipboard

Set document properties

Open ekimbernow opened this issue 10 months ago • 1 comments

Enable ability to set the properties of the document.

These are stored in the docProps/core.xml, docProps/app.xml, and docProps/custom.xml files.

The properties can be accessed like so:

 XWPFDocument doc = new XWPFDocument();
 POIXMLProperties props = doc.getProperties();

ekimbernow avatar Apr 07 '24 21:04 ekimbernow

This seems to work and there do appear to be set methods for all the properties:

    POIXMLProperties props = doc.getProperties();    
    Optional<java.util.Date> date = Optional.of(new Date());
    props.getCoreProperties().setCreated(date);

ekimbernow avatar Apr 07 '24 21:04 ekimbernow