Hi Team,
I’m having some troubles with url tooltip breaking when the same is wrapped inside the table cell.
I am using Aspose.Words.dll version 14.12.0.0
Please check the below code and advice:
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.Writeln();
builder.CellFormat.ClearFormatting();
builder.StartTable();
builder.InsertCell();
builder.CellFormat.PreferredWidth = PreferredWidth.FromPercent(100);
builder.CellFormat.Borders.Color = Color.LightGray;
builder.Write("View Name: Test");
builder.EndRow();
builder.EndTable();
builder.CellFormat.ClearFormatting();
builder.StartTable();
builder.InsertCell();
builder.CellFormat.PreferredWidth = PreferredWidth.FromPercent(25);
builder.Write("Name");
builder.InsertCell();
builder.CellFormat.PreferredWidth = PreferredWidth.FromPercent(75);
builder.Write("1");
builder.EndRow();
builder.InsertCell();
builder.CellFormat.PreferredWidth = PreferredWidth.FromPercent(25);
builder.Write("Type");
builder.InsertCell();
builder.CellFormat.PreferredWidth = PreferredWidth.FromPercent(75);
builder.Write("2");
builder.EndRow();
builder.EndTable();
builder.CellFormat.ClearFormatting();
builder.StartTable();
builder.InsertCell();
builder.Write("Section: Columns");
builder.EndRow();
builder.EndTable();
builder.CellFormat.ClearFormatting();
builder.CurrentParagraph.ParagraphFormat.SpaceAfter = 0;
builder.CurrentParagraph.ParagraphFormat.SpaceBefore = 0;
builder.CurrentParagraph.ParagraphBreakFont.Size = 1;
builder.InsertParagraph();
builder.CellFormat.ClearFormatting();
Table tbl = builder.StartTable();
builder.InsertCell();
builder.CellFormat.PreferredWidth = PreferredWidth.FromPercent(20);
builder.Write("Attribute");
builder.InsertCell();
builder.CellFormat.PreferredWidth = PreferredWidth.FromPercent(20);
builder.Write("Width");
builder.InsertCell();
builder.CellFormat.PreferredWidth = PreferredWidth.FromPercent(20);
builder.Write("Format");
builder.InsertCell();
builder.CellFormat.PreferredWidth = PreferredWidth.FromPercent(20);
builder.Write("Format1");
builder.InsertCell();
builder.CellFormat.PreferredWidth = PreferredWidth.FromPercent(10);
builder.Write("Format2");
builder.InsertCell();
builder.CellFormat.PreferredWidth = PreferredWidth.FromPercent(10);
builder.Write("Visible");
builder.EndRow();
builder.CellFormat.ClearFormatting();
for (int j = 1; j <= 3; j++)
{
builder.InsertCell();
builder.CellFormat.PreferredWidth = PreferredWidth.FromPercent(20);
builder.Write("http://www.google.com/");
builder.InsertCell();
builder.CellFormat.PreferredWidth = PreferredWidth.FromPercent(20);
builder.Write("https://www.microsoft.com/en-in/");
builder.InsertCell();
builder.CellFormat.PreferredWidth = PreferredWidth.FromPercent(20);
builder.Write("https://www.aspose.com/");
builder.InsertCell();
builder.CellFormat.PreferredWidth = PreferredWidth.FromPercent(20);
builder.Write("https://www.aspose.com/");
builder.InsertCell();
builder.CellFormat.PreferredWidth = PreferredWidth.FromPercent(10);
builder.Write(j.ToString());
builder.InsertCell();
builder.CellFormat.PreferredWidth = PreferredWidth.FromPercent(10);
builder.Write(j.ToString());
builder.EndRow();
}
builder.EndTable();
tbl.AutoFit(AutoFitBehavior.FixedColumnWidths);
doc.Save("c:/pdffile.pdf");
Screen shot below for reference:
image.png (26.0 KB)
Please advise how I can solve the issue ?
Thanks in anticipation.
Tushar