Hi,
I am using XWPFDocument to create a word document.I am able to write my data to it.But still not getting success in writing the hyperlink to the document.Can anybody please help me out?
Thanks,
Manish
It is currently Sat Nov 30, 2024 5:50 am
FooterPart footerPart = new FooterPart();
footerPart.setPackage(wordMLPackage);
footerPart.getContent().add(createStampP()); // predefined paragraph with a sample text
Relationship relationship = wordMLPackage.getMainDocumentPart().addTargetPart(footerPart);
SectPr sectPr = sectionWrapper.getSectPr();
if (sectPr == null) {
sectPr = factory.createSectPr();
wordMLPackage.getMainDocumentPart().addObject(sectPr);
sectionWrapper.setSectPr(sectPr);
}
FooterReference footerReference = factory.createFooterReference();
footerReference.setId(relationship.getId());
footerReference.setType(hdrFtrRef); // DEFAULT
sectPr.getEGHdrFtrReferences().add(footerReference);
Total posts 10111 • Total topics 2842 • Total members 2074