I detected that some auto shapes have differences between the size returned by corresponding “getWidth()” and “getHeight()” methods, and the size used when writting as SVG.
@rsalado,
Thank you for the query. I checked the shape size using Aspose.Slides. If you compare it with the size in PowerPoint, you can see the same values.
But the size used in the generated SVG is not the same. There are differences between the values returned by the methods “getWidth” and “getHeight”, and the size used in the SVG. Specifically, the width is different.
@rsalado,
The SVG width attribute contains the displayed width of the rectangular viewport. SVG images obtained through Aspose.Slides and PowerPoint are identical in size but created in different coordinate systems. You can compare the sizes in a vector graphics editor.
According to Aspose.Slides, this AutoShape has the same width and height, but the resulting SVG has different proportions as you can see (another way to check this: if you try to convert the resulting SVG in a JPG with any image conversor, you can see that the resulting image is not square). So the problem has to be somewhere.
Ok… this problem is not present in other versions of Aspose (for example, Aspose.Slides 20.1). In this version, the resulting SVG proportions are correct.
I suppose then that is something that you have consciously changed, right?
Anyway, this behavior still seems strange to me in the new versions of Aspose.
@rsalado,
Thank you for the additional information. I checked it and found no public information about this change for SVG export. I added a ticket with ID SLIDESJAVA-38556 in our tracking system. Our development team will investigate this change. I will inform you of any news.
@rsalado,
Our development team investigated the issue. At the moment, Aspose.Slides reproduces the behavior of PowerPoint. But if you need to save shapes as SVG in different ways, we can add an appropriate API. Please take a look at IShape.getThumbnail method. If the capabilities of this method suit you, we could implement something similar for SVG.