Free Support Forum - aspose.com

Incorrect margins in cells of tables after merging!

Please, help me: i have doc-file with some merge fields in data baza. I retrieve this doc from baza and replace all merge fields
with values (using Aspose.Word), then i output this document as byte[] to user this way:

Response.OutputStream.Write(Doc, 0, Doc.Length);
Response.AddHeader(“Content-Type”, “application/msword”);

But all margings in all cells in document tables have 0 value now:(
Can anyone explain me what happens?

Hi

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

Thanks for your inquiry. Could you please attach your document here for testing and provide me sample code, which will allow me to reproduce the problem on my side? I will check the issue and provide you more information.

Best regards.

Alexey, thank you for your reply! I very much require the decision of this problem. Your component is excellent! But I have a small problem, which I can not solve. Below the piece of a code from which it is visible where there is a mistake:

byte[] docBytes = ….; // this is a word file in byte[] from baza

if I do:

Response.OutputStream.Write(docBytes, 0, docBytes.Length);

HttpContext.Current.Response.AddHeader("Content-Type", "application/msword");

all open right;

But if I open from Aspose.Word:

Stream StreamObject = new MemoryStream(docBytes);

Aspose.Words.Document doc = new Aspose.Words.Document(StreamObject);
doc.Save("Aspose.Words.Demos.doc", SaveFormat.Doc, SaveType.OpenInWord, Response);

then all margings in cells in document tables is equal 0.

What is a reason of this?

Alexey, I attached the document which i use in this post

i am sorry for wrong title of this post: “Incorrect margins in cells of tables after merging!!!” - as now is clearly the problem is not in merging

Hi

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

Thank you for additional information. I cannot reproduce the problem on my side. I use the latest version of Aspose.Words (7.0.0) for testing. You can download it from here:

http://www.aspose.com/community/files/51/.net-components/aspose.words-for-.net/category1188.aspx

Which version of Aspose.Words do you use? To check version of the library, right click on the dll, select Properties from the context menu, then select Version tab. You will see File version.

Best regards.

O, yeeesss!:slight_smile: New version of aspose works correctly!!:slight_smile: Thank you very much!:slight_smile: