Aspose table extends beyond the pages horizontally

Hello, I’m currently use Aspose words for .NET 24.1.0.
I encountered a problem when saving aspose table in two-page docx document.
This problem is when i add 2 or3 cells with long text in table on first page and add 2 cells also with long text on second page, text extends beyond the pages horizontally.
This bug exists in any formats (docx, pdf).
I use aspose.words table class for render document.
Below I have given an example of code, also attached screenshots of the document view in (docx, pdf) which reproduce the issue.
Downloads.zip (35.5 KB)

var textForCell_1 = "";var textForCell1 = "This text 1";
var textForCell_2 = "";var textForCell1 = "This text 2";
var textForCell_3 = "";var textForCell1 = "This text 3";
var textForCell_4 = "";var textForCell1 = "This text 4";
var textForCell_5 = "";var textForCell1 = "This text 5";

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.StartTable();

var contentCell_1 = builder.InsertCell().ClearFormatting();
var contentParagraph_1 = builder.CurrentParagraph.ClearFormatting();
var html_1 = textForCell_1;
builder.InsertHtml(html_1, HtmlInsertOptions.RemoveLastEmptyParagraph);

var contentCell_2 = builder.InsertCell().ClearFormatting();
var contentParagraph_2 = builder.CurrentParagraph.ClearFormatting();
var html_2 = textForCell_2;
builder.InsertHtml(html_2, HtmlInsertOptions.RemoveLastEmptyParagraph);

var contentCell_3 = builder.InsertCell().ClearFormatting();
var contentParagraph_3 = builder.CurrentParagraph.ClearFormatting();
var html_3 = textForCell_3;
builder.InsertHtml(html_3, HtmlInsertOptions.RemoveLastEmptyParagraph);

var row_1 = builder.EndRow().ClearFormatting();
row_1.RowFormat.HeightRule = HeightRule.Auto;

var table_1 = builder.EndTable();
table_1.Alignment = TableAlignment.Center;
table_1.AutoFit(AutoFitBehavior.FixedColumnWidths);

builder.StartTable();

var contentCell_4 = builder.InsertCell().ClearFormatting();
var contentParagraph_4 = builder.CurrentParagraph.ClearFormatting();
var html_4 = textForCell_4;
builder.InsertHtml(html_4, HtmlInsertOptions.RemoveLastEmptyParagraph);

var contentCell_5 = builder.InsertCell().ClearFormatting();
var contentParagraph_5 = builder.CurrentParagraph.ClearFormatting();
var html_5 = textForCell_5;
builder.InsertHtml(html_5, HtmlInsertOptions.RemoveLastEmptyParagraph);

var row_2 = builder.EndRow().ClearFormatting();
row_2.RowFormat.HeightRule = HeightRule.Auto;

var table_2 = builder.EndTable();
table_2.Alignment = TableAlignment.Center;
table_2.AutoFit(AutoFitBehavior.FixedColumnWidths);

dataDir = dataDir + @"test.docx"; //dataDir = dataDir + @"test.pdf";

doc.Save(dataDir);

@DelyaKh It looks like in your code you specify cell width explicitly and width is too wide to fit the page. If modify your code like this:

var textForCell_1 = "This text 1";
var textForCell_2 = "This text 2";
var textForCell_3 = "This text 3";
var textForCell_4 = "This text 4";
var textForCell_5 = "This text 5";

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.StartTable();

// Specify width of the cell
builder.CellFormat.Width = 100;

builder.InsertCell();
builder.InsertHtml(textForCell_1, HtmlInsertOptions.RemoveLastEmptyParagraph);

builder.InsertCell();
builder.InsertHtml(textForCell_2, HtmlInsertOptions.RemoveLastEmptyParagraph);

builder.InsertCell();
builder.InsertHtml(textForCell_3, HtmlInsertOptions.RemoveLastEmptyParagraph);

builder.EndRow();

Table table_1 = builder.EndTable();
table_1.Alignment = TableAlignment.Center;
table_1.AutoFit(AutoFitBehavior.FixedColumnWidths);

// Insert a paragraph break between tables.
builder.Writeln();

builder.StartTable();
builder.InsertCell();
builder.InsertHtml(textForCell_4, HtmlInsertOptions.RemoveLastEmptyParagraph);

builder.InsertCell();
builder.InsertHtml(textForCell_5, HtmlInsertOptions.RemoveLastEmptyParagraph);

builder.EndRow();

Table table_2 = builder.EndTable();
table_2.Alignment = TableAlignment.Center;
table_2.AutoFit(AutoFitBehavior.FixedColumnWidths);

doc.Save(@"C:\Temp\out.docx");