We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

ECDCTS-5807 : Incorrect PDF rendition from .txt file


I am using the Aspose.Words to convert a .txt file to pdf , but the pdf rendition is incorrect. Adding additional characters to rendition and data manipulation.

It is converting the first number to bullets(1,2,3,4…and so on).

Attaching the source and rendition.Source&Rendition.zip (12.7 KB)


The TxtLoadOptions.DetectNumberingWithWhitespaces property allows to specify how numbered list items are recognized when document is imported from plain text format. The default value is true.
Please use the following code example to get the desired output.
TxtLoadOptions txtLoadOptions = new TxtLoadOptions();
txtLoadOptions.DetectNumberingWithWhitespaces = false;

Document doc = new Document(MyDir + "source.txt", txtLoadOptions);
doc.Save(MyDir + "19.2.pdf");

Thanks for your help.
Could you please let us know any use case for which we can use DetectNumberingWithWhiteSpaces = true.
Thanks and regards,

If this option is set to false, lists recognition algorithm detects list paragraphs, when list numbers ends with either dot, right bracket or bullet symbols (such as “•”, “*”, “-” or “o”).
If this option is set to true, whitespaces are also used as list number delimeters: list recognition algorithm for Arabic style numbering (1., 1.1.2.) uses both whitespaces and dot (".") symbols.