Shape's alternative text issue

Hi

in our project we have to use a tool to generate power point presentations through code , i am currently using aspose’s evaluation version(version=6.8) to determine weather its going to make the cut for us

by the way your product is great , has made this task a piece of cake for me but there are certain hindrances that i am facing

1 in your documentation you said to uniquely identify a shape we should use the shapes alternative text property , i have done what you have said in that article, though i have set every shape’s alternative text in the slide , but in code i am not getting that value , the value of alternative text of shapes always return empty

2 is it possible to copy a text place holder and dump all of his content to another text place holder
while preserving all the formatting and everything

Note:
we havent bought your product yet i am still running the feasibility test through the evaluation version , Am i getting the alternative text issue because of the evaluation version ???

Hi Arslan,

Thanks for sharing your interest in Aspose.Slides.

I have understood both of your requirements and like to share that Aspose.Slides completely support both of them.

For issue related to accessing the Alternative Text property in your code, I guess you may be adding the Alternative text in Title field. You need to in fact add the Alternative Text in Description field. For your kind reference, I have also attached the sample presentation. You can use it on your end.

For your second inquiry related to copying the text from one placeholder to another and also retaining the text properties. The answer to your question is that yes it is possible but before implementing this you need to have underlying knowledge of shapes, Textframe, Paragraph, Portion etc.

Actually, every shape has an associated TextFrame with it to hold the text for the shape. Similarly, for placeholder type shape there is similar TextHolder associated with it. Both TextFrame or TextHolder have collection of paragraphs. There are many properties that are set on paragraph level like paragraph indents, bullets and spacing etc. The text remains in a single paragraph until carriage return or new line feed.

For each paragraph inside paragraph collection, there is collection of portions. The properties like font style, font italicizing, font bold, font height, color etc are set on portion level. There will be a new portion for the text inside any single paragraph if any of the mentioned portion properties changed. As long as text follow similar properties of portion it will remain in single portion. So a paragraph has by default a single portion.

The text can be set on TextFrame/TextHolder level as well. By doing so, Aspose.Slides will set the text according to default settings. In order to use and preserve the font related properties one need to set the text on portion level. I would highly recommend you to please go through examples shared in this documentation section for your clear understanding. Please also visit this link for further understanding.

Now, coming to actual point of copying text and applying same text related properties from one placeholder to another. In this case you will need to copy the portions and paragraphs from one placeholder to another. Please visit this documentation link for copying paragraphs and portions inside your presentation.

Please share if I may help you further in this regard.

Many Thanks,