Free Support Forum -

Cannot detect shape visibility correctly if it's a part of a group shape

Hi Aspose. I’m facing an issue when i’m trying to verify if a shape is visible on a slide. I’m doing this by trying to get a thumbnail with ShapeThumbnailBounds.Appearance and if it returns null i assume that shape is not visible. But if a shape is a part of a group shape GetThumbnail doesn’t return null. Here you can find a source project. Thank you in advance.

It is common issue which is seen Excel regard group shape. You can use this "Set AShape = ShapeGroup to visible correctly.

No, i’m not talking about IShape shape.IsVisible. This is another issue when the shape is located outside a slide.


Can you please explain your requirements. Do you want to judge if any shape (whether shape inside a group shape) is part of slide or it lies outside slide area?

Yes, that’s correct


You can traverse all shapes and even shapes inside group shapes. Then you need to check the X and Y position of the shape and check if the X position is greater than slide width or Y position is greater than slide height. If, yes then shape lies outside the active slide area. I hope the shared elaboration will be helpful.

Hi. There is a situations when a pictureframe shape is located outslide a slide and is a part of a group shape, which is visible. In this situations group shape will have X and Y coordinates inside a slide but i couldn’t get a proper thumbnail of this groupshape since a picture frame inside it is invisible


Can you please explain your requirement. Do you want to verify if any shape or a shape inside a group shape lies inside slide area or not. Or you are interested in generating shape thumbnail of a group shape which has got one shape inside slide area and other one out side of that.

Hi, I’m interested in generating a thumbnail of a group, which contains shapes outside a slide area.


Please try using following sample code for generating the thumbnail of a group shape.

                    var th=shape.GetThumbnail(ShapeThumbnailBounds.Shape, 2, 2);
                    th.Save("groupshape.png", System.Drawing.Imaging.ImageFormat.Png);