I have a requirement to generate slides dynamically using Aspose.slides (18.104.22.168) from SharePoint data. Here I need to identify the end of the slide based on Shape Height and the content needs to be moved to new slide
I have used the below code block in my solution to check the shape height and based on condition i am moving the text to next slide.
But here I am getting "Null Reference" exception for "Shape.Y" property for few item from sharepoint list items .Also I have attached the exception screenshot. Can someone please guide me where it went wrong and help me in resolving this issue.
IShape Shape = slide.Shapes;
if (Shape.Placeholder != null)
if (Shape.Placeholder.Type == PlaceholderType.Body || Shape.Placeholder.Type == PlaceholderType.Object)
Aspose.Slides.ITextFrame Holder = ((Aspose.Slides.IAutoShape)Shape).TextFrame;
Holder.TextFrameFormat.AutofitType = TextAutofitType.Shape;
if (Shape.Y + Shape.Height > presentation.SlideSize.Size.Height - 40)
overflow = true;