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

Free Support Forum - aspose.com

Shape.TextBox doesn't keep its internal margins on save


I have found the following issue. When setting a shape’s textbox margins to 0, we lose this setting on save, thus messing up the position of our objects.

Here is the code I used to reproduce this issue:
var document = new Document(“test.docx”);

var shape = document.GetChildNodes(NodeType.Shape, true);

foreach (Shape s in shape)
s.TextBox.InternalMarginTop = 0;
s.TextBox.InternalMarginLeft = 0;
s.TextBox.InternalMarginRight = 0;
s.TextBox.InternalMarginBottom = 0;


document = new Document(@“C:\test2.docx”);
shape = document.GetChildNodes(NodeType.Shape, true);
foreach (Shape s in shape)
if (Math.Abs(s.TextBox.InternalMarginBottom + s.TextBox.InternalMarginLeft
+ s.TextBox.InternalMarginRight + s.TextBox.InternalMarginLeft) > 0.0)
Console.WriteLine(“Wrong value!”);

InternalID: 29458

Best regards,
Jean-Alexandru Stanescu
Junior Developer
IBM Romania

Hi Jean-Alexandru,

Thanks for your inquiry. I have tested the scenario and have managed to reproduce the same issue at my side. For the sake of correction, I have logged this problem in our issue tracking system as WORDSNET-12471. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

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

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