Aspose.PDF.Drawing Makes Wrapped Text Underlined

Hello,

We are experiencing an issue with Aspose.PDF.Drawing while working with tables. Specifically, when we enable word wrapping for a cell using the property:


cell.IsWordWrapped = true;

If the text within the cell is short and does not wrap, everything works as expected. However, when the text is long and wraps to the next line, it unexpectedly becomes underlined.

This behavior does not occur in Aspose.PDF; it works correctly there.

Could you please help us resolve this issue? Is this a known bug, or are there specific settings we need to adjust?

Thank you for your assistance!

Simple code:

Document doc = new Document();
Page page = doc.Pages.Add();
Table table = new Table();
page.Paragraphs.Add(table);

table.ColumnWidths = "100 100";
Row row = table.Rows.Add();
Cell cell = row.Cells.Add();
cell.Border = new BorderInfo(BorderSide.All, 1f);
cell.Margin = new MarginInfo(10, 10, 10, 10);
cell.Alignment = HorizontalAlignment.Left;
TextFragment textFragment = new TextFragment("Long text so try to check how it will be wrapped");

textFragment.TextState.Underline = false;
textFragment.TextState.LineSpacing = 5;
textFragment.TextState.FontStyle = FontStyles.Regular;

cell.Paragraphs.Add(textFragment);

cell.IsWordWrapped = true;
doc.Save("output.pdf");

@Roman_Matkovskyi

We tested using 24.12 version of the API and could not notice the issue. Have you tried with the latest version?
output.pdf (1.9 KB)

Oh yes, I see. The latest version on which we have a license is 24.10. On this version, it does not work. Thanks!

@Roman_Matkovskyi

We request you please upgrade to the latest version of the API in order to resolve your issue. We provide support on the basis of the latest available version and if issue is not happening with it, we recommend updating the API.