Hi guys,
I need to insert a text at the end of the each page of my document. What I’m doing is:
final com.aspose.words.DocumentBuilder builder = new com.aspose.words.DocumentBuilder(document);
for (Section sect : document.getSections()) {
final Paragraph lastPara = sect.getBody().getLastParagraph();
final Paragraph newPara = builder.insertParagraph();
final Run run = new Run(document, WATERMARK_TEXT);
final Font f = run.getFont();
f.setName(“Arial”);
f.setSize(16);
f.setBold(true);
newPara.getRuns().add(run);
lastPara.getParentNode().insertAfter(newPara, lastPara);
However, the result document is wrong. I’ve attached the input and the output documents.
Best Regards,Documents.zip (17.1 KB)