I am using apache poi xslf to create a text box and then adding a bullet point in it. Issue is that When bullet point is multi line text, it adds like this
-Text analysis, nGram, Naïve Bayes Text Classifier to identify the nature of the conversation, sentiment and risk of complaint being made
in above bullet point conversation should be aligned with word Text in bullet line i.e. text alignment like this
- Text analysis, nGram, Naïve Bayes Text Classifier to identify the nature of
the conversation sentiment and risk of complaint being made.
Following is the code
XSLFTextBox textbox = this.slide.createTextBox();
textbox.setAnchor(new Rectangle(this.xAxis,this.yAxis,this.width,this.height)); XSLFTextParagraph contentPara = textbox.addNewTextParagraph();
XSLFTextRun bullet1TR = contentPara.addNewTextRun(); contentPara.setBullet(true);
contentPara.setFontAlign(FontAlign.TOP); contentPara.setTextAlign(TextAlign.LEFT);
Any help is appreciated. Thanks.
At first the whole paragraph needs left indented as much as the bullet point shall have space. Then the first row needs to have a hanging indent of the same width, so the first row, which has the bullet point in it, is not indented in sum.
Example: