poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ppurcellrr <ppurc...@rationalretention.com>
Subject Creating .docx footer prevents search indexing
Date Thu, 14 Nov 2013 13:54:37 GMT
I have some code that places a stamp on .docx file. I place the stamp  in a
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

		XWPFDocument xDoc = new XWPFDocument(doc);

			XWPFHeaderFooterPolicy policy = xDoc.getHeaderFooterPolicy();
			XWPFFooter defaultFooter = policy.getDefaultFooter();
			if (defaultFooter == null) {

				policy = new CustomHeaderFooterPolicy(xDoc);
				defaultFooter = policy


			CTP footerCtp = defaultFooter._getHdrFtr().addNewP();
			CTR footerR = footerCtp.addNewR();
			CTText footerT = footerR.addNewT();

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: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org

View raw message