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 Tue Oct 14, 2025 7:18 pm
<p>Люди мустьерского времени были современниками: <img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADYAAAAaCAYAAAD8K6+QAAAC10lEQVR42u2XW0iUQRTHtS0vaWphdpMu5lJWRA9dILCHLlRqW62phKwUpJQUREpQgV0gKLpB94iCgiIiylDsIj1EFBZBJVJBUIgvPRQ9VNSDUf+B/xfDaWZ38fug7+E78IOdM+fMN2fmnJnZlJRAAgmEshxUDNB3G5jqx6BKwUkX/tngAcj0U1BZ4BHIcDlOHTjhp8D2gy0ejJMKusASPwQ1BPSCoR6mdIcfAlsG7ni8UD/ACFPnGHAWHAKnwBVQJGzGsb8J7ATHqNNlHtjE3I+AHeCwsDkPdsWZaD7YTBvHbi1oARtAgcHnPVgnlZPAJ66kI+XgqdaeBl6CQk1XArrBLLYLeEoNEmnSJr73BKyyBDWMi5bG9m1wDawBo8AXLpyU++CAVD4Eb4ROGb0CITAYvLCs8j7wnMEsBe/E8auK+6jw+QAWWALbCIZr7YvgLcfJ4ffSDH5nwCWZgr+ZHlKc4p5NG9NFGmXfHDCSO/+R6RfhsS7lJ5hhCaxEtLuZ/omkibv2VxZzYg1xnNbTptTQt5B9dWyrtGwFX6lXgZYJH1Xoc5OYbB74leTLpBF06oqZnEBLHKcK2pQZ+iLsW8Tdz6Y+RJ06/T6DdFHotUlMdiUDyxWpbRJVJpflUdkHbhiMw2A8Tym1A1sNNtvBN3682nDpZnLXijXdY7DHMsGw9vs461yX3Ra/I+CgVFaC76Kg1cpc1QpVbXWPWL0s6mJs14DXXCxH0nnw6CflBV4nUlT29HOnczhWu7j/yi2B3dXm8c+l2cMdqOcdNVnYVHOARtq0i5SqZH2dY9pWgdOG2lR9zwxzmM6rYQVoBqNZN1F+L2YJKsSsyIuX1yr1xibI/QlgoiHfM7gzqbzcCxM8qXIt/cW8YpzMCSd4LM/3+CXjSvayhryQ6+Jx8d8fwl2sKzei/mje9NsfzSngngt/deLe4jXjO1FvxtUD9G3mOzeQQPwqfwCeP4GpjYjx7gAAAABJRU5ErkJggg==' alt='' /></p>
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 10200 • Total topics 2872 • Total members 2100