Hello, I’m currently use Aspose words for .NET 23.2.0. I ran into a problem when I save text with a numbered list to pdf.
I am inserting a list using the insertHTML() method inside the table. Part of the text is not carried over to the next line, but cut off.
Only when saving document in .pdf format, the list has an incorrect appearance, in doc/docx format there is no such problem.
Below I have given an example of code, also attached screenshots of the list view in (docx, pdf) which reproduce the issue.
incorrect report.pdf (25.5 KB)
correct report.docx (8.1 KB)
Example list that I used:
<ol><li>Morbi vel luctus lectus dictum odio. In non tortor, sapien sit leo, eget elit. Ut. Tortor, justo ipsum aenean nec non ut. Nunc ips</li></ol>
Example code:
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.StartTable();
var contentCell = asposeBuilder.InsertCell();
var html = "<ol><li>Morbi vel luctus lectus dictum odio. In non tortor, sapien sit leo, eget elit. Ut. Tortor, justo ipsum aenean nec non ut. Nunc ips</li></ol>";
builder.InsertHtml(html, HtmlInsertOptions.RemoveLastEmptyParagraph);
builder.EndRow();
builder.EndTable();
dataDir = dataDir + @"incorrect_report.pdf";
doc.Save(dataDir);
Thanks,
DelyaKh