I have used the paragraph.getParagraphFormat().setKeepTogether(true);
and the original result is
it turns to
however , the black cubic before the footnote is not what i want. How can i fix it ?
I have used the paragraph.getParagraphFormat().setKeepTogether(true);
and the original result is
it turns to
however , the black cubic before the footnote is not what i want. How can i fix it ?
@Madecho Could you please attach your input and expected output documents here for our reference? We will check them and provide you more information. Unfortunately it is impossible to analyze the problem using screenshots.
@alexey.noskov
test.docx (37.2 KB)
hi alexey, this is the test document. and the code i used is :
Document document = new Document("src/main/test/test.docx");
NodeCollection<Footnote> childNodes = document.getChildNodes(NodeType.FOOTNOTE, true);
for (Footnote footnote : childNodes) {
for (Paragraph paragraph : footnote.getParagraphs()) {
paragraph.getParagraphFormat().setKeepTogether(true);
}
}
document.save("src/main/test/result.docx");
and the result of footnotes have a black cubic ahead of the line
@Madecho This small rectangle before the paragraph is shown by MS Word when show hidden formatting symbols
option is enable to mark paragraph, which are marked with Keep Together
option. So you can either disable show hidden formatting symbols
option in MS Word or reset Keep Together
option of paragraph.
@alexey.noskov
but I didn’t enable show show hidden formatting symbols in MS word, but it still exits