Document's shapes width differ based on save format

Hi,


First of all, good job with your aspose words product!

Now I’m having a problem with the width of a shape added to the document.

For example, if I add a shape of 200 X 20 to the document and save it to PDF format, it works fine (the shape, as if the is nothing in it, will be 200 X 20).

Now, I change the save format passed to the Save Method to “SaveFormat.Doc” and it seems tha the shape shrink to fit its content (note that when I create the shape, I set the “FitToContent” property to false).

Is there anything missing, a property to set?

Thanks and have a nice day,

Jsr

Hi Jsr,


Thanks for your inquiry and your kind words.

Could you please attach your document here for testing? We will test it on our side and investigate the issue for you.

Thanks,

Hi,


Thank you for the quick reply.

I’ve attached the whole solution (in AsposeWords.zip).

This project ask you to select the save format and then generates the report in this format.

It only creates a shape (textbox) of 200 * 20. In PDF, everything is OK. When selecting .DOC, the shape fit its content.

Thanks again!

Jsr

Hi


Thanks for your inquiry. Using latest Aspose.Words 11.0.0, i managed to reproduce the problem on my side. I have logged this issue in our bug tracking system. Your request has been linked to the appropriate issue. You will be notified as soon as it is fixed.

Hi there,


Thanks for your inquiry.

This issue seems to occur because you disable wrapping by changing TextBoxWrappingMode. If you leave this as default then the two outputs are the same (even if the shapes are longer than expected). This seems to be down to some funny way that MS Word handles this setting.

In the mean time you may want to look into using a textbox and adding content with paragraphs and runs instead of using the textpath. You may then avoid this sort of issue all together.

Thanks,

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


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