Hi
I have some code that places a stamp on .docx file. I place the stamp in a
footer
If the footer exists in the document everything is fine. If I have to
create a footer, the document is stamped
and I can open it in Word however if I import the doc into Alfresco, The
builtin in search does not index the file.
Here is the code snippet that create the footer and . The file is written to
an outputstream
Is there something I am missing or do I have to create footer in another
way?
XWPFDocument xDoc = new XWPFDocument(doc);
XWPFHeaderFooterPolicy policy =
xDoc.getHeaderFooterPolicy();
XWPFFooter defaultFooter = policy.getDefaultFooter();
if (defaultFooter == null) {
policy = new CustomHeaderFooterPolicy(xDoc);
defaultFooter = policy
.createFooter(CustomHeaderFooterPolicy.DEFAULT);
}
CTP footerCtp = defaultFooter._getHdrFtr().addNewP();
CTR footerR = footerCtp.addNewR();
CTText footerT = footerR.addNewT();
footerT.setStringValue(stamp);
--
View this message in context:
http://apache-poi.1045710.n5.nabble.com/Creating-docx-footer-prevents-search-indexing-tp5714259.html
Sent from the POI - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]