Tablewidth Issue After DocumentBuilder.InsertImage

Hi

After inserting an image into my document using DocumentBuilder.InsertImage, any subsequent tables have their width confined to the width of the image. No amount of messing around with CellFormat Widths seems to address the issue. Has anyone had this before? Anyone have a fix?

The following code snippet should illustrate the issue:

System.Drawing.Image i = System.Drawing.Image.FromFile(Filename);
b.InsertImage(i);

b.RowFormat.HeightRule = RowHeightRule.Auto;
b.CellFormat.VerticalAlignment = CellVerticalAlignment.Center;
b.RowFormat.LeftIndent = 33;

b.StartTable();
b.InsertCell();
b.CellFormat.Width = 4 \* 72;
b.ParagraphFormat.Alignment = ParagraphAlignment.Left;
b.Write("ImageSource");

b.InsertCell();
b.CellFormat.Width = 1.4 \* 72;
b.ParagraphFormat.Alignment = ParagraphAlignment.Right;
b.Write("\u00A9 CompanyName"); // \u00A9 is the Unicode for the copyright symbol
b.EndRow();
b.EndTable();

Any help much appreciated.

Regards
Mike Cook

Sorry, but it works fine for me. Try using latest Aspose.Word hotfix. If still does not work, send me more code, the image file and the document you insert it into.

Thanks for looking into this. I still have the issue and have mailed an example project to you that should illustrate it.

REgards
Mike

Hi Mike,

This was fixed in Aspose.Word 2.1.12, for more info see https://docs.aspose.com/words/net/release-notes/