Hi Team
I hope you are doing well. Happy new year to all.
Recently I try to get the number of portions added in the one column using the (JAVA) aspose-slides 19.3 jdk16.
public Presentation produce(Presentation presentation, JSONArray sources) {
// pptxAutoShape - is the shape in which I want to add the text.
ITextFrame iTextFrame = pptxAutoShape.getTextFrame();
iTextFrame.getTextFrameFormat().setAnchoringType(TextAnchorType.Top);
iTextFrame.getTextFrameFormat().setAutofitType(TextAutofitType.Normal);
IParagraph[] paragraph = new Paragraph[sources.length()];
iTextFrame.getParagraphs().removeAt(0);
ITextFrameFormat format = pptxAutoShape.getTextFrame().getTextFrameFormat();
format.setColumnCount(3); // Specify number of columns in TextFrame
format.setColumnSpacing(10); // Specify spacing between columns
for(int j = 0; j < sources.length(); j++) {
JSONObject slideInfo = sources.getJSONObject(j);
paragraph[j] = new Paragraph();
IPortion port = new Portion();
port.setText(slideInfo.getString("slideTitle"));
port.getPortionFormat().setFontHeight(10);
paragraph[j].getParagraphFormat().setSpaceBefore(50.0F);
paragraph[j].getParagraphFormat().setSpaceAfter(30.0F);
paragraph[j].getParagraphFormat().setIndent(10);
Hyperlink hyperlink = new Hyperlink(presentation.getSlides().get_Item(order));
hyperlink.setTooltip(slideInfo.getString("slideTitle"));
port.getPortionFormat().setHyperlinkClick(hyperlink);
paragraph[j].getPortions().add(port);
iTextFrame.getParagraphs().add(paragraph[j]);
}
return presentation;
}
using the above code I can add the multiple hyperlinks in the same shape. Can you please help me to know that is it possible to know the limit of the portion how much I can add in one column and how to get the number of the portion added in one specific column.
Required to know the count of portions in one column so that when there is only one link in any column then I have to move two more links from the previous column.
Thanks for help & support in advance.