Rescaling DrawingML nodes with non-uniform aspect ratio

Hi,
we’re using Aspose.Words .NET 11.10.0 to rescale images inside a document. For that we go over the DrawingML nodes and reset their height/width properties. Thats works when the size corresponds to the image aspect ratio (100x100 resizes correctly to 200x200 etc) but it does not when you want to resize non-uniformly.
When you resize a 100x100 to 100x200, the image itself stays at 100x100. The drawing frame stays at that size as well, yet the area reserved in Word corresponds to the new size. Additionally when you open the image size properties of that image in word and change any value in the dialog it updates and the image is correct.
Also when you open the result file, change any size property value so the image is displayed correctly and then press CTRL+Z to revert the change and close Word, no save changes dialog shows up. For Word there was no difference between the initial state saved by Aspose and where the image is incorrect and the correct one.
Resizing the image to the target size does not help as well.
So there seems to be an update missing or something internally.
Code used for the update:

Document document = new Document(filename);
foreach (DrawingML node in document.GetChildNodes(NodeType.DrawingML, true))
{
    node.Width = 100;
    node.Height = 200;
}
document.Save(Path.Combine(Path.GetDirectoryName(filename), "result.docx"), SaveFormat.Docx);

Is there something missing or any known workaround ?
Thanks for the support,
Oliver

Hi Oliver,

Thanks for your inquiry.

While using the latest version of Aspose.Words i.e. 11.10.0, I managed to reproduce this issue on my side. I have logged this issue in our bug tracking system. The issue ID is WORDSNET-7497. Your request has also been linked to this issue and you will be notified as soon as it is resolved.

Sorry for the inconvenience.

Best regards,

Hi

Need help with this please - looks like it’s still an issue in Aspose.Words.14.9.0.0…

I have attached a sample project based on Oliver’s code. It is supposed to resize all content controls to squares, but instead it fits the original content control’s biggest size dimension within the new size dimensions, while keeping the original aspect ratio. I verified that all the content controls have ‘Lock aspect ratio’ unchecked.

Please see ‘Sizes Test.docx’ for the sample input and ‘bin/debug/result.docx’ for the resulting document.

Kind regards
Ernest

Hi Ernest,

Thanks for your inquiry.

While using the latest version of Aspose.Words i.e. 14.10.0, I managed to reproduce this issue on my side. I have logged this issue in our bug tracking system. The Id of this issue is WORDSNET-11004. Your request has also been linked to the appropriate issue and you will be notified as soon as it is resolved. Sorry for the inconvenience.

Best regards,

Hi Awais

Just tested this using 14.12 and it’s still not working.

Can you please give an ETA on this?

Kind regards
Ernest

Hi Ernest,

Thanks for your inquiry. Unfortunately, your issues are not resolved yet. We have asked the ETAs of these issues from our development team and will update you as soon as any estimates are available. We apologize for your inconvenience.

Best regards,

Hi Awais

It has been another month since your last update, and 2 years since the issue was first submitted.

Can you please give a clear indication when this will be fixed, or if we should look at an alternative to Aspose for this functionality?

Hi Ernest,

Thanks for your inquiry. Unfortunately, there are no further news about your issues. However, we are in communication with our development team to get firm estimates. We will inform you as soon as ETAs are available. We apologize for your inconvenience.

PS: If these issues are important to you, and for the fast resolution of these issues, please have a look at enhanced support options - e.g. purchasing Priority Support will allow you to post your issues in our Priority Support forum and raise the priority of these issues directly with our development teams, if possible, we will then aim to get a resolution to your issues as soon as we can. Many Priority Support customers find that this leads to their issues being fixed in the next release of the software.

If you would like to take advantage of Enhanced Support then please request a quote in our purchase forum -https://forum.aspose.com/c/purchase/6

Best regards,

Hi Awais,
I used to have priority support, but found that I had the same problem that issues I raised took too long to be resolved. (Please feel free to search your database for details surrounding instances I am referring to)
For that reason, I chose to exclude the enhanced support from my renewal.

Hi Ernest,

Thanks for the details. We will be sure to provide you some further feedback once we get a firm estimate on these issues. We apologize for your inconvenience.

Best regards,

Hi Awais

I’ve just tested this issue with v15.2 and it’s still not working.

How can we escalate this in order to get support on this issue?

Hi Ernest,

Thanks for your inquiry. Your issues have now been resolved. The fixes to your issues will be included in next version of Aspose.Words i.e. 15.3.0. We will inform you via this thread as soon as next release containing the fixes will be published at the end of current month. We apologize for any inconvenience.

Best regards,

The issues you have found earlier (filed as WORDSNET-11004) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

The issues you have found earlier (filed as WORDSNET-7497) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.