I want to fetch details like (X,Y,Height,Width,Color, etc) recursively from one text placeholder’s text which is encapsulated in “{{ }}” curly bracket.
For example in below zip there is one screenshot of a layout’s placeholder “{{ client name }} and {{dynamic field}}”. I want to store styling details separately for “{{client name}}” and a “{{dynamic field}}” variable data in array of object. I want X, width, colour of a “{{dynamic field}}” as Y will be same as placeholder’s Y position but the X position will be different.
Please let me know is this possible with aspose slide java?
@saquibs,
The text parser has to be your own component for the text analysis. It doesn’t depend on Aspose.Slides library.
Text portion size, position, and color can be obtained as below:
// shape is IAutoShape here
// get the first paragraph, for example
IParagraph paragraph = shape.getTextFrame().getParagraphs().get_Item(0);
// get the first text portion, for example
IPortion portion = paragraph.getPortions().get_Item(0);
Rectangle2D portionRectangle = portion.getRect();
Color portionColor = portion.getPortionFormat().getEffective().getFillFormat().getSolidFillColor();
Thanks, I did that but there is a case where I am having a single paragraph and single portion now I have to get X and Width of “{{dynamic field}}” word.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.