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 Sun Jan 12, 2025 7:14 pm
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 10116 • Total topics 2845 • Total members 2076