Hello,
Hi Bradley,
- Your input Word document
- Please attach the output Word file that shows the undesired behavior.
- Please attach the target Word file that shows the desired behavior.
- Please create a standalone console application (source code without compilation errors) that helps us reproduce your problem on our end and attach it here for testing.
Hello,
Hi Bradley,
Thanks for sharing the detail. We would like to clarify a bit regarding horizontally merged cells. If you imagine first row with one wide cell and second row with two narrow cells, then looking at this document the cell in the first row will appear horizontally merged. But it is not a merged cell; it is just a single wide cell.
DocumentBuilder documentBuilder = new DocumentBuilder();<o:p></o:p>
Aspose.Words.Tables.Table table = documentBuilder.StartTable();
documentBuilder.InsertCell();
documentBuilder.CellFormat.Width = 100;
documentBuilder.Write("100 - ????");
documentBuilder.InsertCell();
documentBuilder.CellFormat.Width = 100;
documentBuilder.Write("100");
documentBuilder.InsertCell();
documentBuilder.CellFormat.Width = 100;
documentBuilder.Write("100");
documentBuilder.EndRow();
documentBuilder.InsertCell();
documentBuilder.CellFormat.Width = 200;
documentBuilder.Write("200");
documentBuilder.InsertCell();
documentBuilder.CellFormat.Width = 100;
documentBuilder.Write("100");
documentBuilder.EndRow();
table.PreferredWidth = PreferredWidth.FromPoints(300);
documentBuilder.EndTable();
documentBuilder.Document.Save(MyDir + "Test_16_2_0_0.doc");
Great. Solution with Table.PreferredWidth is better for me. Right now everything works well with doc but what about pdf? It works like before.
DocumentBuilder documentBuilder = new DocumentBuilder();
Aspose.Words.Tables.Table table = documentBuilder.StartTable();
documentBuilder.InsertCell();
documentBuilder.CellFormat.Width = 100;
documentBuilder.Write("100 - ????");
documentBuilder.InsertCell();
documentBuilder.CellFormat.Width = 100;
documentBuilder.Write("100");
documentBuilder.InsertCell();
documentBuilder.CellFormat.Width = 100;
documentBuilder.Write("100");
documentBuilder.EndRow();
documentBuilder.InsertCell();
documentBuilder.CellFormat.Width = 200;
documentBuilder.Write("200");
documentBuilder.InsertCell();
documentBuilder.CellFormat.Width = 100;
documentBuilder.Write("100");
documentBuilder.EndRow();
table.PreferredWidth = PreferredWidth.FromPoints(300);
documentBuilder.EndTable();
// Update the table structure to match the specified cell widths.
table.AutoFit(AutoFitBehavior.FixedColumnWidths);
documentBuilder.Document.Save(MyDir + "Test_16_3_0_0.pdf");
The issues you have found earlier (filed as WORDSNET-13331) have been fixed in this .NET update and this Java update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.