Package org.docx4j.samples
Class CommentsSample
java.lang.Object
org.docx4j.samples.AbstractSample
org.docx4j.samples.CommentsSample
Creates a WordprocessingML document from scratch, and adds a comment.
Note that only w:commentReference is required
<w:p>
<w:commentRangeStart w:id="0"/>
<w:r>
<w:t>hello</w:t>
</w:r>
<w:commentRangeEnd w:id="0"/>
<w:r>
<w:rPr>
<w:rStyle w:val="CommentReference"/>
</w:rPr>
<w:commentReference w:id="0"/>
</w:r>
</w:p>
-
Field Summary
FieldsFields inherited from class org.docx4j.samples.AbstractSample
inputfilepath, outputfilepath -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static Comments.CommentcreateComment(BigInteger commentId, String author, Calendar date, String message) private static RcreateRunCommentReference(BigInteger commentId) static voidMethods inherited from class org.docx4j.samples.AbstractSample
getInputFilePath, getOutputFilePath
-
Field Details
-
factory
-
-
Constructor Details
-
CommentsSample
public CommentsSample()
-
-
Method Details
-
main
- Throws:
Exception
-
createComment
private static Comments.Comment createComment(BigInteger commentId, String author, Calendar date, String message) -
createRunCommentReference
-