Thanks for inquiring Aspose.Slides.
I have observed the sample code by you and request you to please share the sample presentation that is failing to retrieve the text. Please also share the details as well that which portion of text is missing from extraction on your end. I will investigate the issue on my end to help you further in this regard.
Dim Buffer As New StringBuilderDim Slides As New Aspose.Slides.Presentation()For Each Slide As Aspose.Slides.Slide In Slides.SlidesFor Each Shape As Aspose.Slides.IShape In Slide.ShapesIf Shape.Placeholder IsNot Nothing ThenDim Holder As Aspose.Slides.ITextFrame = (DirectCast(Shape, Aspose.Slides.IAutoShape)).TextFrameIf Holder IsNot Nothing Then Buffer.Append(Holder.Text & DELIMITER)ElseIf TypeOf Shape Is Aspose.Slides.IAutoShape ThenDim TxtFrame As Aspose.Slides.ITextFrame = (DirectCast(Shape, Aspose.Slides.IAutoShape)).TextFrameIf Holder IsNot Nothing Then Buffer.Append(Holder.Text & DELIMITER)End IfNextNext
Thank you for the code. I have some concerns about this line:
I have observed comments shared by you and like to share that you cannot cast IPlaceholder to IAutoShape. What I have suggested you is right approach. Actually, I have ported the sample code shared by you w.r.t new API. In old API we used to have text in TextHolders and TextFrames. However in new API we have text only maintained in TextFrames. I have only ported your code to check Placeholder as sometimes getting placeholder type is used in customer codes. Otherwise, in order to extract the text only accessing ITextFrame is sufficient. Please share, if I may help you further in this regard.