We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Rotation of Shapes don't work with Slides.Net 14.2+

Well, I’m a bit frustrated.

After migrating a huge amount of code to the Unified API I’ve discovered Shape rotation is broken.
The following 3 simple lines from your documentation (slightly modified the shape size) are not working with version 14.2.0 and 14.3.0

ISlide sld = pptx.Slides[0];
//Add autoshape of rectangle type
IShape shp = sld.Shapes.AddAutoShape(ShapeType.Rectangle, 50, 150, 500, 50);
//Rotate the shape to 90 degree
shp.Rotation = 90;

After setting the rotation value to the shape the debugger tells me Rotaition is NaN and the saved pptx also shows the sphape unrotated.

I have to repeat myself, that I’m very frustrated at the moment. Because your PDF library doesn’t work as expected we have to use the Slides components to create PDF documents but now we can’t even use the Slides component anymore because of this bug.

We need a fix very urgent!

Hi Daniel,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for sharing the details.

I am able to reproduce your mentioned issue after an initial test. An issue has been registered in our issue tracking system with issue id: SLIDESNET-35376. You will be notified via this forum thread once the issue gets resolved.

Thanks & Regards,

I assume fixing this issue and releasing a new version may take some time. But we need a solution today.

Can you please contact your development team and ask them if there is any workaround we can use to set the rotation in another way. Maybe by reflection or by setting other properties.

This is a show stopper for our software and we have to fix that issue shortly!

Hi Daniel,

I have shared your concerns with the development team and asked them to suggest any workaround (if possible) as per the issue you are facing. As soon as I get a feedback, I will update you via this forum thread.

Thanks & Regards,

Hi Daniel,<?xml:namespace prefix = o ns = “urn:schemas-microsoft-com:office:office” /><o:p></o:p>

Please try the following workaround at your end and let us know if
it works fine for you.<o:p></o:p>

Presentation pptx = new

<o:p> </o:p>

ISlide sld = pptx.Slides[0];<o:p></o:p>

<o:p> </o:p>

//Add autoshape of rectangle type<o:p> </o:p>

IShape shp = sld.Shapes.AddAutoShape(ShapeType.Rectangle, 50, 150, 500, 50);<o:p></o:p>

<o:p> </o:p>

float rotation = 90;<o:p></o:p>

<o:p> </o:p>

// This part is necessary only if there is a chance for rotation
to go beyond the [0;360] range.<o:p></o:p>

if (rotation < 0)<o:p></o:p>

rotation += (float)(360

  • Math.Floor((-rotation) / 360) * 360);<o:p></o:p>

%= 360;<o:p></o:p>

<o:p> </o:p>

IShapeFrame oldFrame = shp.Frame;<o:p></o:p>

= new ShapeFrame(oldFrame.X,
oldFrame.Y, oldFrame.Width, oldFrame.Height, oldFrame.FlipH, oldFrame.FlipV,

<o:p> </o:p>


Thanks & Regards,<o:p></o:p>

It’s working. Thanks!

Hi Daniel,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for the confirmation.

We are glad to know that the workaround works fine for you. Please feel free to contact support in case you need any further assistance.

Thanks & Regards,

The issues you have found earlier (filed as SLIDESNET-35376) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by Aspose Notifier.