Hi there,
I can still reproduce this isse in Aspose.Words for.NET Version 20.6.0 using the following code:
internal static void Run()
{
var builder = new DocumentBuilder();
var table = builder.StartTable();
#region header row
var cell = builder.InsertCell();
cell.FirstParagraph.ParagraphFormat.Alignment = ParagraphAlignment.Left;
cell.CellFormat.PreferredWidth = PreferredWidth.Auto;
cell.CellFormat.WrapText = true;
builder.Write("Column header 1");
cell = builder.InsertCell();
cell.FirstParagraph.ParagraphFormat.Alignment = ParagraphAlignment.Left;
cell.CellFormat.PreferredWidth = PreferredWidth.Auto;
cell.CellFormat.WrapText = true;
builder.Write("Column header 2");
cell = builder.InsertCell();
cell.FirstParagraph.ParagraphFormat.Alignment = ParagraphAlignment.Left;
cell.CellFormat.PreferredWidth = PreferredWidth.Auto;
cell.CellFormat.WrapText = true;
builder.Write("Column 3");
cell = builder.InsertCell();
cell.FirstParagraph.ParagraphFormat.Alignment = ParagraphAlignment.Right;
cell.CellFormat.PreferredWidth = PreferredWidth.Auto;
cell.CellFormat.WrapText = false;
builder.Write("Column value");
builder.EndRow();
#endregion
#region row 1
cell = builder.InsertCell();
cell.FirstParagraph.ParagraphFormat.Alignment = ParagraphAlignment.Left;
cell.CellFormat.PreferredWidth = PreferredWidth.Auto;
cell.CellFormat.WrapText = true;
builder.Write("column 1 description of content \n comes from A".Replace(@"\n", ControlChar.LineBreak));
cell = builder.InsertCell();
cell.FirstParagraph.ParagraphFormat.Alignment = ParagraphAlignment.Left;
cell.CellFormat.PreferredWidth = PreferredWidth.Auto;
cell.CellFormat.WrapText = true;
builder.Write("column 2 description of content \n comes from B".Replace(@"\n", ControlChar.LineBreak));
cell = builder.InsertCell();
cell.FirstParagraph.ParagraphFormat.Alignment = ParagraphAlignment.Left;
cell.CellFormat.PreferredWidth = PreferredWidth.Auto;
cell.CellFormat.WrapText = true;
builder.Write("Column 3");
cell = builder.InsertCell();
cell.FirstParagraph.ParagraphFormat.Alignment = ParagraphAlignment.Right;
cell.CellFormat.PreferredWidth = PreferredWidth.Auto;
cell.CellFormat.WrapText = false;
builder.Write("EUR 155,499,357");
builder.EndRow();
#endregion
table.Style = builder.Document.Styles[StyleIdentifier.TableNormal];
table.AllowAutoFit = true;
table.StyleOptions = TableStyleOptions.FirstRow | TableStyleOptions.RowBands;
table.PreferredWidth = PreferredWidth.Auto;
table.Alignment = TableAlignment.Left;
builder.EndTable();
builder.InsertBreak(BreakType.ParagraphBreak);
builder.Document.Save("output.docx", SaveFormat.Docx);
builder.Document.Save("output.pdf", SaveFormat.Pdf);
}
As You will see, the Text in the 4th column of 1st row wraps in PDF output.
Thanks for your help,
Peter